Map is ready to use
Map is going to resized
Can prevent default behavior by return false from handler functions
Map has been resized
Map has been repainted
Zoom level changed
⇦Point Pivot of zoom
Zoom range changed
Location animation begin
⇦Location Target location
Location changed
Map enter or exit fullsceen
⇦bool Is fullscreen
Map rotated
Suggest result is ready
⇦Object Result
Search result is ready
⇦Object Result
Address result is ready
⇦Object Result
Nearby POI result is ready
⇦Object Result
Clear measure line
Context menu is going to appear
Can prevent default behavior by return false from handler functions
⇦MenuEvent Menu event
Context menu is appeared
User move mouse (without drag)
⇦Point Cursor point
User click or tap on the map
⇦Point Click point
User double click or tap on the map
Can prevent default behavior by return false
⇦Point Click point
User scroll mouse wheel
⇦Point Wheel point with direction
User pinch the map
⇦Point Pinch point
User stop pinch the map
User drag the map
Can prevent default behavior by return false from handler functions
⇦Point Offset
User stop drag the map
Can prevent default behavior by return false from handler functions
No input from user, no animation and no tile are loaded
Layer changed
⇦Layer Change layer
All visible tile are start or finish to load
⇦string 'start' or 'finish'
User click a overlay
Can prevent default behavior by return false
⇦LongdoOverlay The clicked overlay
Predefined overlays are ready
⇦Object The overlays data
A popup is going to load it's detail
Can prevent default behavior by return false from handler functions
⇦Popup The popup
Routing guide error
⇦int Error code
Routing guide complete
⇦Object[] Guide list
Routing path error
⇦int Error code
Routing path complete
⇦Object Data
Geolocation request
Can prevent default behavior by return false from handler functions
Connection error
⇦string Source
Map is ready to use
Map is going to resized
Can prevent default behavior by return false from handler functions
Map has been resized
Map has been repainted
Zoom level changed
⇦Point Pivot of zoom
Zoom range changed
Location animation begin
⇦Location Target location
Location changed
Map enter or exit fullsceen
⇦bool Is fullscreen
Map rotated
Suggest result is ready
⇦Object Result
Search result is ready
⇦Object Result
Address result is ready
⇦Object Result
Nearby POI result is ready
⇦Object Result
Clear measure line
Context menu is going to appear
Can prevent default behavior by return false from handler functions
⇦MenuEvent Menu event
Context menu is appeared
User click or tap on the map
⇦Point Click point
User double click or tap on the map
⇦Point Click point
User scroll mouse wheel
⇦Point Wheel point with direction
User pinch the map
⇦Point Pinch point
User stop pinch the map
User drag the map
Can prevent default behavior by return false from handler functions
⇦Point Offset
User stop drag the map
Can prevent default behavior by return false from handler functions
No input from user, no animation and no tile are loaded
Layer changed
⇦Layer Change layer
All visible tile are start or finish to load
⇦string 'start' or 'finish'
Overlay changed
⇦Overlay The changed overlay
User select a overlay
⇦Overlay The selected overlay
User click a overlay
Can prevent default behavior by return false
⇦Overlay The clicked overlay
Predefined overlays are ready
⇦Object The overlays data
User drag a overlay
⇦Overlay The dragged overlay
User drop a overlay
⇦Overlay The dropped overlay
Mouse hover over a overlay
⇦Overlay The hovered overlay
Mouse leave a overlay
⇦Overlay The leaved overlay
Path animation end
⇦Overlay The Animated overlay
A popup is going to load it's detail
Can prevent default behavior by return false from handler functions
⇦Popup The popup
Routing guide error
⇦int Error code
Routing guide complete
⇦Object[] Guide list
Routing path error
⇦int Error code
Routing path complete
⇦Object Data
Geolocation request
Can prevent default behavior by return false from handler functions
Connection error
⇦string Source
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
sphere streets base layer
sphere satellite/aerial base layer
sphere satellite/aerial 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
Longdo vector standard external layer
Longdo vector OSM external layer
Longdo vector traffic external layer
byName(name)
Get layer by name
@param {string) name Layer name
⇦Layer Layer
placeholder(value)
Access placeholder element
Getter
⇦Element Current placeholder
Setter
⎆Element value: New placeholder
⇦this Self
enableContextMenu()
Enable routing menu in context menu
⇦this Self
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
⎆string type: Line type
⇦GeometryOptions Current options
Setter
⎆string type: Line type
⎆GeometryOptions value: New options
⇦this Self
auto(state)
Access auto update setting
Getter
⇦bool Current state
Setter
⎆bool state: New state
⇦this Self
mode(value)
Access search mode
Getter
⇦RouteMode Current mode
Setter
⎆RouteMode value: New mode
⇦this Self
enableRoute(routeType, state)
Enable type of route
Getter
⎆RouteType routeType: Route type
⇦bool Current state
Setter
⎆RouteType routeType: Route type
⎆bool state: New state
⇦this Self
enableRestrict(routeRestrict, state)
Enable vehicle restriction
Getter
⎆RouteRestrict routeRestrict: Restrict vehicle
⇦bool Current state
Setter
⎆RouteRestrict routeRestrict: Restrict vehicle
⎆bool state: New state
⇦this Self
time(value)
Access search time
Getter
⇦Date Current time
Setter
⎆Date value: New time
⇦this Self
modeOf(index, value)
Access search mode of each destination
Getter
⎆int index: Index
⇦RouteMode Current search mode of each destination
Setter
⎆int index: Index
⎆RouteMode value: New mode
⇦this Self
useStopMarker(state)
Use stop marker for last destination
Getter
⇦bool Current state
Setter
⎆bool state: New state
⇦this Self
usePoiName(state)
Use near by POI name as destination in the guide
This function don't change current guide
Getter
⇦bool Current state
Setter
⎆bool state: New state
⇦this Self
useCumulativeDistance(state)
Use cumulative distance
This function don't change current guide
Getter
⇦bool Current state
Setter
⎆bool state: New state
⇦this Self
showUnknownRoad(state)
Show unknown road in guide
This function don't change current guide
Getter
⇦bool Current state
Setter
⎆bool state: New state
⇦this Self
label(value)
Access label mode
Getter
⇦RouteLabel Current mode
Setter
⎆RouteLabel value: New mode
⇦this Self
add(destination, mode)
Add a destination to this route
⎆Marker|Location destination: Destination
⇦this Self
insert(index, destination, mode)
Insert a destination to this route
⎆int index: Index
⎆Marker|Location destination: Destination
⇦this Self
remove(destination)
Remove a destination from this route
⎆Marker destination: Destination
⇦this Self
removeAt(index)
Remove destination at the index
⎆int index: Destination index
⇦this Self
clearDestination()
Clear all destinations
⇦this Self
clearPath()
Clear all paths
⇦this Self
clear()
Clear everything
⇦this Self
list()
List destination in this route
⇦Marker[] List of destinations
size()
Number of destinations in this route
⇦int Size
reverse()
Reverse the direction of route
⇦this Self
search()
Search the route
Bind guideComplete, guideError, pathComplete, pathError event to get notify
⇦this Self
distance(format)
Distance of the route
⎆bool format: With format
⇦int|string Distance
interval(format)
Time to travel through the route
⎆bool format: With format
⇦int|string Interval
guide(format)
Guide for travel through the route
⎆bool format: With format
⇦Object[]|Element Guide
exportRouteLine(options)
Export route line as a single polyline
⌥GeometryOptions options: Extra options
(
Default:
Default value)
⇦Polyline Geometry overlay
nextGuide()
Show next guide
⇦this Self
append(element, childName, propertyMap)
Create and append content to an element
⎆Element element: Parent element
⎆string childName: Type of element to be created
⌥Object propertyMap: New element property
(
Default:
no property)
⇦Element Newly created element
prepend(element, childName, propertyMap, beforeElement)
Create and prepend content to an element
⎆Element element: Parent element
⎆string childName: Type of element to be created
⌥Object propertyMap: New element property
(
Default:
no property)
⌥Element beforeElement: Insert content before this element
(
Default:
First child of the element)
⇦Element Newly created element
empty(element)
Remove all children from an element
⎆Element element: Parent element
⇦Element Empty element
addClass(element, className)
Add class to an element
⎆Element element: Element
⎆string className: Class
⇦Element Element with added class
removeClass(element, className)
Remove class from an element
⎆Element element: Element
⎆string className: Class
⇦Element Element without removed class
hasClass(element, className)
Check if an element has the specified class
⎆Element element: Element
⎆string className: Class
⇦bool Has class
transformOrigin(element, origin)
Set transform origin of the element
⎆Element element: Element
⎆Point origin: Origin
transform(element, mode, value, offset)
Scale element
⎆Element element: Element
⎆string mode: Transform mode
⎆number value: value
⎆Point offset: Translation offset
translate(element, offset)
Translate element
⎆Element element: Element
⎆Point offset: Translation offset
transition(element, state)
Animate or stop an element
⎆Element element: Element
⎆bool state: State
transitionEnd(element, callback)
Add animation end callback to an element
⎆Element element: Element
⌥delegate callback: Callback function(event: Event): void
(
Default:
no callback)
loadStyle(url, media)
Load an additional stylesheet
⎆string url: Stylesheet URL
⌥string media: Media
(
Default:
all)
loadScript(url, callback)
Load an additional script
⎆string url: Script URL
⌥delegate callback: Callback function(isLoad: bool): void
(
Default:
no callback)
getJson(url, callback)
Load JSON with GET request
⎆string url: Service URL
⌥delegate callback: Callback function(data: Object): void
(
Default:
no callback)
⇦XMLHttpRequest The request
isHD()
Check if display device has high pixel density or not
⇦int HD level
stripTag(html)
Strip HTML tag
⎆string html: HTML text
⇦string Plain text
validateLocation(location)
Validate the location
⎆Location location: Location in degree
⇦bool Is location valid
boundOfTile(projection, tile)
Find bounding box of the tile in target projection
⎆Projections projection: Projection
⎆Tile tile: Tile
⇦Bound Bounding box
centerOfBound(bound)
Find center of the bounding box
⎆Bound Bounding: box
⇦Location Center location
sizeOfBound(bound)
Find size of the bounding box
⎆Bound Bounding: box
⇦Size Size in degree
polylinePivot(locationList)
Find a location to represent the polyline
⎆Location[] locationList: List of polyline vertices
⇦Location Pivot Location
locationBound(locationList)
Find bounding box of the list of locations
⎆Location[] locationList: List of locations
⇦Bound Bounding box
averageLocation(projection, location1, location2)
Find midpoint of the given locations in target projection
⎆Projections projection: Projection
⎆Location location1: Location 1 in degree
⎆Location location2: Location 2 in degree
⇦Location Location mean
distance(locationList, language)
Find distance of the polyline
Using haversine formula
⎆Location[] locationList: List of polyline vertices
⌥string language: Language in ISO 639-1
(
Default:
neutral)
⇦float|string Distance in metre or formatted text if provided language
area(locationList, language)
Find approximate area of the polygon
⎆Location[] locationList: List of polygon vertices
⌥string language: Language in ISO 639-1
(
Default:
neutral)
⇦float|string Area 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
⌥string language: Language in ISO 639-1
(
Default:
neutral)
⇦float|string Area 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
⎆Location point: The point
⎆Location[] locationList: List of polygon vertices
⇦bool Is point in polygon, return null if overlay is exactly on polygon's edge
translateGeom(locationList, vector)
Translate geometry
⎆Location[] locationList: List of geometry vertices
⎆Location vector: Distance to shift
⇦Location[] List of translated geometry vertices
rotateGeom(locationList, pivot, angle)
Rotate geometry
⎆Location[] locationList: List of geometry vertices
⎆Location pivot: Pivot point
⎆number angle: 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
⎆number lat: Latitude
⇦number Length in metre
latitudeLength(lat)
Find length of a degree of latitude at the given Latitude
Using fourier series
⎆number lat: Latitude
⇦number Length in metre
sameLocation(a, b)
Check if the given locations are equal
⎆Location a: First location
⎆Location b: Second location
⇦bool Is same location
overlayFromWkt(wkt, options, forceType)
Create overlay from well-known text
⎆string wkt: Well-known text
⌥GeometryOptions options: Extra options
(
Default:
Default value)
⎆Polyline forceType: Force geometry type
⇦Polyline[] Geometry overlays
overlayToWkt(overlayList)
Export overlay to well-known text
⎆Polyline[] overlayList: List of homogeneous geometries
⇦string Well-known text
overlayFromGeoJSON(geo, options)
Create overlay from GeoJSON
⎆Object geo: GeoJSON Object
⌥GeometryOptions options: Extra options
(
Default:
Default value)
⇦Polyline[] Geometry overlays
overlayToGeoJSON(overlayList)
Export overlay to GeoJSON
⎆Polyline[] overlayList: List of homogeneous geometries
⇦Object GeoJSON
locationToDMS(location)
Convert decimal degrees location to degrees minutes seconds
⎆Location location: Location in degree
⇦Object degrees minutes seconds version of location
locationToUTMZone(location)
Find UTM zone from the Location
This function ignore special zone
⎆Location location: Location in degree
⇦Object UTM zone and hemisphere or null if location is outside zone
locationToGeohash(location, precision)
Find Geohash from the Location
⎆Location location: Location in degree
@param {int} precision
⇦String Geohash
boundOfGeohash(geohash)
Find bounding box of the geohash
⎆String geohash: Geohash
⇦Bound Bounding box
isInRange(value, range)
Check if the value is in the range
⎆int value: Value
⎆Range range: Range
⇦bool Is value inside range
isAbsInRange(value, range)
Check if absolute of the value is in the range
⎆int value: Value
⎆int range: Range
⇦bool Is Absolute value inside range
bound(value, min, max)
Limit value to the bound
⎆int value: Value
⎆int min: Lower bound
⎆int max: Upper bound
⇦int Bounded value
boundAngle(value)
Limit angle to 0 - 360
⎆number value: Angle in degree
⇦number Bounded angle
lastItem(array)
Get last item in the array
⎆Object[] array: Array
⇦Object Last item in array
pushOrder(array, item, comparator)
Push new item to sorted array
⎆Object[] array: Sorted array
⎆Object item: New item
⎆delegate comparator: Comparator function(a: Object, b: Object): int
⇦int insert position
capFirst(string)
Capitalise first letter of the string
⎆string string: String
⇦string Formatted string
formatDate(date, language)
Format the given date
⎆string date: Date string
⎆string language: Language in ISO 639-1
⇦string Formatted date string
formatTime(time)
Format the given time
⎆string time: Time string
⇦string Formatted time string
formatDateTimeRange(startDatetime, stopDatetime, language)
Format the given datetime range
⎆string startDatetime: Start datetime string
⎆string stopDatetime: Stop datetime string
⎆string language: Language in ISO 639-1
⇦string Formatted datetime range string
formatInterval(interval, language)
Format the given time interval
⎆number interval: Time interval in second
⎆string language: Language in ISO 639-1
⇦string Formatted interval string
formatDistance(distance, language)
Format the given distance
⎆number distance: Distance in metre
⎆string language: Language in ISO 639-1
⇦string Formatted distance string
formatArea(area, language)
Format the given area
⎆number area: Area in square metre
⎆string language: Language in ISO 639-1
⇦string Formatted area string
formatThaiArea(area, language)
Format the given area to Thai unit
⎆number area: Area in square metre
⎆string language: Language in ISO 639-1
⇦string Formatted area string in thai unit
numberWithCommas(number)
Add thousands separator to the number
⎆int|string number: Number
⇦string Number string with commas
hexToRgba(color)
Convert hexadecimal color notation to RGBA
⎆string color: Hexadecimal color notation
⇦string Equivalent RGBA color notation