Example #1
0
 public userMapOverlay(IMapDrawable drawable, Geocode geocode, Library.User user)
 {
     _drawable = (userMapDrawable)drawable;
     _geocode = geocode;
     _user = user;
     _offset = new Point((ClientSettings.SmallArtSize + (ClientSettings.Margin * 2) / 2), (ClientSettings.SmallArtSize + (ClientSettings.Margin * 2)));
 }
Example #2
0
 private void SetMarkers()
 {
     float fSize = 9;
     List<string> seenLocs = new List<string>();
     List<Geocode> codes = new List<Geocode>();
     SizeF currentScreen = this.CurrentAutoScaleDimensions;
     if (currentScreen.Height == 192)
     {
         fSize = 4;
     }
     foreach (Library.User user in _Users)
     {
         string location = user.location;
         if (!seenLocs.Contains(location))
         {
             seenLocs.Add(location);
             Yedda.GoogleGeocoder.Coordinate c;
             if (!Yedda.GoogleGeocoder.Coordinate.tryParse(location, out c))
             {
                 c = Yedda.GoogleGeocoder.Geocode.GetCoordinates(location);
             }
             if (c.Latitude != 0 && c.Longitude != 0)
             {
                 userMapDrawable marker = new userMapDrawable();
                 marker.userToDraw = user;
                 marker.fSize = fSize;
                 Geocode g = new Geocode((double)c.Latitude, (double)c.Longitude);
                 MapOverlay o = new MapOverlay(marker, g, new Point(0, -marker.Height / 2));
                 codes.Add(g);
                 mySession.Overlays.Add(o);
             }
         }
     }
     mySession.FitPOIToDimensions(myPictureBox.Width, myPictureBox.Height, 8, codes.ToArray());
 }