Exemplo n.º 1
0
        public void SetLocation(MonkeySpace.Core.MapLocation toLocation)
        {
            var targetLocation = toLocation.Location.To2D();

            if (toLocation.Location.X == 0 && toLocation.Location.Y == 0)
            {
                // use the 'location manager' current coordinate
                if (locationManager.Location == null)
                {
                    return;                     // catch a possible null reference that i saw once [CD]
                }
                else
                {
                    targetLocation = locationManager.Location.Coordinate;
                    ConferenceAnnotation a = new ConferenceAnnotation(targetLocation, "My location", "");
                    mapView.AddAnnotationObject(a);
                }
            }
            else if (toLocation.Title == "MonkeySpace")
            {
                // no need to drop anything
            }
            else
            {
                // drop a new pin
                ConferenceAnnotation a = new ConferenceAnnotation(toLocation.Location.To2D(), toLocation.Title, toLocation.Subtitle);
                mapView.AddAnnotationObject(a);
            }
            mapView.CenterCoordinate = targetLocation;
        }
        public MapViewController(MapFlipViewController mfvc) : base()
        {
            _mfvc = mfvc;
            var l = new MonkeySpace.Core.MapLocation()
            {
                Title = "MonkeySpace", Location = new MonkeySpace.Core.Point {
                    X = -71.08363940740965, Y = 42.36100515974955
                }
            };

            ConferenceLocation = l.Location.To2D();
        }
 public MapViewController(MapFlipViewController mfvc)
     : base()
 {
     _mfvc = mfvc;
     var l = new MonkeySpace.Core.MapLocation() {
         Title="MonkeySpace".GetText(),
         Location=new MonkeySpace.Core.Point{Y=18.487918,X=-69.961857}};  //18.487918,-69.961857
     ConferenceLocation = l.Location.To2D();
 }
Exemplo n.º 4
0
 public MapViewController(MapFlipViewController mfvc)
     : base()
 {
     _mfvc = mfvc;
     var l = new MonkeySpace.Core.MapLocation() {Title="MonkeySpace", Location=new MonkeySpace.Core.Point{X=-71.08363940740965,Y=42.36100515974955}};
     ConferenceLocation = l.Location.To2D();
 }
Exemplo n.º 5
0
 public MapViewController(MapFlipViewController mfvc)
     : base()
 {
     mapFlipViewController = mfvc;
     ConferenceLocation = Constants.Locations [0];
 }