[OpenLayers-Users] Basic marker questions

Alexandre Dube adube at mapgears.com
Tue May 4 08:22:56 EDT 2010


Hi Mike,

  See :
http://www.openlayers.org/dev/examples/draw-feature.html
http://www.openlayers.org/dev/examples/wfs-protocol-transactions.html

  See also below :


Mike Purvis wrote:
> I'm working on an application that allows the user to add lines and 
> vertices to the map, to construct routes. In Google Maps, this would 
> simply be markers and polylines.
If you really need to have 2 layers, one for the lines and one for the 
intersections (points), my guess is that you should draw the lines only 
and once one is finished drawing, get all its vertices and add them to 
your other layer.  You should be able to accomplish this by registering 
a "featureadded" event on your DrawFeature control used to draw your lines.


> I read elsewhere that the use of Marker and Layer.Markers is 
> effectively deprecated in the OpenLayers world, in favour of 
> Layer.Vector. Is this true?
Yes, highly recommended.

-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list