[OpenLayers-Users] Markers with dymamically changing appearance

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Wed Aug 11 02:57:11 EDT 2010


Hi,

have you considered using a vector layer with an externalGraphic instead?
It should be fairly easy to change the appearance of that through the
asscioated styles and redraw the features.

Best regards,
Bart

> New to Openlayers. Great project, many thanks to all who put so much work
> into creating and documenting it!
>
> What would be the idiomatic way to have the markers on my map with part of
> their appearance being dynamically generated and changeable?
>
> This is to display relative temporal information on the markers: as the
> user changes their location in time instead of space, using controls
> outside of the map itself, I need my markers to change their appearance in
> a dynamically-generated (ie local javascript) fashion.
>
> It would be possible to have a fixed set of graphics that they switch
> between, but there would be a largish number of these, so it would be
> preferable to just generate them locally via Javascript. Best of all
> possible worlds would probably be to fetch a "base" marker and then copy
> it, add the custom graphic as a layer on top of it, drop it on the map,
> then be able to get at it and just change its custom layer with javascript
> drawing commands (I'm okay with having to use HTML5 for this, but I'd
> prefer not to).
>
> The graphic I want to draw on top of the marker isn't complicated — two or
> three lines at right angles, so I should be able to dynamically update
> even a fair number of markers assuming there isn't a massive drawing
> overhead.
> _______________________________________________
> 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