Thanks, Arnd, I'll give it a crack 

Sent from my mobile device

On Jun 13, 2011, at 2:13 AM, "Arnd Wippermann" <[email protected]> wrote:

> if you use Feature.Vector markers to display your markers, try
>  
> if(vectorLayer.features.length>0)
>     vectorLayer.removeFeatures(vectorLayer.features);
>  
> to remove the marker before you add a marker at the new position.
>  
> http://gis.ibbeck.de/ginfo/apps/OLExamples/OL210/Map_mit_Marker.asp
> 
> or use a DragFeature.Control to drag the marker around.
>  
> http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/gc_example.html
>  
>  Or both.
>  
> i was not able to update the position of the marker by updating the geometry 
> and redraw the feature. The label moves to the new position, but the marker 
> (the externalGraphic) wouldn't move!?
>  
> Arnd
>  
>  
>  
> Von: [email protected] 
> [mailto:[email protected]] Im Auftrag von Nicholas 
> Efremov-Kendall
> Gesendet: Samstag, 11. Juni 2011 18:43
> An: Rossko
> Cc: [email protected]
> Betreff: Re: [OpenLayers-Users] Re: help with removing/replacing a 
> markerafter click  event
> 
> Hi Rosco,
> 
> No, I hadn't thought of that. Any suggestions on how to update the position 
> of the marker, maybe a loop with a new LonLat?
> 
> On Sat, Jun 11, 2011 at 5:00 AM, Rossko <[email protected]> wrote:
> > The issue is that each time the user clicks, another marker is placed. This
> isn't really a problem, but for
> > aesthetic purposes, I'd like to destroy or remove the first marker if the
> > clicks again
> 
> Have you considered a different approach to coding this, create one marker
> and move it around.
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/help-with-removing-replacing-a-marker-after-click-event-tp6463400p6464936.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
> 
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to