GISTDA sphere API Reference
MapOptions
Anonymous type for Map options

OPTLayer layer: Initial layer   (Default: Layers.NORMAL)
OPTnumber zoom: Initial zoom   (Default: 7)
OPTRange zoomRange: Initial zoom range   (Default: Every zoom)
OPTLocation location: Initial location   (Default: Bangkok)
OPTElement placeholder: Placeholder element   (Default: No UI)
OPTUiComponent ui: Show default UI   (Default: Fit screen size)
OPTbool input: Allow input from user   (Default: true)
OPTbool lastView: Load last location/zoom from local storage if exist   (Default: true)
OPTstring language: Language in ISO 639-1 format   (Default: th)

See Also:maplibre.org/maplibre-gl-js-docs/api/map/#map-parameters
For accept maplibre options
^top
LayerOptions
Anonymous type for Layer options

OPTLayerType type: Type of layer   (Default: Vector)

All raster type
OPTURL url: Tile server URL   (Default: sphere tile server)
OPTRange zoomRange: Visible range   (Default: Every zoom)
OPTRange source: Avaliable tile range   (Default: Every zoom)
OPTnumber opacity: Layer opacity   (Default: 1)
OPTint zIndex: Layer with higher z-index will show over one with lower z-index   (Default: 0)
OPTBound bound: Only tile in this bounding box will be shown   (Default: World)
OPTstring attribution: Attribution   (Default: No attribution)
OPTstring extraQuery: Extra query string   (Default: No extra query)
OPTstring id: Specify unique layer id   (Default: Layer name)

WMS & WMTS(KVP) type specific options
OPTstring format: MIME type   (Default: image/png)
OPTstring srs: WMS's spatial reference system or WMTS's tile matrix set   (Default: EPSG:3857)
OPTstring tileMatrixPrefix: WMTS's part of tile matrix before zoom level   (Default: No prefix)
OPTstring styles: Styles   (Default: Default)
OPTstring version: WMS version   (Default: 1.1.1)

WMTS(RESTful) type specific options
OPTstring format: image extension   (Default: png)
OPTstring srs: Tile matrix set   (Default: EPSG:3857)
OPTstring styles: Styles   (Default: Default)

TMS & XYZ type specific options
OPTstring format: image extension   (Default: png)
OPTstring srs: Spatial reference system   (Default: Default)
^top
MarkerOptions
Anonymous type for Marker options

OPTIcon icon: Icon   (Default: A certain red pin)
OPTHTML title: Show title when hover   (Default: No title)
OPTHTML detail: Show detail when click   (Default: No detail)
OPTPopupOptions popup: Show popup when click, override detail parameter   (Default: None)
OPTRange visibleRange: Visible range   (Default: Every zoom)
OPTbool clickable: Change cursor when hover   (Default: false)
OPTbool draggable: Allow user to drag this marker   (Default: false)
OPTnumber zIndex: Z height   (Default: 0)
OPTnumber rotate: Rotation angle in degree, clockwise   (Default: 0)

See Also:maplibre.org/maplibre-gl-js-docs/api/markers/#marker-parameters
For accept maplibre options (HTML icon only)
^top
PopupOptions
Anonymous type for Popup options

OPTHTML title: Title   (Default: No title)
OPTHTML detail: Detail   (Default: No detail)
OPTdelegate loadDetail: Set detail function(element: Element): void   (Default: Load nothing)
OPTHTML html: Custom content, override detail parameter   (Default: As detail)
OPTdelegate loadHtml: Set custom content function(element: Element): void   (Default: Load nothing)
OPTSize size: Size   (Default: Auto)
OPTbool closable: Show close button   (Default: true)

See Also:maplibre.org/maplibre-gl-js-docs/api/markers/#popup-parameters
For accept maplibre options
^top
GeometryOptions
Anonymous type for Polyline and it subclasses options

OPTHTML title: Show title when hover   (Default: No title)
OPTHTML detail: Show detail when click   (Default: No detail)
OPTHTML label: Show label at pivot   (Default: No detail)
OPTMarkerOptions labelOptions: Show marker at pivot, override label parameter   (Default: Visible range of geometry)
OPTPopupOptions popup: Show popup when click, override detail parameter   (Default: None)
OPTRange visibleRange: Visible range   (Default: Every zoom)
OPTint lineWidth: Line width   (Default: 3)
OPTCSSColor lineColor: Line color   (Default: Preset color list)
OPTCSSColor fillColor: Fill color   (Default: Preset color list)
OPTLineStyle lineStyle: Line style   (Default: LineStyle.Solid)
OPTLocation|delegate pivot: Label location and rotation pivot   (Default: Center of geometry)
OPTbool clickable: Change cursor when hover   (Default: false)
OPTbool draggable: Allow user to drag this geometry   (Default: false)
OPTbool pointer: Show draggable pointer when hover this geometry   (Default: false)
OPTnumber zIndex: Z height   (Default: 0)
^top
ObjectOptions
Anonymous type for Overlays.Object options

