DantSu\OpenStreetMapStaticAPI\MapData convert latitude and longitude to image pixel position.
- Full name:
\DantSu\OpenStreetMapStaticAPI\MapData
See Also:
- https://github.com/DantSu/php-osm-static-api - Github page of this project
- (static) lngToXTile
- (static) latToYTile
- (static) xTileToLng
- (static) yTileToLat
- (static) getBoundingBoxFromPoints
- (static) getCenterAndZoomFromBoundingBox
- __construct
- getLatLngTopLeft
- getLatLngTopRight
- getLatLngBottomLeft
- getLatLngBottomRight
- getOutputSize
- getZoom
- getTileSize
- getTileTopLeft
- getTileBottomRight
- getMapCropTopLeft
- getMapCropBottomRight
- convertLatLngToPxPosition
Convert longitude and zoom to horizontal OpenStreetMap tile number and pixel position.
- This method is static.
Parameter | Type | Description |
---|---|---|
lon |
float | Longitude |
zoom |
int | Zoom |
tileSize |
int | Tile size |
int[] : OpenStreetMap tile id and pixel position of the given longitude and zoom
Convert latitude and zoom to vertical OpenStreetMap tile number and pixel position.
- This method is static.
Parameter | Type | Description |
---|---|---|
lat |
float | Latitude |
zoom |
int | Zoom |
tileSize |
int | Tile size |
int[] : OpenStreetMap tile id and pixel position of the given latitude and zoom
Convert horizontal OpenStreetMap tile number ad zoom to longitude.
- This method is static.
Parameter | Type | Description |
---|---|---|
id |
int | Horizontal OpenStreetMap tile id |
position |
int | Horizontal pixel position on tile |
zoom |
int | Zoom |
tileSize |
int | Tile size |
float : Longitude of the given OpenStreetMap tile id and zoom
Convert vertical OpenStreetMap tile number and zoom to latitude.
- This method is static.
Parameter | Type | Description |
---|---|---|
id |
int | Vertical OpenStreetMap tile id |
position |
int | Vertical pixel position on tile |
zoom |
int | Zoom |
tileSize |
int | Tile size |
float : Latitude of the given OpenStreetMap tile id and zoom
Transform array of LatLng to bounding box
- This method is static.
Parameter | Type | Description |
---|---|---|
points |
\DantSu\OpenStreetMapStaticAPI\LatLng[] |
\DantSu\OpenStreetMapStaticAPI\LatLng[] :
Get center and zoom from two points.
- This method is static.
Parameter | Type | Description |
---|---|---|
topLeft |
\DantSu\OpenStreetMapStaticAPI\LatLng | |
bottomRight |
\DantSu\OpenStreetMapStaticAPI\LatLng | |
padding |
int | |
imageWidth |
int | |
imageHeight |
int | |
tileSize |
int |
array : center : LatLng, zoom : int
Parameter | Type | Description |
---|---|---|
centerMap |
\DantSu\OpenStreetMapStaticAPI\LatLng | |
zoom |
int | |
outputSize |
\DantSu\OpenStreetMapStaticAPI\XY | |
tileSize |
int |
Get latitude and longitude of top left image
\DantSu\OpenStreetMapStaticAPI\LatLng : Latitude and longitude of top left image
Get latitude and longitude of top right image
\DantSu\OpenStreetMapStaticAPI\LatLng : Latitude and longitude of top right image
Get latitude and longitude of bottom left image
\DantSu\OpenStreetMapStaticAPI\LatLng : Latitude and longitude of bottom left image
Get latitude and longitude of bottom right image
\DantSu\OpenStreetMapStaticAPI\LatLng : Latitude and longitude of bottom right image
Get width and height of the image in pixel
\DantSu\OpenStreetMapStaticAPI\XY : Width and height of the image in pixel
Get the zoom
int : zoom
Get tile size
int : tile size
Get top left tile numbers
\DantSu\OpenStreetMapStaticAPI\XY : top left tile numbers
Get bottom right tile numbers
\DantSu\OpenStreetMapStaticAPI\XY : bottom right tile numbers
Get top left crop pixels
\DantSu\OpenStreetMapStaticAPI\XY : top left crop pixels
Get bottom right crop pixels
\DantSu\OpenStreetMapStaticAPI\XY : bottom right crop pixels
Convert a latitude and longitude to a XY pixel position in the image
Parameter | Type | Description |
---|---|---|
latLng |
\DantSu\OpenStreetMapStaticAPI\LatLng | Latitude and longitude to be converted |
\DantSu\OpenStreetMapStaticAPI\XY : Pixel position of latitude and longitude in the image
Automatically generated from source code comments on 2023-07-30 using phpDocumentor