Setting the map view

Setting the map view can be done in two ways:
1. Giving the coordinates of the center point on the map (setCenterPos function)
2. Gving the coordinates of the rectangle's vertices presenting the map setBounds function).


1. setCenterPos function centering current map view by the point of a given geographical coordinates.

Available parameters:
lonLat{EMAPI.LonLat} EMAPI.LonLat object representing geogrphical coordinates of desired point.
zoom{Integer} The requested increase (value from the range 0-17).

map.setCenterPos(new EMAPI.LonLat(19.4384569767695,51.761249510014),12);

EMAPI.LonLat

EMAPI.LonLat(lon,lat);

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

An example of the action:



2. setBounds function adjusts the current map view to present a rectangle with the given geographical coordinates.

Available parameters:
bounds{EMAPI.Bounds} EMAPI.Bounds object representing the desired area on the map.

map.setBounds(new EMAPI.Bounds(19,51,21,50));

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: