remove markers using coordination

Topics: Windows Forms
Oct 22, 2011 at 1:59 PM

hey :) 

i add a marker using this :

overlayOne.Markers.Add(New GMap.NET.WindowsForms.Markers.GMapMarkerCross(New PointLatLng(Lat, Lon)))

is there any function like :

overlayOne.Markers.remove(lat,lon)

and ty so much for this wonderful work

Oct 22, 2011 at 2:23 PM

why do you need that ;/

Oct 22, 2011 at 2:30 PM

i have to move marker in the map , every 2 min i receive lat and lon , and i want to remove old marker so i can put the new one 

did u get what i mean ?

Oct 22, 2011 at 2:36 PM

just change the position of the marker, man...

Oct 22, 2011 at 2:39 PM

yes , but i have lot of markers , how to know wich marker will be repositioned

Oct 22, 2011 at 2:45 PM

check the windows forms demo, it has live flight tracker, with hundreds of planes, and no problem ;}

Oct 22, 2011 at 2:48 PM

ok im gonna try 

ty so much radio man

Oct 22, 2011 at 2:57 PM

another question radioman

in this function

overlayOne.Markers.Remove("WHAT SHOULD I PUT IN HERE")

Oct 22, 2011 at 2:58 PM
Edited Oct 22, 2011 at 3:01 PM

check this ;} basicaly each marker has it's own unique id, and thats how you find it and update it's position: 

Oct 22, 2011 at 3:04 PM

thats cool 

and how to get the index of markers ??

Oct 22, 2011 at 3:16 PM

check the code...

Oct 22, 2011 at 3:19 PM

can u plz write or give the link , i don't know where to search in here and everything is writing with c#

Oct 22, 2011 at 3:24 PM

http://greatmaps.codeplex.com/SourceControl/changeset/view/d4512b7a5353#Demo.WindowsForms%2fForms%2fMainForm.cs

Oct 22, 2011 at 3:33 PM

Thank you radioman :)

Oct 22, 2011 at 3:33 PM
Edited Oct 22, 2011 at 5:42 PM

well i can't find solve the problem :( :(

i need one of 2 things

index of marker

or array of markers

plzz help 

Oct 22, 2011 at 5:42 PM

 

well i can't find solve the problem :( :(

i need one of 2 things

index of marker

or array of markers

plzz help 

Oct 28, 2011 at 11:12 PM

WIN or WPF?

Oct 29, 2011 at 1:53 AM

WIN

Oct 31, 2011 at 12:35 AM

Suggestion: Add the location (lat, long) as it's ID when you add the layer. ;)

Oct 31, 2011 at 5:21 AM

Derive from MArkers and implement your in ID, then with LINQ make a search and voila

Oct 31, 2011 at 2:52 PM

here is my situation 

every 5 min , i get new lat,long

if the lat,long belong to an id already exist (car id) , the marker will move to the new location

else new marker will be created in the map.

so i think i need an array of markers 

what do you think ??