OPTnumber simplify: Simplify object, automatic value is around 0.00005 (fine) - 0.001 (rough)   (Default: automatic)
OPTbool combine: Combine multiple objects into one   (Default: false)
OPTbool ignorefragment: Don't load small part of object   (Default: false)
^top
Anonymous type for MenuBar options

REQMenuItem[] button: List of buttons
OPTdelegate change: Handler function(currentMenuItem: Object, lastMenuItem: Object): void that called when user change menu   (Default: No handler)
^top
Anonymous type for store menu item

REQstring label: Label
OPTstring value: Value   (Default: Same as label)
OPTButtonType type: Item type   (Default: ButtonType.Radio)
^top
SearchUiOptions
Anonymous type for Search.placeholder options

OPTIcon|boolean icon: Icon, set to false to search without marker   (Default: A certain red pin)
^top
SuggestOptions
Anonymous type for Search.suggest options

OPTstring area: Geocode of search area   (Default: Any area)
OPTint offset: Offset of the first result returned   (Default: 0)
OPTint limit: Number of results returned   (Default: 10)
OPTstring dataset: Search dataset   (Default: Default data)
^top
SearchOptions
Anonymous type for Search.search options

OPTstring area: Geocode of search area   (Default: Any area)
OPTstring tag: Tag   (Default: Any tag)
OPTstring span: Span with unit in deg, m or km   (Default: Anywhere)
OPTint offset: Offset of the first result returned   (Default: 0)
OPTint limit: Number of results returned   (Default: 20)
OPTstring dataset: Search dataset   (Default: Default data)
^top
AddressOptions
Anonymous type for Search.address options

OPTint limit: Limit the number of results when search with street address   (Default: 5)
OPTstring dataset: Dataset when search with street address   (Default: Default data)
^top
NearPoiOptions
Anonymous type for Search.nearPoi options

OPTnumber span: Span in degree   (Default: Optimal span)
OPTint zoom: Maximum POI zoom level   (Default: All zoom)
OPTint limit: Limit the number of results   (Default: 10)
^top
TagOptions
Anonymous type for TagCollection options

OPTURL source: Tag server URL   (Default: sphere tag server)
OPTTagType type: Tag type   (Default: Default server)
OPTIcon|string icon: Icon or big/small keyword for default icons with bigger/smaller size, can't use HTML icon   (Default: Default icons)
OPTRange visibleRange: Visible range   (Default: Every zoom)
OPTRange label: Label visible range   (Default: None)
OPTstring area: Geocode of tag area (for default server)   (Default: Any area)
OPTstring dataset: Tag dataset (for default server)   (Default: Default data)

WFS/OGC type specific options
REQstring name: Data name
OPTstring extraQuery: Extra query string   (Default: No extra query)
OPTstring version: WFS version   (Default: 2.0.0)
^top
Location
Anonymous type for store location

REQnumber lon: Longitude in decimal degrees
REQnumber lat: Latitude in decimal degrees
^top
Point
Anonymous type for store 2D point

REQint x: X-axis value
REQint y: Y-axis value
^top
Range
Anonymous type for store range

REQnumber min: Mininum value (inclusive)
REQnumber max: Maximun value (inclusive)
^top
Bound
Anonymous type for store bounding box

REQnumber minLon: Mininum longitude (inclusive)
REQnumber minLat: Mininum latitude (inclusive)
REQnumber maxLon: Maxinum longitude (inclusive)
REQnumber maxLat: Maxinum latitude (inclusive)
^top
Icon
Anonymous type for store icon

REQURL url: Icon image URL
REQURL urlHD: Icon image URL for high density display
REQHTML html: Custom icon code, override url parameter
OPTPoint offset: Icon offset   (Default: Center of icon)
OPTSize size: Icon size   (Default: Image size)
^top
Tile
Anonymous type for store tile

REQint x: X-axis tile number
REQint y: Y-axis tile number
REQint z: Zoom level
^top
Size
Anonymous type for store size

REQint width: width
REQint height: height
^top
beforeContextmenu event
Property List
Method List
Context menu location
Add element to menu

REQElement|HTML element: Element
^top
EventName
Event name enumeration

