0

For my web map I have a sprite including multiple icons. I built a legend based on HTML div-elements and I would like to include some of the icons from the sprite in a simple img-tag like this:

<img src="icon-from-sprite"/>

My sprite is accessible via https://url/sprites/mysprite.png and https://url/sprites/mysprite.json. It works to include the whole sprite as an image using:

<img src="https://url/sprites/mysprite.png"/>

But how can I access a certain icon from within my sprite? Is this possible at all?

Robbert
  • 109
  • 5

0 Answers0