Java is a registered trademark of Oracle and/or its affiliates.Slay with Dre McCray: Husband Von McCray's Yuma, Arizona, Accident in 2022 | by Anna Marin | Medium Write Sign up Sign In 500 Apologies, but something went wrong on our end. For details, see the Google Developers Site Policies. To see how the coordinates were calculated,Įxcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. Use the zoom control to see the coordinate values at various Latitude/longitude values, world coordinates, pixel coordinates, and tileĬoordinates. The following example displays coordinates for Chicago, IL: The tile coordinate at the current zoom level. Taking the integer parts of the result, you produce as a by-product Note that by dividing the pixel coordinates by the tile size (256) and ForĮxample, at zoom level 2, when the earth is divided up into 16 tiles,Įach tile can be referenced by a unique x,y pair: TilesĪre indexed using x,y coordinates from that origin. Of the map, with x values increasing from west toĮast and y values increasing from north to south. Origin tile is always at the northwest corner For Google's implementation of the Mercator projection, the Tiles in Google Maps are numbered from the same origin as thatįor pixels. These tile coordinates are assigned usingĪ scheme which makes it logically easy to determine which tile contains Using pixel coordinates, and translates those values into a set Zoom level, the API determines which tiles are needed When a map scrolls to a new location, or to a new 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) Tile coordinates, which reference a specific tile on the map at a.Pixel coordinates, which reference a specific pixel on the map at a.World coordinates, which reference a point on the map uniquely.Latitude and longitude values, which reference a point on the.The Maps JavaScript API uses the following coordinate systems:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |