|
|
|
|
|
Downloading map view

Information about the current view of the map, you can get by downloading the coordinates of the center point on the map (getCenterPos function) or the coordinates of the rectangle's vertices presenting map (getBounds function).


1. getCenterPos function returns the coordinates of the center point of the current map view.

The return value:
{EMAPI.LonLat} EMAPI.LonLat object representing the coordinates of the returned point.

map.getCenterPos();

EMAPI.LonLat

EMAPI.LonLat(lon,lat);

where:
lon{Number} Longitude.
lat{Number} Latitude.

An example of the action:

--> Click to download the coordinates of the center point of the current map view <--



2. getBounds function centering the current map view with respect to point of the given geographical coordinates.

The return value:
bounds{EMAPI.Bounds} EMAPI.Bounds object representing the range of the map.

EMAPI.Bounds

EMAPI.Bounds(left,bottom,right,top);

where:
left{Number} Coordinates the left border of the rectangle (the minimum value).
bottom{Number} Coordinates the lower limit of the rectangle. (the minimum value).
right{Number} Coordinates the right border of the rectangle (the maximum value).
top{Number} Upper coordinates of the rectangle (the maximum value).

An example of the action:

--> Click to download the coordinates of the rectangle presenting the current map <--


3. getZoom function returns the magnification (zoom) of the current map view.

map.getZoom();

--> Click to download the zoom of the current map view <--