예제 #1
0
 /// <summary>Centers the map on the specified coordinates.</summary>
 /// <param name="latitude">The latitude cooridinate.</param>
 /// <param name="longitude">The longitude coordinates.</param>
 /// <param name="zoom">The zoom level for the map.</param>
 public void Center(double latitude, double longitude, int zoom)
 {
     this.BeginUpdate();
     this.Zoom = zoom;
     _offsetX.CenterOn(TileGenerator.GetTileX(longitude, this.Zoom));
     _offsetY.CenterOn(TileGenerator.GetTileY(latitude, this.Zoom));
     this.EndUpdate();
 }
예제 #2
0
 /// <summary>
 /// Centers the map on the specified coordinates.
 /// </summary>
 /// <param name="latitude">The latitude cooridinate.</param>
 /// <param name="longitude">The longitude coordinates.</param>
 /// <param name="zoom">The zoom level for the map.</param>
 public void Center(double latitude, double longitude, int zoom)
 {
     BeginUpdate();
     Zoom = zoom;
     _offsetX.CenterOn(_tileGenerator.GetTileX(longitude, Zoom));
     _offsetY.CenterOn(_tileGenerator.GetTileY(latitude, Zoom));
     EndUpdate();
 }
예제 #3
0
        /// <summary>Centers the map on the specified coordinates.</summary>
        /// <param name="latitude">The latitude cooridinate.</param>
        /// <param name="longitude">The longitude coordinates.</param>
        /// <param name="zoom">The zoom level for the map.</param>
        public void Center(double latitude, double longitude, int zoom)
        {
            this.BeginUpdate();
            this.Zoom = zoom;
            var tilex = TileGenerator.GetTileX(longitude, this.Zoom);

            _offsetX.CenterOn(tilex);
            var tiley = TileGenerator.GetTileY(latitude, this.Zoom);

            _offsetY.CenterOn(tiley);

            Debug.WriteLine(String.Format("CenterZoom: ty={0} tx={1} z={2} lat={3} lon={4}",
                                          tilex, tiley,
                                          zoom, latitude, longitude));
            this.EndUpdate();
        }