Static class
Property List
Ready
Map is ready to use
Resize
Map has been resized
Repaint
Map has been repainted manuallly
Zoom
Zoom level changed
ZoomRange
Zoom range changed
Location
Location changed
Fullscreen
Map enter or exit fullsceen

RETbool Is fullscreen
Rotate
Map rotated
Pitch
Map pitch changed
ToolbarChange
Toolbar mode changed

RETstring Mode
DrawCreate
Features are created

RETGeoJSON[] Features that were created
DrawDelete
Features are deleted

RETGeoJSON[] Features that were deleted
TooltipChange
Map tooltip changed

RETstring Message
BeforeContextmenu
Context menu is going to appear
Can prevent default behavior by return false from handler functions

RETMenuEvent Menu event
Contextmenu
Context menu is appeared
Mousemove
User move mouse (without drag)

RETPoint|Location Cursor point
Click
User click or tap on the map

RETPoint|Location Click point
DoubleClick
User double click or tap on the map

RETPoint|Location Click point
Wheel
User scroll mouse wheel

RETPoint Wheel point with direction
Drag
User drag the map
Drop
User stop drag the map
Idle
No input from user, no animation and no tile are loaded
LayerChange
Layer changed

RETLayer The added layer
RETLayer The removed layer
TileLoading
Tiles are loading

RETstring Layer name
TileLoaded
Tiles are loaded

RETstring Layer name
OverlayChange
Overlay changed

RETOverlay The changed overlay
OverlayUpdate
Overlay updated

RETOverlay The updated overlay
OverlayClick
User click a overlay

RETOverlay The clicked overlay
OverlayLoad
Predefined overlays are ready

RETObject The overlays data
OverlayDrag
User drag a overlay

RETOverlay The dragged overlay
OverlayDrop
User drop a overlay

RETOverlay The dropped overlay
OverlayHover
Mouse hover over a overlay

RETOverlay The hovered overlay
OverlayLeave
Mouse leave a overlay

RETOverlay The leaved overlay
PopupClose
A popup is closed

RETPopup The closed popup
RouteError
Routing guide error

RETint Error code
RouteComplete
Routing guide complete

RETObject[] Route list
Error
Error occurs

RETObject Error message
^top
Event
Event class

See Also:Map.Event
Method List
bind(eventName, handler)
Attach a handler to target event

REQEventName eventName: Name of event
REQdelegate handler: Handler function(eventData: Object): void|bool
RETthis Self
unbind(eventName, handler)
Remove a handler from target event

REQEventName eventName: Name of event
REQdelegate handler: Handler function
RETthis Self
^top
LineStyle
Line style enumeration

Static class
Property List
Solid
Solid style
Dashed
Dashed style
Dot
Dot style
^top
Polylineextends Overlay
Polyline class

REQLocation[]|GeoJSON locationList: List of locations represent the line or GeoJSON Feature/LineString
OPTGeometryOptions options: Extra options   (Default: Default value)
Method List
popup()
Get popup

RETPopup Popup of this geometry
pop(mode, location)
Show or hide popup of this geometry

OPTbool mode: Show or hide   (Default: toggle)
OPTLocation location: Location of popup   (Default: pivot)
RETthis Self
pivot()
Get a point on this geometry

RETLocation Pivot location
centroid()
Find geometric center of this geometry

RETLocation Centroid location
bound()
Find bounding box of this geometry

RETBound bounding box
update(newOptions)
Update this geometry options
Only lineWidth, lineColor, fillColor and lineStyle are support

REQGeometryOptions newOptions: New options value
RETthis Self
rotate(angle)
Rotate this geometry

REQnumber angle: Angle to rotate in degree, clockwise from north
RETthis Self
size(language)
Length of this geometry

OPTstring language: ISO 639-1 language code   (Default: neutral)
RETnumber|string Length in meters or formatted text if provided language
^top
Polygonextends Polyline
Polygon class

REQLocation[]|GeoJSON locationList: List of locations represent the polygon or GeoJSON Feature/Polygon
OPTGeometryOptions options: Extra options   (Default: Default value)
Method List
union(overlay, options)
Combined this polygon with another polygon

REQPolygon overlay: Another polygon
OPTGeometryOptions options: Extra options   (Default: Default value)
RETPolygon Union polygon
intersection(overlay, options)
Finds intersection of this polygon and another polygon

REQPolygon overlay: Another polygon
OPTGeometryOptions options: Extra options   (Default: Default value)
RETPolygon Intersected polygon
difference(overlay, options)
Clipping this polygon by another polygon

REQPolygon overlay: Another polygon
OPTGeometryOptions options: Extra options   (Default: Default value)
RETPolygon Differenced polygon
split(splitter, options)
Split this polygon by another polygon

