EMAPI.Map

EMAPI.Map instances are interactive maps embedded in web applications.  The new map is created using the constructor EMAPI.Map.  Map data searching is performed by an instance of EMAPI.Finder class.

Additional object layers are superimposed on the map with EMAPI.VectorLayer or EMAPI.ClusterLayer class.

Summary
EMAPI.MapEMAPI.Map instances are interactive maps embedded in web applications.
Functions
EMAPI.MapThe constructor of a new instance of EMAPI.Map.
addMapActionAdds a new action to the map’s toolbar.
addMapActionDodaje nową akcję do panelu narzędziowego mapy.
removeMapActionRemoves action from the context map menu.
addLayerAdds new objects layer to map.
removeLayerRemoves indicated objects layer from the map.
getBoundsReturns the rectangle’s coordinates of the current map view.
setBoundsAdjusts the current mapview to present a rectangle with given geographical coordinates.
setMapTypeChanges current map view kind.
getCenterPosReturns the geographical coordinates of midpoint from current map view.
setCenterPosCenters the current map view with respect to the given geographical coordinates point.
setCallbackSets function of event’s service on the map.
categoryObjectsReturns to management of static objects e.g.
getZoomReturns zoom level of current map view.
updateSizeRefresh map after resizing of the window.
convertLonLatToScreenConverts the coordinates to screen points from the current map view.
convertScreenToLonLatConverts the screen coordinates for the geographical point from the current map view.
getVersionReturns version of the map data.
isChangingReturns information about map status.

Functions

EMAPI.Map

The constructor of a new instance of EMAPI.Map.

Parameters

div{String} An element’s ID on the page, which will contain the map.
token{String} User ID.
options{Object} Additional map’s parameters: mapType (kind of map presented: ‘std’ - standard map, ‘hipso’ - hypsometric map, ‘hybrid’ - map with satellite background), Boolean flags: noZoom (no zoom panel), noScale (no scale indicator), noMiniMap (lack of the map navigator).

addMapAction

Adds a new action to the map’s toolbar.

Parameters

index{Integer} The position in the toolbar, where should appear a new action (value >= 0).
action{String} {String} Title of the action.
icon{String} URL of icon for action
callback{Function} The function starts after selecting action from the context menu.

addMapAction

addMapAction: function(index,
action,
icon,
callback)

Dodaje nową akcję do panelu narzędziowego mapy.

Parameters

index{Integer} The position in the toolbar, where should appear a new action (value >= 0).
action{EMAPI.Actions.MapClick} Action.

removeMapAction

removeMapAction: function(index)

Removes action from the context map menu.

Parameters

index{Integer} The position in the context menu, which is intended an action to delete (value >= 0).

addLayer

addLayer: function(layer)

Adds new objects layer to map.

Parameters

layer{EMAPI.VectorLayer} New objects layer.

removeLayer

removeLayer: function(layer)

Removes indicated objects layer from the map.

Parameters

layer{EMAPI.VectorLayer} Objects layer which have to be removed from the map.

getBounds

getBounds: function()

Returns the rectangle’s coordinates of the current map view.

Result

{EMAPI.Bounds} The EMAPI.Bounds object representing the range of the map..

setBounds

setBounds: function(bounds)

Adjusts the current mapview to present a rectangle with given geographical coordinates.

Parameters

bounds{EMAPI.Bounds} The EMAPI.Bounds objects representing the desired area of ​​the map.

setMapType

setMapType: function (mType)

Changes current map view kind.

Parameters

mType{String} Kind of map presented (‘std’ - standard map, ‘hipso’ - hypsometric map, ‘hybrid’ - map with satellite background).

getCenterPos

getCenterPos: function()

Returns the geographical coordinates of midpoint from current map view.

Result

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

setCenterPos

setCenterPos: function(center,
zoom)

Centers the current map view with respect to the given geographical coordinates point.

Parameters

center{EMAPI.LonLat} The EMAPI.LonLat object representing coordinates of the required point.
zoom{Integer} Required zoom (value from the scope 0-17).

setCallback

setCallback: function(type,
callback)

Sets function of event’s service on the map.

Parameters

type{String} Event type (mapChange, objClick, objOver, objOut, objDragBegin, objDragEnd, onCategoriesChange, info, contextMenu).
callback{Function} Function starts during the event.

categoryObjects

categoryObjects:function()

Returns to management of static objects e.g.  POI.

Result

{EMAPI.CategoryObjects} An object to provide static objects that appear on the maps.  (including POI and additional client’s objects automatically loaded).

getZoom

getZoom: function()

Returns zoom level of current map view.

Result

{Integer} Zoom level (value from the scope 0-17).

updateSize

updateSize: function()

Refresh map after resizing of the window.

convertLonLatToScreen

convertLonLatToScreen: function(lonLat)

Converts the coordinates to screen points from the current map view.

Parameters

lonLat{EMAPI.LonLat} The EMAPI.LonLat object representing geographical coordinates of the point.

Result

{EMAPI.Pixel} The EMAPI.Pixel object representing screen coordinates of the point.

convertScreenToLonLat

convertScreenToLonLat: function(px)

Converts the screen coordinates for the geographical point from the current map view.

Parameters

px{EMAPI.Pixel} The EMAPI.Pixel object representing screen coordinates of the point.

Result

{EMAPI.LonLat} The EMAPI.LonLat object representing geographical coordinates of the point.

getVersion

getVersion: function (callback)

Returns version of the map data.

Parameters

callback{Function} Map version is send to this function.

isChanging

isChanging: function ()

Returns information about map status.

Result

{Boolean} Map status (true or false).

addMapAction: function(index,
action,
icon,
callback)
Dodaje nową akcję do panelu narzędziowego mapy.
removeMapAction: function(index)
Removes action from the context map menu.
addLayer: function(layer)
Adds new objects layer to map.
removeLayer: function(layer)
Removes indicated objects layer from the map.
getBounds: function()
Returns the rectangle’s coordinates of the current map view.
setBounds: function(bounds)
Adjusts the current mapview to present a rectangle with given geographical coordinates.
setMapType: function (mType)
Changes current map view kind.
getCenterPos: function()
Returns the geographical coordinates of midpoint from current map view.
setCenterPos: function(center,
zoom)
Centers the current map view with respect to the given geographical coordinates point.
setCallback: function(type,
callback)
Sets function of event’s service on the map.
categoryObjects:function()
Returns to management of static objects e.g.
getZoom: function()
Returns zoom level of current map view.
updateSize: function()
Refresh map after resizing of the window.
convertLonLatToScreen: function(lonLat)
Converts the coordinates to screen points from the current map view.
convertScreenToLonLat: function(px)
Converts the screen coordinates for the geographical point from the current map view.
getVersion: function (callback)
Returns version of the map data.
isChanging: function ()
Returns information about map status.
The constructor of a new instance of EMAPI.Map.
The class responsible for searching informations on the map, current address points.
An additional layer of objects applied to the map.
An additional layer of grouped objects applied on the map.
Instances of EMAPI.Actions.MapClick class are definitions of additional map panel actions.
This class instances represent rectangles limiting a map.
A class representing the geographic coordinates in the form of latitude and longitude.
Class responsible for the management of static objects.
A class representing the screen point.
Close