Class Index | File Index

Classes


Class eniro.maps.MapTypeSrs


Extends eniro.maps.Srs.

Defined in: Srs.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Specialisation of {eniro.maps.Srs} that can be used as type in eniro.maps.MapTypeId.
Method Summary
Method Attributes Method Name and Description
 
getResolution(srsZoom, coord)
Returns the resolution (srs-unit per pixel) for the given (srs) zoom level and (optional) coordinate offset.
 
getSrsZoom(Resolution, coord)
Returns the (closest smaller) zoom level for the given resolution and coordinate.
Methods borrowed from class eniro.maps.Srs:
approxEquals, equals, getId, getName
Class Detail
eniro.maps.MapTypeSrs(id, name)
Specialisation of {eniro.maps.Srs} that can be used as type in eniro.maps.MapTypeId.
Parameters:
{string} id
The identifier of the spatial reference system such as 'EPSG:4326'
{string} name
Human readable name of this system such as 'WGS84'.
Method Detail
{number} getResolution(srsZoom, coord)
Returns the resolution (srs-unit per pixel) for the given (srs) zoom level and (optional) coordinate offset.
Parameters:
{number} srsZoom
Zoom level to get a resolution for.
{eniro.maps.Coordinate} coord Optional
Position to get zoom for, since this can differ depending on location/projection. If not provided, the map center is used.
Returns:
{number} The resolution in srs-unit per pixel for the given srsZoom/location.

{number} getSrsZoom(Resolution, coord)
Returns the (closest smaller) zoom level for the given resolution and coordinate.
Parameters:
{number} Resolution
in srs-unit per pixel.
{eniro.maps.Coordinate} coord Optional
Position to get zoom for, since this can differ depending on location/projection. If not provided, the map center is used.
Returns:
{number} The zoom level that closest matches the given resolution for the give coordinate. If rounded this is rounded floor, i.e. 7.5 is rounded to 7.

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Mar 30 2020 12:10:03 GMT+0200 (CEST)