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
- __construct
- getLatLngTopLeft
- getLatLngTopRight
- getLatLngBottomLeft
- getLatLngBottomRight
- getOutputSize
- getZoom
- 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 |
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 |
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 |
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 |
float : Latitude of the given OpenStreetMap tile id and zoom
| Parameter | Type | Description |
|---|---|---|
centerMap |
\DantSu\OpenStreetMapStaticAPI\LatLng | |
zoom |
int | |
outputSize |
\DantSu\OpenStreetMapStaticAPI\XY |
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 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 2022-05-31 using phpDocumentor