Map is ready to use
Map is going to resized
Can prevent default behavior by return false
Map resized
Map repainted
Zoom level changed
⇦PointPivot of zoom
Zoom range changed
Map location animation begin
⇦LocationTarget location
Map location changed
Map enter/exit fullsceen
⇦boolIs fullscreen
Map rotated
Suggest result is ready
⇦ObjectResult
Search result is ready
⇦ObjectResult
Address result is ready
⇦ObjectResult
Nearby POI result is ready
⇦ObjectResult
Clear measure line
Context menu is going to appear
Can prevent default behavior by return false
⇦MenuEventMenu event
Context menu appeared
User move mouse (without drag)
⇦PointCursor point
User click/touch on map
⇦PointClick point
User double click/touch on map
Can prevent default behavior by return false
⇦PointClick point
User scroll wheel
⇦PointWheel point
User pinch map
⇦PointPinch point
User stop pinch map
User drag map
Can prevent default behavior by return false
⇦PointOffset
User stop drag map
Can prevent default behavior by return false
Layer changed
⇦LayerChange layer
All visible tile are start or finish to load
⇦string'start' or 'finish'
User click overlay
Can prevent default behavior by return false
⇦LongdoOverlayOverlay
overlay result is ready
⇦ObjectData
Popup load detail
Can prevent default behavior by return false
⇦PopupPopup
Routing guide error
⇦intError code
Routing guide complete
⇦Object[]Guide list
Routing path error
⇦intError code
Routing path complete
⇦ObjectData
Geolocation request
Can prevent default behavior by return false
Connection error
⇦stringSource
Standard base layer (TH)
Standard base layer (EN)
Upside down base layer (TH)
Upside down base layer (EN)
Gray-ish base layer (TH)
Gray-ish base layer (EN)
Standard+POI base layer (TH)
Standard+POI base layer (EN)
Political base layer (TH)
Political base layer (EN)
Political base layer (No label)
Hillshade base layer
Basic base layer
Open Street Map base layer
Longdo OSM base layer
Open Cycle base layer
Bluemarble terrain base layer
SPOT5 satellite base layer
Thaichote satellite base layer
TomTom standard base layer (TH)
TomTom standard+POI base layer (TH)
TomTom basic base layer
White base layer
Transparent base layer
Checkered base layer
Standard+POI non-base layer (TH)
Standard+POI non-base layer (EN)
Traffic non-base layer with auto-refresh
Google traffic external layer
Google satellite image external layer
Google satellite image with road map external layer
Mapbox GL streets external layer
Mapbox GL satellite image external layer
Mapbox GL satellite image with streets external layer
Mapbox GL Longdo style OSM external layer
Mapbox GL Longdo traffic external layer
byName(name)
Get layer by name
@param {string) name Layer name
⇦LayerLayer
add(overlay)
Add an overlay to this collection
Bind overlayChange event to get notify
⎆LongdoOverlayoverlay: Overlay
⇦thisSelf
remove(overlay)
Remove an overlay from this collection
Bind overlayChange event to get notify
⎆LongdoOverlayoverlay: Overlay
⇦thisSelf
clear()
Clear all overlays in this collection
Bind overlayChange event to get notify
⇦thisSelf
list()
List overlays in this collection
⇦LongdoOverlay[]List of overlays
size()
Number of overlays in this collection
⇦intSize
move(overlay, location, animate)
Move an overlay to new location
Bind overlayMove event to get notify
⎆LongdoOverlayoverlay: Overlay
⎆Locationlocation: New location
⌥bool|intanimate: Show animation, can specify animation interval in ms
(
Default:
false)
⇦thisSelf
load(mode)
Load predefined overlays and add to this collection
Bind overlayLoad event to get notify
⎆Overlays.Objectmode: Mode
⇦thisSelf
unload(mode)
Remove predefined overlays from this collection
⎆Overlaysmode: Mode
⇦thisSelf
pop(overlay, mode, atPointer)
Show or hide popup of the overlay if any
Bind overlayChange event to get notify
⎆LongdoOverlayoverlay: Overlay
⌥boolmode: Show or hide
(
Default:
toggle)
⇦thisSelf
floorPlan(overlay)
Show floor plan of the overlay if any
⎆LongdoOverlayoverlay: Overlay
⇦thisSelf
drop(overlay)
Show drop animation of the overlay and add to this collection
⎆LongdoOverlayoverlay: Overlay
⇦thisSelf
bounce(overlay)
Show bounce animation of the overlay
⎆LongdoOverlayoverlay: Overlay
⇦thisSelf
enableAutoClosePopup(state)
Enable automatically close previous popup when open new one
Getter
⇦boolCurrent state
Setter
⎆boolstate: New state
⇦thisSelf
enableAutoFocusPopup(state)
Enable automatically move map to make whole popup visible
Getter
⇦boolCurrent state
Setter
⎆boolstate: New state
⇦thisSelf
enableFloorPlan(state)
Enable automatically show floor plan if any
Getter
⇦boolCurrent state
Setter
⎆boolstate: New state
⇦thisSelf
enableEditGuide(state)
Enable edit guide
⎆boolstate: New state
⇦thisSelf
lastOpenPopup()
Get the last open popup
⇦PopupLast open popup
linkEditing(a, b)
Link all editing node of both geometries
⎆Polylinea: First geometry
⎆Polylineb: Second geometry
⇦thisSelf
pathAnimation(marker, path, speed)
Move marker along the line
⎆Markermarker: The marker to move
⎆Polylinepath: Motion path
⌥numberspeed: Speed
(
Default:
2^-zoom)
⇦thisSelf
placeholder(value)
Access placeholder element
Getter
⇦ElementCurrent placeholder
Setter
⎆Elementvalue: New placeholder
⇦thisSelf
enableContextMenu()
Enable routing menu in context menu
⇦thisSelf
line(type, value)
Access route line options
Avaliable type are
destination - the direct lines from routing path to destination, set to false to disable
road
air
rail - all ground public transport
ferry
focus - when select a guide
Getter
⎆stringtype: Line type
⇦GeometryOptionsCurrent options
Setter
⎆stringtype: Line type
⎆GeometryOptionsvalue: New options
⇦thisSelf
auto(state)
Access auto update setting
Getter
⇦boolCurrent state
Setter
⎆boolstate: New state
⇦thisSelf
mode(value)
Access search mode
Getter
⇦RouteModeCurrent mode
Setter
⎆RouteModevalue: New mode
⇦thisSelf
enableRoute(routeType, state)
Enable type of route
Getter
⎆RouteTyperouteType: Route type
⇦boolCurrent state
Setter
⎆RouteTyperouteType: Route type
⎆boolstate: New state
⇦thisSelf
enableRestrict(routeRestrict, state)
Enable vehicle restriction
Getter
⎆RouteRestrictrouteRestrict: Restrict vehicle
⇦boolCurrent state
Setter
⎆RouteRestrictrouteRestrict: Restrict vehicle
⎆boolstate: New state
⇦thisSelf
time(value)
Access search time
Getter
⇦DateCurrent time
Setter
⎆Datevalue: New time
⇦thisSelf
modeOf(index, value)
Access search mode of each destination
Getter
⇦RouteModeCurrent search mode of each destination
Setter
⎆intindex: Index
⎆RouteModevalue: New mode
⇦thisSelf
useStopMarker(state)
Use stop marker for last destination
Getter
⇦boolCurrent state
Setter
⎆boolstate: New state
⇦thisSelf
usePoiName(state)
Use near by POI name as destination in the guide
This function don't change current guide
Getter
⇦boolCurrent state
Setter
⎆boolstate: New state
⇦thisSelf
useCumulativeDistance(state)
Use cumulative distance
This function don't change current guide
Getter
⇦boolCurrent state
Setter
⎆boolstate: New state
⇦thisSelf
showUnknownRoad(state)
Show unknown road in guide
This function don't change current guide
Getter
⇦boolCurrent state
Setter
⎆boolstate: New state
⇦thisSelf
label(value)
Access label mode
Getter
⇦RouteLabelCurrent mode
Setter
⎆RouteLabelvalue: New mode
⇦thisSelf
add(destination, mode)
Add a destination to this route
⎆Marker|Locationdestination: Destination
⇦thisSelf
insert(index, destination, mode)
Insert a destination to this route
⎆intindex: Index
⎆Marker|Locationdestination: Destination
⇦thisSelf
remove(destination)
Remove a destination from this route
⎆Markerdestination: Destination
⇦thisSelf
removeAt(index)
Remove destination at the index
⎆intindex: Destination index
⇦thisSelf
clearDestination()
Clear all destinations
⇦thisSelf
clearPath()
Clear all paths
⇦thisSelf
clear()
Clear everything
⇦thisSelf
list()
List destination in this route
⇦Marker[]List of destinations
size()
Number of destinations in this route
⇦intSize
reverse()
Reverse the direction of route
⇦thisSelf
search()
Search the route
Bind guideComplete, guideError, pathComplete, pathError event to get notify
⇦thisSelf
distance(format)
Distance of the route
⎆boolformat: With format
⇦int|stringDistance
interval(format)
Time to travel through the route
⎆boolformat: With format
⇦int|stringInterval
guide(format)
Guide for travel through the route
⎆boolformat: With format
⇦string|ElementElement
exportRouteLine(options)
Export route line as a single polyline
⌥GeometryOptionsoptions: Extra options
(
Default:
Default value)
⇦PolylineGeometry overlay
nextGuide()
Show next guide
⇦thisSelf
append(element, childName, propertyMap)
Create and append content to an element
⎆Elementelement: Parent element
⎆stringchildName: Type of element to be created
⌥ObjectpropertyMap: New element property
(
Default:
no property)
⇦ElementNewly created element
prepend(element, childName, propertyMap, beforeElement)
Create and prepend content to an element
⎆Elementelement: Parent element
⎆stringchildName: Type of element to be created
⌥ObjectpropertyMap: New element property
(
Default:
no property)
⌥ElementbeforeElement: Insert content before this element
(
Default:
First child of the element)
⇦ElementNewly created element
empty(element)
Remove all children from an element
⎆Elementelement: Parent element
⇦ElementEmpty element
addClass(element, className)
Add class to an element
⎆Elementelement: Element
⎆stringclassName: Class
⇦ElementElement with added class
removeClass(element, className)
Remove class from an element
⎆Elementelement: Element
⎆stringclassName: Class
⇦ElementElement without removed class
hasClass(element, className)
Check if an element has the specified class
⎆Elementelement: Element
⎆stringclassName: Class
⇦boolHas class
transformOrigin(element, origin)
Set transform origin of the element
⎆Elementelement: Element
⎆Pointorigin: Origin
transform(element, mode, value, offset)
Scale element
⎆Elementelement: Element
⎆stringmode: Transform mode
⎆numbervalue: value
⎆Pointoffset: Translation offset
translate(element, offset)
Translate element
⎆Elementelement: Element
⎆Pointoffset: Translation offset
transition(element, state)
Animate or stop an element
⎆Elementelement: Element
⎆boolstate: State
transitionEnd(element, callback)
Add animation end callback to an element
⎆Elementelement: Element
⌥delegatecallback: Callback function(event: Event): void
(
Default:
no callback)
loadStyle(url, media)
Load an additional stylesheet
⎆stringurl: Stylesheet URL
⌥stringmedia: Media
(
Default:
all)
loadScript(url, callback)
Load an additional script
⎆stringurl: Script URL
⌥delegatecallback: Callback function(isLoad: bool): void
(
Default:
no callback)
getJson(url, callback)
Load JSON with GET request
⎆stringurl: Service URL
⌥delegatecallback: Callback function(data: Object): void
(
Default:
no callback)
⇦XMLHttpRequestThe request
isHD()
Check if display device has high pixel density or not
⇦boolIs HD screen
validateLocation(location)
Validate the location
⎆Locationlocation: Location in degree
⇦boolIs location valid
boundOfTile(projection, tile)
Find bounding box of the tile in target projection
⎆Projectionsprojection: Projection
⎆Tiletile: Tile
⇦BoundBounding box
centerOfBound(bound)
Find center of the bounding box
⎆BoundBounding: box
⇦LocationCenter location
sizeOfBound(bound)
Find size of the bounding box
⎆BoundBounding: box
⇦SizeSize in degree
polylinePivot(locationList)
Find a location to represent the polyline
⎆Location[]locationList: List of polyline vertices
⇦LocationPivot Location
locationBound(locationList)
Find bounding box of the list of locations
⎆Location[]locationList: List of locations
⇦BoundBounding box
averageLocation(projection, location1, location2)
Find midpoint of the given locations in target projection
⎆Projectionsprojection: Projection
⎆Locationlocation1: Location 1 in degree
⎆Locationlocation2: Location 2 in degree
⇦LocationLocation mean
distance(locationList, language)
Find distance of the polyline
Using haversine formula
⎆Location[]locationList: List of polyline vertices
⌥stringlanguage: Language in ISO 639-1
(
Default:
neutral)
⇦float|stringDistance in metre or formatted text if provided language
area(locationList, language)
Find approximate area of the polygon
⎆Location[]locationList: List of polygon vertices
⌥stringlanguage: Language in ISO 639-1
(
Default:
neutral)
⇦float|stringArea in square metre or formatted text if provided language
areaCircle(locationList, language)
Find approximate area of the circle
⎆Location[]locationList: Circle's center and radius
⌥stringlanguage: Language in ISO 639-1
(
Default:
neutral)
⇦float|stringArea in square metre or formatted text if provided language
contains(point, locationList)
Check if the point is in the polygon
Points on polygon's edge are count as outside
⎆Locationpoint: The point
⎆Location[]locationList: List of polygon vertices
⇦boolIs point in polygon, return null if overlay is exactly on polygon's edge
translateGeom(locationList, vector)
Translate geometry
⎆Location[]locationList: List of geometry vertices
⎆Locationvector: Distance to shift
⇦Location[]List of translated geometry vertices
rotateGeom(locationList, pivot, angle)
Rotate geometry
⎆Location[]locationList: List of geometry vertices
⎆Locationpivot: Pivot point
⎆numberangle: Angle to rotate in radian
⇦Location[]List of rotated geometry vertices
longitudeLength(lat)
Find length of a degree of longitude at the given Latitude
Using fourier series
⎆numberlat: Latitude
⇦numberLength in metre
latitudeLength(lat)
Find length of a degree of latitude at the given Latitude
Using fourier series
⎆numberlat: Latitude
⇦numberLength in metre
sameLocation(a, b)
Check if the given locations are equal
⎆Locationa: First location
⎆Locationb: Second location
⇦boolIs same location
overlayFromWkt(wkt, options, forceType)
Create overlay from well-known text
⎆stringwkt: Well-known text
⌥GeometryOptionsoptions: Extra options
(
Default:
Default value)
⎆PolylineforceType: Force geometry type
⇦Polyline[]Geometry overlays
overlayToWkt(overlayList)
Export overlay to well-known text
⎆Polyline[]overlayList: List of homogeneous geometries
⇦stringWell-known text
overlayFromGeoJSON(geo, options)
Create overlay from GeoJSON
⎆Objectgeo: GeoJSON Object
⌥GeometryOptionsoptions: Extra options
(
Default:
Default value)
⇦Polyline[]Geometry overlays
overlayToGeoJSON(overlayList)
Export overlay to GeoJSON
⎆Polyline[]overlayList: List of homogeneous geometries
⇦ObjectGeoJSON
locationToDMS(location)
Convert decimal degrees location to degrees minutes seconds
⎆Locationlocation: Location in degree
⇦Objectdegrees minutes seconds version of location
locationToUTMZone(location)
Find UTM zone from the Location
This function ignore special zone
⎆Locationlocation: Location in degree
⇦ObjectUTM zone and hemisphere or null if location is outside zone
locationToGeohash(location, precision)
Find Geohash from the Location
⎆Locationlocation: Location in degree
@param {int} precision
⇦StringGeohash
boundOfGeohash(geohash)
Find bounding box of the geohash
⎆Stringgeohash: Geohash
⇦BoundBounding box
isInRange(value, range)
Check if the value is in the range
⎆intvalue: Value
⎆Rangerange: Range
⇦boolIs value inside range
isAbsInRange(value, range)
Check if absolute of the value is in the range
⎆intvalue: Value
⎆intrange: Range
⇦boolIs Absolute value inside range
bound(value, min, max)
Limit value to the bound
⎆intvalue: Value
⎆intmin: Lower bound
⎆intmax: Upper bound
⇦intBounded value
boundAngle(value)
Limit angle to 0 - 360
⎆Numbervalue: Angle in degree
⇦NumberBounded angle
lastItem(array)
Get last item in the array
⎆Object[]array: Array
⇦ObjectLast item in array
pushOrder(array, item, comparator)
Push new item to sorted array
⎆Object[]array: Sorted array
⎆Objectitem: New item
⎆delegatecomparator: Comparator function(a: Object, b: Object): int
⇦intinsert position
capFirst(string)
Capitalise first letter of the string
⎆stringstring: String
⇦stringFormatted string
formatDate(date, language)
Format the given date
⎆stringdate: Date string
⎆stringlanguage: Language in ISO 639-1
⇦stringFormatted date string
formatTime(time)
Format the given time
⎆stringtime: Time string
⇦stringFormatted time string
formatDateTimeRange(startDatetime, stopDatetime, language)
Format the given datetime range
⎆stringstartDatetime: Start datetime string
⎆stringstopDatetime: Stop datetime string
⎆stringlanguage: Language in ISO 639-1
⇦stringFormatted datetime range string
formatInterval(interval, language)
Format the given time interval
⎆numberinterval: Time interval in second
⎆stringlanguage: Language in ISO 639-1
⇦stringFormatted interval string
formatDistance(distance, language)
Format the given distance
⎆numberdistance: Distance in metre
⎆stringlanguage: Language in ISO 639-1
⇦stringFormatted distance string
formatArea(area, language)
Format the given area
⎆numberarea: Area in square metre
⎆stringlanguage: Language in ISO 639-1
⇦stringFormatted area string
formatThaiArea(area, language)
Format the given area to Thai unit
⎆numberarea: Area in square metre
⎆stringlanguage: Language in ISO 639-1
⇦stringFormatted area string in thai unit
numberWithCommas(number)
Add thousands separator to the number
⎆int|stringnumber: Number
⇦stringNumber string with commas
hexToRgba(color)
Convert hexadecimal color notation to RGBA
⎆stringcolor: Hexadecimal color notation
⇦stringEquivalent RGBA color notation