REQPolygon splitter: Splitter
OPTGeometryOptions options: Extra options   (Default: Default value)
RETPolygon[] List of split polygons
^top
Circleextends Polyline
Circle class

REQLocation|GeoJSON location: Circle center or GeoJSON Feature/Point
REQnumber radius: Circle radius in degree
OPTGeometryOptions options: Extra options   (Default: Default value)
Method List
radius(language)
Radius of this circle

OPTstring language: ISO 639-1 language code   (Default: neutral)
RETnumber|string Radius in meters or formatted text if provided language
^top
Dotextends Polyline
Dot class

REQLocation|GeoJSON location: Dot location or GeoJSON Feature/Point
OPTGeometryOptions options: Extra options   (Default: Default value)
Method List
^top
Rectangleextends Polygon
Rectangle class

REQLocation location: Top-left location
REQSize|Location size: Size in degree or bottom-right location
OPTGeometryOptions options: Extra options   (Default: Default value)
Method List
^top
LayerType
Layer type enumeration

Static class
Property List
Vector
Mapbox Vector Tiles type (default)
XYZ
XYZ Tiles type
WMS
Web Map Service type
WMTS
Web Map Tile Service (key-value-pairs encoding) type
WMTS_REST
Web Map Tile Service (RESTful encoding) type
TMS
Tile Map Service type
^top
Layer
Layer class

REQstring name: Name of raster layer or style of vector layer
OPTLayerOptions options: Extra options   (Default: Default value)
^top
Layers
Layer list singleton class

Static class
Property List
SIMPLE
Low-complexity base layer
STREETS
Standard base layer
HYBRID
Satellite/Aerial/Streets hybrid base layer
TRAFFIC
Traffic non-base layer, auto-refresh every 3 minutes
IMAGES
Satellite/Aerial base layer
^top
LayerCollection
LayerCollection class

See Also:Map.Layers
Method List
language(value)
Access language of base layer in ISO 639-1 language code
Support only built-in layers

Getter
RETstring Current language

Setter
REQstring value: New language
RETthis Self
setBase(layer)
Set the base layer of the map

REQLayer|deck.MapboxLayer|Object|String layer: Base layer, deck.gl layer, MapLibre Style Specification object or a URL to such JSON
RETthis Self
add(layer, beforeId)
Add a non-base layer to the map

REQLayer|deck.MapboxLayer|Object layer: Non-base layer, deck.gl layer or MapLibre Style Specification's layer object
OPTstring beforeId: ID of an existing layer to add the new layer before   (Default: Symbol layer)
RETthis Self
remove(layer)
Remove a non-base layer from the map

REQLayer|deck.MapboxLayer|Object layer: Non-base layer, deck.gl layer or MapLibre Style Specification's layer object
RETthis Self
clear()
Remove all non-base layers from the map

RETthis Self
list()
List all layers on the map

RETObject[] List of layers on the map
size()
Number of layers on the map

RETint Number of layers
^top
Filter
Color filter enumeration

Static class
Property List
Dark
Dark map and UI color
Light
Lighter map color
None
No filter
^top
Map
Map class

OPTMapOptions options: Extra options   (Default: Default value)
Property List
Method List
Event
Event

See Also:Event
Layers
Layers

See Also:LayerCollection
Overlays
Overlays

See Also:OverlayCollection
Ui
UI

See Also:UiCollection
Search
Search

See Also:Search
Tags
Tags

See Also:TagCollection
Route
Route

See Also:Route
id()
Get unique id

RETint ID
resize()
Resize the map

RETthis Self
repaint()
Repaint the map

RETthis Self
placeholder()
Get the map's placeholder element

RETElement Placeholder
zoom(value, animate)
Access the map's zoom level

Getter
RETnumber Current zoom

Setter
REQnumber|bool value: New zoom or direction
OPTbool animate: Show animation   (Default: true)
RETthis Self
zoomRange(value)
Access the map's allow zoom range

Getter
RETRange Current zoom range

Setter
REQRange value: New zoom range
RETthis Self
location(value, animate)
Access the map's center location

Getter
RETLocation Current location

Setter
REQLocation value: New location
OPTbool animate: Show animation   (Default: true)
RETthis Self
bound(value, options)
Access bounding box of the map's visible area

Getter
RETBound Current bounding box

Setter
REQBound value: New bounding box
OPTFitBoundsOptions options: Extra options   (Default: Default value)
OPTbool allowZoomIn: Allow zoom in to fit bounding box   (Default: yes)
RETthis Self

See Also:maplibre.org/maplibre-gl-js-docs/api/map/#map#fitbounds
For FitBoundsOptions
move(offset, animate)
Move the map by the specified offset

