[MapQuery] marker layer

Richard Duivenvoorde rdmailings at duif.net
Tue Aug 23 12:24:01 EDT 2011


Hi Steven,

see:
http://docs.openlayers.org/library/overlays.html

Markers are only there for backwards compatibility, I think Vectors as
point-markers is the way to go?
(doesn't solve your problem though....)

Regards,

Richard

On 08/23/2011 02:49 PM, Steven M. Ottens wrote:
> 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
> 
> _______________________________________________
> MapQuery mailing list
> MapQuery at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapquery



More information about the MapQuery mailing list