Livemap SDK reference
SDK use examples:
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 | |
---|---|
Lat | Type: integer |
Lng | Type: 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 | |
---|---|
Lat | Type: integer |
Lng | Type: integer |
LatLngBoundsLiteral object specification
navmii.maps.interfaces.LatLngBoundsLiteral object specification
Properties | |
---|---|
East | Type: integer |
North | Type: integer |
South | Type: integer |
West | Type: 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 |
message | Type: string |
GeocoderRequest object specification
navmii.maps.interfaces.GeocoderRequest object specification
Properties | |
---|---|
address | Type: string Search string. Required for geocoding |
bounds | Type: LatLngBounds Search bounds. Required for geocoding |
location | Type: LatLng Location. Required for reverse geocoding |
limit | Type: integer Limit output results |
NavmiiLookupResponseItem object specification
navmii.maps.interfaces.NavmiiLookupResponseItem object specification
Properties | |
---|---|
lat | Type: integer |
lon | Type: integer |
name | Type: string |
adminPath | Type: string |
houseNumber | Type: string |
countryISO3Code | Type: 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 |
origin | Type: string | LatLng | LatLngLiteral Location of origin |
waypoints | Type: 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. |
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. |
alternatives | Type: boolean | integer Search for alternative routes. Passing a number alternatives=n searches for up to n alternative routes. |
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 |
duration | Type: integer |
distance | Type: integer |
legs | Type: Array<OsmRouteLeg> |
RouteGeometry object specification
navmii.maps.interfaces.RouteGeometry object specification
Properties | |
---|---|
type | Type: string |
coordinates | Type: Array<Array<integer>> |
OsmRouteLeg object specification
navmii.maps.interfaces.OsmRouteLeg object specification
Properties | |
---|---|
summary | Type: string |
duration | Type: integer |
distance | Type: integer |
steps | Type: Array<OsmRouteStep> |
OsmRouteStep object specification
navmii.maps.interfaces.OsmRouteStep object specification
Properties | |
---|---|
name | Type: string |
geometry | Type: string |
duration | Type: integer |
distance | Type: integer |
mode | Type: string |
maneuver | Type: Array<OsmRouteManeuver> |
OsmRouteManeuver object specification
navmii.maps.interfaces.OsmRouteManeuver object specification
Properties | |
---|---|
type | Type: string |
modifier | Type: string |
bearing_before | Type: integer |
bearing_after | Type: integer |
location | Type: Array<integer> |
exit | Type: integer |
OsmRouteWaypoint object specification
navmii.maps.interfaces.OsmRouteWaypoint object specification
Properties | |
---|---|
hint | Type: string |
name | Type: string |
location | Type: Array<integer> |
DirectionsResult object specification
navmii.maps.interfaces.DirectionsResult object specification
Extends BaseResponse
Properties | |
---|---|
code | Type: string |
routes | Type: Array<OsmRoute> |
waypoints | Type: Array<OsmRouteWaypoint> |
SearchRequest object specification
navmii.maps.interfaces.SearchRequest object specification
Properties | |
---|---|
top | Type: integer |
q | Type: string |
location | Type: 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> |
items | Type: Array<SearchResultItem> |
Category object specification
navmii.maps.interfaces.Category object specification
Properties | |
---|---|
id | Type: integer |
name | Type: string |
icon | Type: string |
SearchResultItem object specification
navmii.maps.interfaces.SearchResultItem object specification
Properties | |
---|---|
id | Type: string |
lat | Type: integer |
lng | Type: integer |
categoryIds | Type: Array<integer> |
country | Type: string |
provider | Type: string |
name | Type: string |
shortInfo | Type: string |
address | Type: string |
categories | Type: 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 |
directions | Type: DirectionsResult |
draggable | Type: boolean |
Events | |
---|---|
onMarkerDragEnd |