REQPoint offset: Offset in pixel
OPTbool animate: Show animation   (Default: true)
RETthis Self
language(value)
Access language setting for all components in ISO 639-1 language code

Getter
RETstring Current language

Setter
REQstring value: New language
RETthis Self
rotate(angle, animate)
Access the map's rotation

Getter
RETstring Current angle of map that point to top of screen, in degree, clockwise from north

Setter
REQnumber angle: Angle to rotate
OPTbool animate: Show animation   (Default: true)
RETthis Self
pitch(angle)
Access the map's pitch

Getter
RETstring Current pitch angle away from screen, in degree

Setter
REQnumber angle: Angle to pitch
RETthis Self
enableFilter(filter)
Enable color filter

Getter
RETFilter Current filter

Setter
REQFilter filter: New filter
RETthis Self
goTo(camera, animate)
Changes any combination of location, zoom, rotation, pitch, and padding

REQCameraOptions camera: Camera options
OPTbool animate: Show animation   (Default: true)
RETthis Self

See Also:maplibre.org/maplibre-gl-js-docs/api/properties/#cameraoptions
For CameraOptions
^top
Math
Math singleton class

Static class
Method List
distance(dx, dy)
Find 2D Euclidean distance from X-axis and Y-axis distance

REQint dx: X-axis distance
REQint dy: Y-axis distance
RETnumber 2D Distance
closestPointOnLine(x, y, x1, y1, x2, y2)
Find closest point on a line from a point

REQint x: Point's X
REQint y: Point's Y
REQint x1: Begin of line's X
REQint y1: Begin of line's Y
REQint x2: End of line's X
REQint y2: End of line's Y
RETPoint Closest point
lineIntersectPoint(x1, y1, x2, y2, u1, v1, u2, v2, skipOverlap)
Find intersect points of two lines

REQint x1: Begin of first line's X
REQint y1: Begin of first line's Y
REQint x2: End of first line's X
REQint y2: End of first line's Y
REQint u1: Begin of second line's X
REQint v1: Begin of second line's Y
REQint u2: End of second line's X
REQint v2: End of second line's Y
RETPoint|int[] Intersect point or location of intersect points or null
^top
ObjectLabel
Object label enumeration

Static class
Property List
Title
Use title flag
^top
Overlay
Overlay class
The root of all overlays
Method List
location(geojson, animate)
Access location

Getter
RETLocation|Location[] Overlay location

Setter
REQLocation|Location[]|GeoJSON geojson: New location or GeoJSON Feature/geometry
OPTbool animate: Show moving animation   (Default: false)
visibleRange()
Get visible range

RETRange Visible range
active()
Check if this overlay is added to the map

RETbool Is active
element(render)
Get element on the map if exists

RETElement HTML element
shift(vector)
Move this overlay by distance

REQLocation vector: Distance to move
RETthis Self
distance(overlay, language)
Minimum geodesic distance to the overlay

REQLocation|Overlay overlay: Location or Overlay
OPTstring language: ISO 639-1 language code   (Default: neutral)
RETnumber|string Distance in meters or formatted text if provided language
intersects(overlay)
Tests if both overlays share any space

REQLocation|Overlay overlay: Location or Overlay
RETbool Is overlays intersects
contains(overlay)
Tests if the overlay is inside this overlay

REQLocation|Overlay overlay: Location or Overlay
RETbool Is the overlay inside
within(overlay)
Tests if this overlay is inside the overlay

REQLocation|Overlay overlay: Location or Overlay
RETbool Is this overlay inside
toJSON(key)
Convert this overlay to GeoJSON

RETGeoJSON GeoJSON
^top
Markerextends Overlay
Marker class

REQLocation|GeoJSON location: Marker location
OPTMarkerOptions options: Extra options   (Default: Default value)
Method List
popup()
Get popup

RETPopup Popup of this overlay
pop(mode)
Show or hide popup of this overlay

OPTbool mode: Show or hide   (Default: toggle)
RETthis Self
update(newOptions)
Update overlay options
Only draggable and rotate are support

REQMarkerOptions newOptions: New options value
RETthis Self
^top
Popup class

REQLocation|GeoJSON location: Popup location
OPTPopupOptions options: Extra options   (Default: Default value)
Method List
title(value)
Access title of this popup
Not support custom popup

Getter
RETElement Title

Setter
REQHTML value: New title
RETthis Self
detail(value)
Access detail of this popup
Not support custom popup

Getter
RETElement Detail

Setter
REQHTML value: New detail
RETthis Self
^top
Overlays
Predefined overlay singleton class

