Into a set of map tiles, which are logically arranged in an order which theĪpplication understands. Instead, the API breaks up the imagery at each zoom level The API cannot load all the map imagery at once for the higher zoom levels. Tile coordinates which greatly simplify the displaying of map Logically all map tiles which lie within the given pixel bounds. Translates this bounding box into pixel coordinates. Given the zoom level center of the map (as a LatLng) and the The Maps JavaScript API constructs a viewport We now have a way to accurately denote each location on the map,Īt each zoom level. Pixel coordinates are equal to the world coordinates. Pixel coordinate's integer part has the effect of identifying the exact pixelĪt that location in the current zoom level. On the map can be referenced using a value betweenīecause we based world coordinates on the map's tile size, a The map consists of 4 256x256 pixels tiles, resulting in a pixel spaceįrom 512x512. Therefore, each higher zoom level results in a resolution four PixelCoordinate = worldCoordinate * 2 zoomLevelįrom the above equation, note that each increasing zoom levelĭirections. Pixel coordinates are calculated using the following Specific zoom level, whereas world coordinates reflect absolute locations on a Pixel coordinates reference a specific pixel on the map at a If you plot very near the poles, for example. World coordinates outside the base map's usable coordinate space +/- 85 degrees to make the resulting map shape square, which allowsĮasier logic for tile selection. We cut offīase map imagery utilizing the Mercator projection at approximately Width longitudinally but an infinite height latitudinally. Note that a Mercator projection has a finite Because theīasic Mercator Google Maps tile is 256 x 256 pixels, the usable The y direction towards the south (down). The x direction towards the east (right) and increase in Longitude and approximately 85 degrees latitude) and increase in Projection's origin (the northwest corner of the map at 180 degrees World coordinates in Google Maps are measured from the Mercator A world coordinate is independent of the current zoom level, It may be much more precise than the current resolution of the map imageīeing shown. Note that since this value is a floating point value, Point value measured from the origin of the map projection to the Level 0, using the projection to convert latitudes and longitudes to We then define world coordinates relative to pixel coordinates at zoom We assume a map at zoom level 0 is a single tile of the base tile size. Whenever the API needs to translate a location in the world to a location onĪ map, it first translates latitude and longitude values into aįor convenience in the calculation of pixel coordinates (see below)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |