[OpenLayers-Users] Markers vs Features?
Matt J Cwanek
mcwanek at fourddev.com
Fri Apr 4 10:09:46 EDT 2008
Hi:
We have an application framework that we've decided to port from Google
Maps 2 to OpenLayers, and so far it's been pretty painless. From the map
perspective, our application provides for real-time marker updates via
GPS devices, user-created markers w/custom icons, user-created vector
features (lines, areas, polys), custom maptile sets, etc.
Coming from the GMap2 world, I initially ported our code to work with the
OpenLayers.Marker class, where it had been previously using GMarkers. I
knew that I would be using Features to support the vector functionality,
but when I started looking at how to make certain user-created Markers
draggable (as we had before with GMap2), I started getting lost.
I guess my question is, coming from a Google Maps 2 world, it seems like
a GMarker is more like an OpenLayers.Marker except for being able to
drag it around, in which case it looks like I should use
OpenLayers.Features instead for everything. But then I'm getting
confused by the fact that a Feature attaches to a particular Layer, when
we intended to have multiple base layer options for the user to pick
from.
And finally, I don't understand why a Feature has it's own lonlat that
could be different from the one the Marker has....?
Can anybody help clear this up for me?
Thanks for your time.
Matt J Cwanek
FourD Development, Inc.
mcwanek at fourddev.com
More information about the Users
mailing list