Static class
Property List
cameras
Cameras overlay

OPTbool popup: Enable popup   (Default: true)
OPTbool motion: Enable motion camera   (Default: true)
events
Events overlay

OPTbool popup: Enable popup   (Default: true)
aqi
Thai AQI overlay

OPTbool popup: Enable popup   (Default: true)
Object
Predefined object overlay class

REQstring id: Object ID
OPTstring dataset: Object dataset   (Default: Default data)
OPTObject options: Extra options   (Default: Default options value)
^top
OverlayCollection
OverlayCollection class

See Also:Map.Overlays
Method List
add(overlay)
Add an overlay to the map

REQOverlay overlay: Overlay
RETthis Self
remove(overlay)
Remove an overlay from the map

REQOverlay overlay: Overlay
RETthis Self
load(mode)
Load predefined overlays and add to the map

REQOverlays mode: Predefined overlays
RETthis Self
unload(mode)
Remove predefined overlays from the map

REQOverlays mode: Predefined overlays
RETthis Self
clear()
Remove all overlays from the map

RETthis Self
list()
List all overlays on the map

RETOverlay[] List of overlays
size()
Number of overlays on the map

RETint Size
lastOpenPopup()
Get the last open popup

RETPopup Last open popup
^top
RouteLine
Route line enumeration

Static class
Property List
Destination
Line from destination to nearest road
Road
Road
Ferry
Ferry
Focus
Highlight when hover
^top
RouteMode
Route mode enumeration

Static class
Property List
Traffic
Driving via fastest route, avoid traffic jam with real-time and predicted data
Cost
Driving via fastest route
Distance
Driving via shortest route
Fly
Fly directly to destination with superluminal speed
^top
RouteType
Route type enumeration

Static class
Property List
Road
Road
Ferry
Ferry
Tollway
Tollway
All
All
^top
RouteLabel
Route label enumeration

Static class
Property List
Distance
Show distance
Time
Show time
Hide
Hide
^top
Route
Route class

See Also:Map.Route
Method List
language(value)
Access language setting in ISO 639-1 language code

Getter
RETstring Current language

Setter
REQstring value: New language
RETthis Self
placeholder(value)
Access placeholder element

Getter
RETElement Current placeholder

Setter
REQElement value: New placeholder
RETthis Self
enableContextMenu()
Enable routing menu in context menu

RETthis Self
line(type, value)
Access route line options

Getter
REQRouteLine type: Line type
RETGeometryOptions Current options

Setter
REQRouteLine type: Line type
REQGeometryOptions value: New options
RETthis Self
auto(state)
Access auto update setting

Getter
RETbool Current state

Setter
REQbool state: New state
RETthis Self
mode(value)
Access search mode

Getter
RETRouteMode Current mode

Setter
REQRouteMode value: New mode
RETthis Self
modeOf(index, value)
Access search mode of each destination

Getter
REQint index: Index
RETRouteMode Current search mode of each destination

Setter
REQint index: Index
REQRouteMode value: New mode
RETthis Self
enableRoute(routeType, state)
Enable type of route

Getter
REQRouteType routeType: Route type
RETbool Current state

Setter
REQRouteType routeType: Route type
REQbool state: New state
RETthis Self
label(value)
Access label mode

Getter
RETRouteLabel Current mode

Setter
REQRouteLabel value: New mode
RETthis Self
add(destination, mode)
Add a destination to the route

REQMarker|Location destination: Destination
RETthis Self
insert(index, destination, mode)
Insert a destination to the route

REQint index: Index
REQMarker|Location destination: Destination
RETthis Self
remove(destination)
Remove a destination from the route

REQMarker destination: Destination
RETthis Self
removeAt(index)
Remove destination by index

REQint index: Destination's index
RETthis Self
clearDestination()
Remove all destinations

RETthis Self
clearPath()
Remove all paths

RETthis Self
clear()
Remove the route

RETthis Self
list()
List all destinations in the route

RETMarker[] List of destinations
size()
Number of destinations in the route

RETint Size
reverse()
Reverse direction of the route

RETthis Self
search()
Calulate the route

RETthis Self
distance(format)
Distance of the route

REQbool format: With format
RETint|string Distance
interval(format)
Time to travel through the route

REQbool format: With format
RETint|string Interval
guide(format)
Guide for travel through the route

REQbool format: With format
RETObject[]|Element Guide
exportRouteLine(options)
Export the route as single polyline

OPTGeometryOptions options: Extra options   (Default: Default value)
RETPolyline Line
^top
Search class

See Also:Map.Search
Method List
language(value)
Access language setting in ISO 639-1 language code

