Exemple #1
0
 public Interactive()
 {
     InitializeComponent();
     Map = GoogleMapWrapper.Create(this);
     Init.Peers.ForEach(pn => { if (pn.NodeLocation.lon == 0 && pn.NodeLocation.lat == 0)
                                {
                                    pn.NodeLocation.lat = 48;
                                }
                                pn.NodeLocation.lon = 16; });
     Map.ApiReady += () => DrawNodes();
 }
 public MainWindow()
 {
     InitializeComponent();
     currentUser   = null;
     markers       = new Dictionary <int, string>();
     _gMapsWrapper = GoogleMapWrapper.Create(this, new MapOptions()
     {
         DraggingEnabled = true, MapType = MapTypeId.Satellite, Center = new GeographicLocation(0, 0), Zoom = 3
     }, new StreetViewOptions()
     {
     });
 }
        public MainWindow()
        {
            InitializeComponent();

            // CreateAnimals();
            _gMapsWrapper           = GoogleMapWrapper.Create(this);
            _gMapsWrapper.ApiReady += _gMapsWrapper_ApiReady;

            /* _gMapsWrapper.MapClick -= _gMapsWrapper_MapClick;
             * _gMapsWrapper.ZoomChanged -= _gMapsWrapper_ZoomChanged;
             * _gMapsWrapper.CenterChanged -= _gMapsWrapper_CenterChanged;
             * _gMapsWrapper.MapDoubleClick -= _gMapsWrapper_MapDoubleClick;
             * _gMapsWrapper.MapRightClick -= _gMapsWrapper_MapRightClick;
             * _gMapsWrapper.BoundsChanged -= _gMapsWrapper_BoundsChanged;*/
            _simulator = new AnimalMotionSimulator();
            _simulator.Start(this);
        }
Exemple #4
0
        private void InitializeMap()
        {
            if (_gMapsWrapper != null)
            {
                _gMapsWrapper.MapClick       -= _gMapsWrapper_MapClick;
                _gMapsWrapper.ZoomChanged    -= _gMapsWrapper_ZoomChanged;
                _gMapsWrapper.CenterChanged  -= _gMapsWrapper_CenterChanged;
                _gMapsWrapper.MapDoubleClick -= _gMapsWrapper_MapDoubleClick;
                _gMapsWrapper.MapRightClick  -= _gMapsWrapper_MapRightClick;
                _gMapsWrapper.BoundsChanged  -= _gMapsWrapper_BoundsChanged;
            }

            _gMapsWrapper                 = GoogleMapWrapper.Create(this, (MapOptions)pgMapOptions.SelectedObject, (StreetViewOptions)pgStreetViewOptions.SelectedObject);
            _gMapsWrapper.MapClick       += _gMapsWrapper_MapClick;
            _gMapsWrapper.ZoomChanged    += _gMapsWrapper_ZoomChanged;
            _gMapsWrapper.CenterChanged  += _gMapsWrapper_CenterChanged;
            _gMapsWrapper.MapDoubleClick += _gMapsWrapper_MapDoubleClick;
            _gMapsWrapper.MapRightClick  += _gMapsWrapper_MapRightClick;
            _gMapsWrapper.BoundsChanged  += _gMapsWrapper_BoundsChanged;

            lblZoom.Text   = _gMapsWrapper.Zoom.ToString();
            lblCenter.Text = _gMapsWrapper.Center.ToString();
        }
Exemple #5
0
 public MainWindow()
 {
     InitializeComponent();
     GoogleMapWrapper.Create(this);
 }