Moving Map
I'm working on a moving map that is next to the console in Window mode. I am having issues getting the coordinates to save with each pokestop and capture.
Thoughts?
Here is my current screen to give you an idea of what Im going for:
http://imgur.com/a/WrI6k
Only thought that comes to mind is adding a check box or something to enable/disable view of it
Not sure what you could do about that. Would like to see this finished though. Would be an awesome addition!
I got it writing the coordinates to the config file but then it throws this error and bombs. Any ideas?
System.InvalidOperationException: Cross-thread operation not valid: Control 'gMapControl1' accessed from a thread other than the thread it was created on.
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.Invalidate(Boolean invalidateChildren)
at GMap.NET.WindowsForms.GMapControl.Refresh()
at GMap.NET.WindowsForms.GMapControl.ForceUpdateOverlays()
at GMap.NET.WindowsForms.GMapControl.set_Position(PointLatLng value)
at PokemonGo.RocketAPI.Window.MainForm.ExecuteUpdateMap(Client client) in \Mac\Home\Downloads\Pokemon-Go-Rocket-API-master\PokemonGo\RocketAPI\Window\MainForm.cs:line 464
at PokemonGo.RocketAPI.Window.MainForm.
Everything works with the exception of this crashing. Im relatively new to c# just finishing an advance course about 18 months ago and not touching it since. So these errors are a bit over my head :/
I know the error is coming from me using this
if (checkBox1.Checked == true) { gMapControl1.Position = new PointLatLng(pokeStop.Latitude, pokeStop.Longitude); }
But why? I have a checkbox setup and on main form load, it loads the config coords then checks the box so it doesn't run those ones again. Then I have it set to only run this update after the main load, loads the initial map and checks the box true.
Hmmmm,.......
This will only be useful if it can mark out all the locations around (etc. pokemons, pokestops) Otherwise it will be kinda pointless :/