Beispiel #1
0
        private void setupMap()
        {
            // Map Initialization
            GeoLocator.centerMapOnCurrentLocation(currentLocation);
            GeoLocator.drawMapMarkers(currentLocation);

            // Timer for Map
            mapTimer          = new DispatcherTimer();
            mapTimer.Interval = TimeSpan.FromMilliseconds(800);
            mapTimer.Tick    += mapTimer_Tick;
        }
Beispiel #2
0
 private void mapTimer_Tick(Object sender, EventArgs args)
 {
     if (searching == false)
     {
         mapTimer.Stop();
         searching = true;
         //TODO: Called too much, don't get a chance to draw markers before change.
         GeoLocator.drawMapMarkers(currentLocation);
         searching = false;
         loadingProgressBar.IsVisible = false;
     }
 }
Beispiel #3
0
 private void ApplicationBarIconButton_Click_1(object sender, EventArgs e)
 {
     loadingProgressBar.Text      = "Loading map data ...";
     loadingProgressBar.IsVisible = true;
     mapTimer.Stop();
     searching = true;
     //TODO: Called too much, don't get a chance to draw markers before change.
     GeoLocator.centerMapOnCurrentLocation(currentLocation);
     GeoLocator.drawMapMarkers(currentLocation);
     getNearbyStops();
     searching = false;
     loadingProgressBar.IsVisible = false;
 }