Getter
RETstring Current language

Setter
REQstring value: New language
RETthis Self
placeholder(value, options)
Access placeholder element

Getter
RETElement Current placeholder
OPTSearchUiOptions options: Extra options   (Default: Default value)

Setter
REQElement value: New placeholder
RETthis Self
suggest(keyword, options)
Request suggest data

REQstring keyword: Keyword
OPTSuggestOptions options: Extra options   (Default: Default value)
RETObject Result
Asynchronous method
search(keyword, options)
Request search data

REQstring keyword: Keyword
OPTSearchOptions options: Extra options   (Default: Default value)
RETObject Result
Asynchronous method
address(location, options)
Request address data

REQLocation location: Location
OPTAddressOptions options: Extra options   (Default: Default value)
RETObject Result
Asynchronous method
nearPoi(location, options)
Request near by POIs

REQLocation location: Location
OPTNearPoiOptions options: Extra options   (Default: Default value)
RETObject Result
Asynchronous method
clear()
Clear search results in placeholder

RETthis Self
enablePopup(state)
Enable searched POIs popup

Getter
RETbool Current state

Setter
REQbool state: New state
RETthis Self
^top
TagType
Tag type enumeration

Static class
Property List
WFS
Web Feature Service type
OGC
OGC API - Feature type (ISO 19168)
^top
TagCollection
TagCollection class

See Also:Map.Tags
Method List
language(value)
Access language setting in ISO 639-1 language code

Getter
RETstring Current language

Setter
REQstring value: New language
RETthis Self
set(tag, options)
Clear and set a tag on the map

REQstring|delegate tag: Name of tag or callback function(tile: Tile): Object[]
OPTTagOptions options: Extra options   (Default: Default value)
RETthis Self
add(tag, options)
Add a tag to the map

REQstring|delegate tag: Name of tag or callback function(tile: Tile): Object[]
OPTTagOptions options: Extra options   (Default: Default value)
RETthis Self
remove(tag)
Remove a tag from the map

REQstring tag: Name of tag
RETthis Self
clear()
Remove all tags from the map

RETthis Self
list()
List all tags on the map

RETstring[] List of tags
size()
Number of tags on the map

RETint Size
enablePopup(state)
Enable tag POIs popup

Getter
RETbool Current state

Setter
REQbool state: New state
RETthis Self
^top
CustomControl
Custom control class

REQHTML content: Content
Method List
visible(state)
Visible

Getter
RETbool Current state

Setter
REQbool state: New state
RETthis Self
^top
Menu bar class

REQMenuBarOptions options: Menu options
Method List
Select menu by index

REQinteger index: Menu index
RETthis Self
^top
ContextMenu
ContextMenu class

See Also:UiCollection.ContextMenu
Method List
enableNearPoi(state)
Enable near by POI

Getter
RETbool Current state

Setter
REQbool state: New state
RETthis Self
enableAddress(state)
Enable address

Getter
RETbool Current state

Setter
REQbool state: New state
RETthis Self
^top
UiComponent
UI component enumeration

Static class
Property List
Full
Full mode
Mobile
Mobile mode
None
No UI mode
^top
UiCollection
UiCollection class

See Also:Map.Ui
Property List
Method List
DPad
Directional pad

See Also:CustomControl
Geolocation
Geolocation button

See Also:CustomControl
Zoombar
Zoom bar

See Also:CustomControl
Toolbar
Drawing toolbar
Not show by default and not avaliable on mobile device

See Also:CustomControl
LayerSelector
Layer selector

See Also:CustomControl
Fullscreen
Fullscreen botton
Not avaliable on mobile device

See Also:CustomControl
Scale
Scale

See Also:CustomControl
ContextMenu
Context menu

See Also:ContextMenu
Keyboard
Keyboard

Method List
enable(state)
Enable keyboard input
Mouse
Mouse

Method List
enable(state)
Enable mouse input

enableClick(state)
Enable mouse click

enableDrag(state)
Enable dragging

enableWheel(state)
Enable wheel scrolling
language(value)
Access language setting in ISO 639-1 language code

Getter
RETstring Current language

Setter
REQstring value: New language
RETthis Self
add(control)
Add a control to the map

REQCustomControl control: Control object
RETthis Self
remove(control)
Remove a control from the map

REQCustomControl control: Control object
RETthis Self
^top
Util
Utility singleton class

Static class
Method List
append(element, childName, propertyMap)
Create and append content to an element

REQElement element: Parent element
REQstring childName: Type of element to be created
OPTObject propertyMap: New element's properties   (Default: no properties)
RETElement Newly created element
prepend(element, childName, propertyMap, beforeElement)
Create and prepend content to an element

