[MapQuery] marker layer
Steven M. Ottens
steven at minst.net
Tue Aug 23 08:49:48 EDT 2011
Hi all,
I've got a design issue:
I want to add a marker layer to MapQuery
(http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Markers-js.html)
so I can add markers to my applications. However the actual markers are
a different object
(http://dev.openlayers.org/apidocs/files/OpenLayers/Marker-js.html).
As such just creating a layer type:marker wouldn't achieve much. We
could pass in coordinates to add markers at those locations;
layer = {type: marker, location: [[3,2],[5,4]]}
But how should you add markers later on or remove them?
Alternative would be to create a marker object (just like in OL) and
create a markers() function on the layer object
marker = {location: [3,2], icon: 'icon.png'}
marker2 = {location: [5,4], icon: 'icon.png'}
layer = {type: marker, markers: [marker,marker2]}
But that would create an extra function on the layer object, which can
only be used for a marker layer
Any thoughts?
Steven
More information about the MapQuery
mailing list