remove markers using coordination

Topics: Windows Forms
Oct 22, 2011 at 12: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

Coordinator
Oct 22, 2011 at 1:23 PM

why do you need that ;/

Oct 22, 2011 at 1: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 ?

Coordinator
Oct 22, 2011 at 1:36 PM

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

Oct 22, 2011 at 1:39 PM

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

Coordinator
Oct 22, 2011 at 1:45 PM

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

Oct 22, 2011 at 1:48 PM

ok im gonna try 

ty so much radio man

Oct 22, 2011 at 1:57 PM

another question radioman

in this function

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

Coordinator
Oct 22, 2011 at 1:58 PM
Edited Oct 22, 2011 at 2: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 2:04 PM

thats cool 

and how to get the index of markers ??

Coordinator
Oct 22, 2011 at 2:16 PM

check the code...

Oct 22, 2011 at 2: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#

Coordinator
Oct 22, 2011 at 2:24 PM

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

Oct 22, 2011 at 2:33 PM

Thank you radioman :)

Oct 22, 2011 at 2:33 PM
Edited Oct 22, 2011 at 4: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 4: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 10:12 PM

WIN or WPF?

Oct 29, 2011 at 12:53 AM

WIN

Oct 30, 2011 at 11:35 PM

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

Oct 31, 2011 at 4:21 AM

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

Oct 31, 2011 at 1: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 ??