[OpenLayers-Users] Dragable markers

Andreas Hocevar ahocevar at opengeo.org
Mon Jul 6 04:03:19 EDT 2009


On Sat, Jul 4, 2009 at 10:39 PM, Admin
TrouveTonGull.info<contact at trouvetongull.info> wrote:
> Hello,
>
> i try to enable drag for georss markers with "new
> OpenLayers.Control.DragFeature()"
>
> but my markers are always not dragable :( What is wrong?

Hard to tell without seeing your code. But I would gess you are using
an OpenLayers.Layer.Markers or OpenLayers.Layer.GeoRSS. The
DragFeature control only works with vector layers (Layer.Vector,
Layer.GML, Layer.WFS). To see how to set this up, have a look at the
http://www.openlayers.org/dev/examples/behavior-fixed-http-gml.html
example. If you use GeoRSS and not GML, you will want to replace the
format (new OpenLayers.Format.GML()) with a GeoRSS format (new
OpenLayers.Format.GeoRSS).

Regards,
Andreas.


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list