Given latitude and longitude in degrees, and the level of detail, the pixel XY coordinates is calculated as follows: var sinLatitude = Math.sin(latitude * Math.PI/180) For example, when using 512 square tiles at level 2, the pixel coordinates range from (0, 0) to (2047, 2047), like this: The pixel at the lower-right corner of the map has pixel coordinates (width-1, height-1), or referring to the equations in the previous section, (tileSize * 2 zoom–1, tileSize * 2 zoom–1). The pixel at the upper-left corner of the map always has pixel coordinates (0, 0). Since the map width and height is different at each zoom level, so are the pixel coordinates.
Maptiler change zoom level full#
The full pixel width and height of a map image of the world for a particular zoom level is calculated as: var mapWidth = tileSize * Math.pow(2, zoom) Having chosen the projection and scale to use at each zoom level, we can convert geographic coordinates into pixel coordinates. The following table provides the full list of values for zoom levels where the tile size is 512 pixels square at latitude 0: Zoom level Although road data will only be available at the zoom levels in when the tiles are available.
Maptiler change zoom level android#
The Azure Maps interactive map controls for web and Android support 25 zoom levels, numbered 0 through 24. Zoom level 1 uses four tiles to render the world: a 2 x 2 squareĮach additional zoom level quad-divides the tiles of the previous one, creating a grid of 2 zoom x 2 zoom. At zoom level 0, the entire world fits on a single tile: Azure Maps provides raster and vector tiles for 23 zoom levels, numbered 0 through 22. The Azure Maps SDK's use tiles that have a size of 512 x 512 pixels for road maps, and smaller 256 x 256 pixels for satellite imagery. To optimize the performance of map retrieval and display, the map is divided into square tiles. North and south are always up and down, and west and east are always left and right. Square buildings should appear square, not rectangular. For example, we want to avoid distorting the shape of buildings. Preserving the shape of small objects is especially important when showing aerial imagery. It's a conformal projection, which means that it preserves the shape of relatively small objects.This projection significantly distorts the scale and area of the map but has two important properties that outweigh this distortion: The Spherical Mercator projection stretches the map at the poles to create a square map. A projection is the mathematical model used to transform the spherical globe into a flat map. Azure Maps use the Spherical Mercator projection coordinate system (EPSG: 3857).