REQElement element: Parent element
REQstring childName: Type of element to be created
OPTObject propertyMap: New element's properties   (Default: no properties)
OPTElement beforeElement: Insert content before this element   (Default: First child of the element)
RETElement Newly created element
empty(element)
Remove all children from an element

REQElement element: Parent element
RETElement Empty element
addClass(element, className)
Add class to an element

REQElement element: Element
REQstring className: Class to be added
RETElement Element with added class
removeClass(element, className)
Remove class from an element

REQElement element: Element
REQstring className: Class to be removed
RETElement Element without removed class
loadStyle(url, media)
Load an additional stylesheet

REQstring url: Stylesheet URL
OPTstring media: Media type   (Default: all)
loadScript(url, callback)
Load an additional script

REQstring url: Script URL
OPTdelegate callback: Callback function(isLoad: bool): void   (Default: no callback)
getJson(url, responseType)
Load JSON with GET request

REQstring url: Service URL
RETObject Response JSON
Asynchronous method
isHD()
Check if display device has high pixel density

RETint HD level
validateLocation(location)
Check if a location is valid

REQLocation location: Location
RETbool Validity of location
sameLocation(a, b)
Check if both locations are equal

REQLocation a: First location
REQLocation b: Second location
RETbool Equlity of location
longitudeLength(lat)
Find length of a degree of longitude at the given latitude
Algorithm: fourier series

REQnumber lat: Latitude
RETnumber Length in meters
latitudeLength(lat)
Find length of a degree of latitude at the given latitude
Algorithm: fourier series

REQnumber lat: Latitude
RETnumber Length in meters
isAbsInRange(value, range)
Check if value is in [-range, +range] interval

REQint value: Value
REQint range: Range
RETbool Is the value in the range
bound(value, min, max)
Limit value to a bound

REQint value: Value
REQint min: Lower bound
REQint max: Upper bound
RETint Bounded value
formatDate(date, language)
Format date to "D MMM YY" (B.E.)

REQstring date: ISO 8601 calendar date (extended format)
REQstring language: ISO 639-1 language code
RETstring Formatted date string
formatTime(time)
Format time to "hh:mm"

REQstring time: ISO 8601 time (extended format)
RETstring Formatted time string
formatDateTimeRange(startDatetime, stopDatetime, language)
Format datetime range

REQstring startDatetime: Start datetime with space as a delimiter
REQstring stopDatetime: Stop datetime
REQstring language: ISO 639-1 language code
RETstring Formatted datetime range
formatInterval(interval, language)
Format time interval

REQnumber interval: Time interval in second
REQstring language: ISO 639-1 language code
RETstring Formatted interval
formatDistance(distance, language)
Format distance

REQnumber distance: Distance in meters
REQstring language: ISO 639-1 language code
RETstring Formatted distance
formatArea(area, language)
Format area

REQnumber area: Area in square meters
REQstring language: ISO 639-1 language code
RETstring Formatted area
formatThaiArea(area, language)
Format area to Thai unit

REQnumber area: Area in square meters
REQstring language: ISO 639-1 language code
RETstring Formatted area
initLibrary(library)
Initialize external library

REQstring library: Library name
Asynchronous method
project(fromProjection, toProjection, coordinates)
Transform coordinates to other coordinate system

OPTstring fromProjection: WKT-CRS of source coordinates   (Default: WGS84)
REQstring toProjection: WKT-CRS of target coordinates
REQObject|Array coordinates: Coordinates in {x,y} or [x,y] format
RETGeoJSON GeoJSON
WKTToGeoJSON(text)
Transform Well-known text to GeoJSON object

REQstring text: WKT
RETGeoJSON GeoJSON
EsriJSONToGeoJSON(json)
Transform EsriJSON object to GeoJSON object

REQObject json: EsriJSON
RETGeoJSON GeoJSON
TopoJSONToGeoJSON(json, object)
Transform TopoJSON object to GeoJSON object

REQObject json: TopoJSON
REQObject|String object: object or object name in the TopoJSON
RETGeoJSON GeoJSON
GMLToGeoJSON(doc)
Transform Geography Markup Language document to GeoJSON object

REQDocument|String doc: WFS document containing GML or GML fragment text
RETGeoJSON GeoJSON
GPXToGeoJSON(doc)
Transform GPS Exchange Format document to GeoJSON object

REQDocument|String doc: GPX
RETGeoJSON GeoJSON
KMLToGeoJSON(doc)
Transform Keyhole Markup Language document to GeoJSON object

REQDocument|String doc: KML
RETGeoJSON GeoJSON
^top