convertScreenToTileCoord
Description
Returns the row and column number of the map tile in which a specified screen pixel lies.
Parameters
For information on the parameter types listed below, see Request URL Data Types.
Parameter | Type | Required | Description |
---|---|---|---|
name | String | yes | Specifies the name of the named map. |
level | Integer | yes |
Specifies the map zoom level. This parameter must be set to a value greater than or equal to the minLevel value and less than or equal to the maxLevel value for the named map. You can determine these values by calling the getDescription method and examining the returned MapDescription object. For more information, see getDescription and MapDescription. |
screenX | Integer | yes | Specifies the x coordinate value of the point in the view used to select the tile. This point is specified from the upper left corner of the view in pixels. |
screenY | Integer | yes | Specifies the y coordinate value of the point in the view used to select the tile. This point is specified from the upper left corner of the view in pixels. |
view | Bounds | yes | Specifies the geographic bounds of the view that displays the map, expressed in terms of the map's coordinate system. |
output | String | yes | Specifies the response format. Must be json. |
Example
http://<server>:<port>/rest/Spatial/LegacyMapTilingService/convertScreenToTileCoord?
name=/NamedTiles/WorldTile
&level=4
&screenX=100
&screenY=100
&view=-20000000,20000000,20000000,-20000000
&output=json
The above example will return the following JSON response object:
{"EnvinsaResponse":{"tileCoord":{"column":1,"row":1},"type":"MapTilingResponse"}}
Returns
A TileCoordinate object as seen in the above sample. See TileCoordinate.