[OpenLayers-Users] Is it possible to show a subsection (sprite) of an image as a marker?

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Wed Aug 18 05:24:39 EDT 2010


Hi Matt,

not out of the box unfortunately.

This would either require changes to the current renderers (SVG and VML),
or implementing your own custom renderer. I did something like this a
while ago, see:

http://osgisjs.blogspot.com/2010/06/anchor-renderer.html

Best regards,
Bart

>
> My application has 100 marker images that I want to display on the Map.  I
> don't want to force to user to download 100 images.  A technique that has
> worked for other graphic intensive sites, is to send all the markers down
> as
> sprites in a single image (http://www.alistapart.com/articles/sprites),
> and
> use CSS to control which part of the image is shown for every marker.
>
> Does OpenLayers have support for these sorts of techniques in the Vector
> Layer?  If not, is it possible to use custom html as a marker instead of a
> graphic?
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Is-it-possible-to-show-a-subsection-sprite-of-an-image-as-a-marker-tp5435420p5435420.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>


-- 
Looking for flexible support on OpenLayers or GeoExt? Please check out
http://www.osgis.nl/support.html

Bart van den Eijnden
OSGIS
bartvde at osgis.nl




More information about the Users mailing list