sprite.image is uri of an image and sprite.top sets its style.top relative to the marker container.
You can have a set of markers in a single image file and bring one icon at a time visible by .top.
Hosting a large set of markers is not fun. A single file will do now. Also you don't have to preload separate image files anymore.
See a demo.
Update:
There are also 'width' and 'height' properties. Those can be used if you did not specify GIcon.size. You can have different sized icon images in a single sprite. Thanks Mike.
No comments:
Post a Comment