Pokestop Markers

Brian [2016-08-15 17:47:45]
Pokestop Markers
Filename
PokemonGo.RocketBot.Window/Forms/MainForm.cs
diff --git a/PokemonGo.RocketBot.Window/Forms/MainForm.cs b/PokemonGo.RocketBot.Window/Forms/MainForm.cs
index d0d63d3..d378993 100644
--- a/PokemonGo.RocketBot.Window/Forms/MainForm.cs
+++ b/PokemonGo.RocketBot.Window/Forms/MainForm.cs
@@ -50,7 +50,7 @@ namespace PokemonGo.RocketBot.Window.Forms
         private readonly GMapOverlay _searchAreaOverlay = new GMapOverlay("areas");
         private ConsoleLogger _logger;
         private StateMachine _machine;
-        private GMarkerGoogle _playerMarker;
+        private static GMarkerGoogle _playerMarker;
         private GlobalSettings _settings;

         public MainForm()
@@ -238,11 +238,23 @@ namespace PokemonGo.RocketBot.Window.Forms
                         select new PointLatLng(pokeStop.Latitude, pokeStop.Longitude)).ToList();
                 _pokestopsOverlay.Routes.Clear();
                 _pokestopsOverlay.Routes.Add(new GMapRoute(routePoint, "Walking Path"));
+                foreach (var pokeStop in pokeStops)
+                {
+                    var type = GMarkerGoogleType.blue_small;
+                    var pokeStopLoc = new PointLatLng(pokeStop.Latitude, pokeStop.Longitude);
+                    var pokestopMarker = new GMarkerGoogle(pokeStopLoc, type);
+                    //pokestopMarker.ToolTipMode = MarkerTooltipMode.OnMouseOver;
+                    //pokestopMarker.ToolTip = new GMapBaloonToolTip(pokestopMarker);
+                    _pokestopsOverlay.Markers.Add(pokestopMarker);
+
+                    routePoint.Add(pokeStopLoc);
+                }
             }
         }

         private static void Navigation_UpdatePositionEvent(double lat, double lng)
         {
+            _playerMarker.Position = new PointLatLng(lat, lng);
             SaveLocationToDisk(lat, lng);
         }
You may download the files in Public Git.