Livemap SDK reference

SDK use examples:

http://mapsdk.navmii.com/

https://jsfiddle.net/Navmii/0121380d/ - geocoding

https://jsfiddle.net/Navmii/5emswgb6/ - routing

https://jsfiddle.net/Navmii/kvv3t3g5/ - search

https://jsfiddle.net/Navmii/0121380d/ - reverse geocoding

SDK download

SDK is available by the following URL: http://mapsdk.navmii.com/api/js?key=AIzaSCp8qq7EXmt3Ud5RLjh8OIElP8gzHM1

LatLng class


navmii.maps.interfaces.LatLng class

Properties
LatType: integer
LngType: integer
Consructor
LatLng(lat: integer, lon: integer)


Methods
toUrlValue()

Return value: string

Returns a string of the form "lat,lng"

toJSON()

Return value: LatLngLiteral

Converts to JSON representation. This function is intended to be used via JSON.stringify


LatLngLiteral object specification


navmii.maps.interfaces.LatLngLiteral object specification

Properties
LatType: integer
LngType: integer

LatLngBoundsLiteral object specification


navmii.maps.interfaces.LatLngBoundsLiteral object specification

Properties
EastType: integer
NorthType: integer
SouthType: integer
WestType: integer


LatLngBounds class


navmii.maps.interfaces.LatLngBounds class

Consructor
LatLngBounds(sw: LatLng | LatLngLiteral, ne: LatLng | LatLngLiteral)Constructs a rectangle from the points at its south-west (sw) and north-east (ne) corners


Methods
getCenter()

Return value: LatLng

Computes the center of this LatLngBounds

getNorthEast()Return value: LatLng

Returns the north-east corner of this bounds

getSouthWest()

Return value: LatLng

Returns the south-west corner of this bounds

toJSON()

Return value: LatLngBoundsLiteral

Converts to JSON representation. This function is intended to be used via JSON.stringify

toUrlValue()

Return value: string

Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this bounds, where "lo" corresponds to the southwest corner of the bounding box, while "hi" corresponds to the northeast corner of that box.


BaseResponse object specification


navmii.maps.interfaces.BaseResponse object specification

Properties
status

Type: integer

messageType: string

GeocoderRequest object specification


navmii.maps.interfaces.GeocoderRequest object specification

Properties
address

Type: string

Search string. Required for geocoding

bounds

TypeLatLngBounds

Search bounds. Required for geocoding

location

TypeLatLng

Location. Required for reverse geocoding

limit

Type: integer

Limit output results

NavmiiLookupResponseItem object specification


navmii.maps.interfaces.NavmiiLookupResponseItem object specification

Properties
lat

Type: integer

lonType: integer
name

Type: string

adminPathType: string
houseNumber

Type: string

countryISO3CodeType: string

GeocoderResult object specification


navmii.maps.interfaces.GeocoderResult object specification

Extends BaseResponse

Properties
items

Type: Array<NavmiiLookupResponseItem>

GeocoderStatus constants


navmii.maps.interfaces.GeocoderStatus constants

Constant
INVALID_REQUEST
OK
UNKNOWN_ERROR
ZERO_RESULTS

Geocoder class


navmii.maps.interfaces.Geocoder class

Methods
geocode()

Return value: void

WIP

DirectionsWaypoint object specification


navmii.maps.interfaces.DirectionsWaypoint object specification

Properties
location

Type: string | LatLng | LatLngLiteral

Waypoint location

DirectionsRequest object specification


navmii.maps.interfaces.DirectionsRequest object specification

Properties
destination

Type: string | LatLng LatLngLiteral

Location of destination

originType: string | LatLng LatLngLiteral

Location of origin

waypointsType: Array<DirectionsWaypoint>

Array of intermediate waypoints. Directions will be calculated from the origin to the destination by way of each waypoint in this array. Optional

bearings

Type: Array<integer> | string

Array of bearings. Limits the search to segments with given bearing in degrees towards true north in clockwise direction. Optional.
Example: "60,120" or "60;120" or [60, 120]

profile

Type: DrivingProfile

Mode of transportation. Typically driving, fastest, shortest, fastest_notolls, shortest_notolls. Optional.

radiuses

Type: Array<integer> | string

Array of radiuses. Limits the search to given radius in meters. Optional.
Example: "1000,500" or "1000;500" or [1000, 500]

alternatives

Type: boolean | integer

Search for alternative routes. Passing a number alternatives=n searches for up to n alternative routes.
Optional.

DirectionsService class


navmii.maps.interfaces.DirectionsService class

Methods
route()

Return value: void

WIP

DirectionsStatus constants


navmii.maps.interfaces.DirectionsStatus constants

Constant
INVALID_REQUEST
NOT_FOUND
OK
OVER_QUERY_LIMIT
REQUEST_DENIED
UNKNOWN_ERROR
ZERO_RESULTS

OsmRoute object specification


navmii.maps.interfaces.OsmRoute object specification

Properties
geometry

Type: string | RouteGeometry

durationType: integer
distanceType: integer
legsType: Array<OsmRouteLeg>

RouteGeometry object specification


navmii.maps.interfaces.RouteGeometry object specification

Properties
type

Type: string

coordinatesType: Array<Array<integer>>

OsmRouteLeg object specification


navmii.maps.interfaces.OsmRouteLeg object specification

Properties
summary

Type: string

durationType: integer
distanceType: integer
stepsType: Array<OsmRouteStep>

OsmRouteStep object specification


navmii.maps.interfaces.OsmRouteStep object specification

Properties
name

Type: string

geometryType: string
durationType: integer
distanceType: integer
modeType: string
maneuverType: Array<OsmRouteManeuver>

OsmRouteManeuver object specification


navmii.maps.interfaces.OsmRouteManeuver object specification

Properties
type

Type: string

modifierType: string
bearing_beforeType: integer
bearing_afterType: integer
locationType: Array<integer>
exitType: integer

OsmRouteWaypoint object specification


navmii.maps.interfaces.OsmRouteWaypoint object specification

Properties
hint

Type: string

nameType: string
locationType: Array<integer>

DirectionsResult object specification


navmii.maps.interfaces.DirectionsResult object specification

Extends BaseResponse

Properties
code

Type: string

routesType: Array<OsmRoute>
waypointsType: Array<OsmRouteWaypoint>

SearchRequest object specification


navmii.maps.interfaces.SearchRequest object specification

Properties
top

Type: integer

qType: string
locationType: LatLng LatLngLiteral

r

Type: integer

searchFor

Type: SearchFor

SearchFor constants


navmii.maps.interfaces.SearchFor constants

Constant
All
Address
Poi

SearchResult object specification


navmii.maps.interfaces.SearchResult object specification

Properties
categories

Type: Array<Category>

itemsType: Array<SearchResultItem>

Category object specification


navmii.maps.interfaces.Category object specification

Properties
id

Type: integer

nameType: string
iconType: string

SearchResultItem object specification


navmii.maps.interfaces.SearchResultItem object specification

Properties
id

Type: string

latType: integer
lngType: integer
categoryIdsType: Array<integer>
countryType: string
providerType: string
nameType: string
shortInfoType: string
addressType: string
categoriesType: Array<string>

SearchStatus constants


navmii.maps.interfaces.SearchStatus constants

Constant
OK
INVALID_REQUEST
UNKNOWN_ERROR
ZERO_RESULTS

SearchService class


navmii.maps.interfaces.SearchService class

Methods
search()

WIP

Map class


navmii.maps.interfaces.Map class

Constructors
map(selector: HTMLElement | string, options)


Methods
addLayer(layer: any)

Return value: void

fitBounds(bounds)Return value: void
invalidateSize()Return value: void

DirectionsRenderer class


navmii.maps.interfaces.DirectionsRenderer class

Constructors
DirectionsRenderer(opts: DirectionsResult)


Methods
setDirections(directions: DirectionsResult)

Return value: void

setMap(map: Map)Return value: void

DirectionsRendererOptions object specification


navmii.maps.interfaces.DirectionsRendererOptions object specification

Properties
map

Type: Map

directionsType: DirectionsResult
draggableType: boolean


Events
onMarkerDragEnd