Longdo Map API Reference
anonymous.MapOptions
Anonymous type for Map options

Projectionsprojection: Initial projection   (Default: Projections.EPSG3857)
Layer|Layer[]layer: Initial layer   (Default: Layers.NORMAL)
numberzoom: Initial zoom   (Default: 7)
RangezoomRange: Initial zoom range   (Default: Every zoom)
Locationlocation: Initial location   (Default: Metamedia office)
Elementplaceholder: Placeholder element   (Default: No UI)
UiComponentui: Show default UI   (Default: Fit screen size)
boolinput: Use default input device (keyboard. mouse and touchscreen)   (Default: true)
boolautoResize: Auto resize to fit parent element   (Default: true)
boollastView: Load last location/zoom from local storage if able   (Default: true)
boolsmoothZoom: When zoom, show rough map while loading new map   (Default: true)
stringlanguage: Language in ISO 639-1 format   (Default: th)
^top
anonymous.LayerOptions
Anonymous type for Layer options

LayerTypetype: Type of layer   (Default: LayerType.Longdo)
URL|delegateurl: Image server URL or function(projection: Projection, tile: Tile, zoom: int): URL|null   (Default: Longdo image server)
RangezoomRange: Zoom range   (Default: Every zoom)
intrefresh: Refresh interval in second   (Default: No refresh)
numberopacity: Layer opacity   (Default: 1)
intweight: Weight, lighter will float, heavier will sink   (Default: 0)
Boundbound: Only tile in this bounding box will be shown   (Default: world)

WMS & WMTS(KVP) type specific options
stringformat: MIME type   (Default: image/png)
stringsrs: WMS's spatial reference system or WMTS's tile matrix set   (Default: Same as projection)
stringtransparent: Transparency   (Default: true)
stringstyles: Styles   (Default: default)
stringextraQuery: Extra query string   (Default: No extra query)

WMTS(KVP) type specific options
delegatetileMatrix: Zoom level to tile matrix translation function(zoom: int): string   (Default: Same as zoom)

TMS & WMTS(RESTful) type specific options
stringformat: image extension   (Default: png)

TMS type specific options
stringzoomOffset: TMS zoom level - Longdo zoom level   (Default: -1)
^top
anonymous.ExternalOptions
Anonymous type for external map options

stringgoogleQuery: Google API extra query string   (Default: No extra query)
stringmapboxKey: mapbox API access token   (Default: -)

^top
anonymous.MarkerOptions
Anonymous type for Marker options

HTMLtitle: Popup title   (Default: No title)
Iconicon: Icon   (Default: A certain blue pin)
HTMLdetail: Popup detail   (Default: No detail)
PopupOptionspopup: Popup options, override detail parameter   (Default: As detail)
RangevisibleRange: Visible range   (Default: Every zoom)
boolclickable: Fire click event even if has no popup   (Default: false)
booldraggable: Draggable   (Default: false)
OverlayWeightweight: Weight, for add marker to top   (Default: 0)
numberrotate: marker rotation in degree, relative to north   (Default: 0)
^top
anonymous.PopupOptions
Anonymous type for Popup options

HTMLtitle: Popup title   (Default: No title)
HTMLdetail: Popup detail   (Default: No detail)
delegateloadDetail: Popup detail function(element: Element): void   (Default: Load nothing)
HTMLhtml: Custom popup code, override detail parameter   (Default: As detail)
delegateloadHtml: Custom popup function(element: Element): void   (Default: Load nothing)
SizeWithRangesize: Popup size   (Default: Auto)
boolautoFocus: Auto focus (default popup only)   (Default: false)
^top
anonymous.GeometryOptions
Anonymous type for Polyline and subclass options

HTMLtitle: Popup title   (Default: No title)
HTMLdetail: Popup detail   (Default: No detail)
HTMLlabel: Show label at pivot   (Default: No detail)
MarkerOptionslabelOptions: Label options   (Default: Visible range of geometry)
PopupOptionspopup: Popup options, override detail parameter   (Default: As detail)
RangevisibleRange: Visible range   (Default: Every zoom)
intlineWidth: Line width   (Default: 3)
CSSRGBAlineColor: Line color   (Default: Default color list)
CSSRGBAfillColor: Fill color (can't use with dashed line)   (Default: Default color list)
LineStylelineStyle: Line style   (Default: LineStyle.Solid)
Location|delegatepivot: Label location   (Default: Center of geometry)
boolclickable: Fire click event even if has no popup   (Default: false)
bool|Rangeeditable: Can drag node to change geometry's shape   (Default: false)
boolpointer: Show pointer when move mouse over Polyline   (Default: false)
booldraggable: Can drag node to move   (Default: false)
boolrotatable: Can drag node to rotate   (Default: false)
OverlayWeightweight: Weight, for add geometry to top   (Default: 0)
URLtexture: Background image URL (only work with Rectangle; can't use cross-site image)   (Default: none)
inttextureAlpha: Opacity of texture   (Default: 1)
delegatelinePattern: Custom drawing with Canvas API function(context: CanvasRenderingContext2D, index: int, x1: int, y1: int, x2: int, y2: int): void, override lineStyle   (Default: Straight line)
^top
anonymous.ObjectOptions
Anonymous type for Overlays.Object options

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

MenuItem[]button: List of buttons   (Default: No button)
MenuItem[]dropdown: List of dropdowns   (Default: No dropdown)
stringdropdownLabel: Dropdown label   (Default: ...)
delegatechange: Handler function(currentMenuItem: Object, lastMenuItem: Object): void when user change menu   (Default: No handler)
^top
Anonymous type for store menu item

stringlabel: Label
stringvalue: Value   (Default: Same as label)
ButtonTypetype: Item type   (Default: ButtonType.Radio)
^top
anonymous.TagPanelOptions
Anonymous type for TagPanel options

string[]tag: List of tags   (Default: travel, restaurant, gas_station, bank)
^top
anonymous.CustomControlOptions
Anonymous type for CustomControl options

HTMLhtml: Control body
^top
anonymous.SearchUiOptions
Anonymous type for Search.placeholder options

Icon|booleanicon: Icon, user false to search without marker   (Default: A certain red pin)
^top
anonymous.SuggestOptions
Anonymous type for Search.suggest options

stringarea: Geocode of search area   (Default: Any area)
intoffset: Offset of the first result returned   (Default: 0)
intlimit: Number of results returned   (Default: 10)
stringdataset: Search dataset   (Default: Default data)
^top
anonymous.SearchOptions
Anonymous type for Search.search options

stringarea: Geocode of search area   (Default: Any area)
stringtag: Tag   (Default: Any tag)
stringspan: Span with unit in deg, m or km   (Default: Anywhere)
intoffset: Offset of the first result returned   (Default: 0)
intlimit: Number of results returned   (Default: 20)
stringdataset: Search dataset   (Default: Default data)
^top
anonymous.AddressOptions
Anonymous type for Search.address options

intlimit: Limit the number of results when search with street address   (Default: 5)
stringdataset: Dataset when search with street address   (Default: Default data)
^top
anonymous.NearPoiOptions
Anonymous type for Search.nearPoi options

numberspan: Span in degree   (Default: Optimal span)
intzoom: Maximum POI zoom level   (Default: All zoom)
intlimit: Limit the number of results   (Default: 10)
^top
anonymous.TagOptions
Anonymous type for TagCollection options

URLsource: Tag server URL   (Default: Longdo server)
RangevisibleRange: Visible range   (Default: Every zoom)
Icon|stringicon: Icon or 'big' keyword for big default icons   (Default: Default icons)
Rangelabel: Label visible range   (Default: None)
^top
anonymous.TouchMeasureOptions
Anonymous type for Touch Measure options

ElementmeasureButton: Add point to measuring button   (Default: Text button)
ElementundoButton: Undo button or null to disable   (Default: Text button)
ElementdoneButton: Done button   (Default: Text button)
ElementcancelButton: Cancel button or null to disable   (Default: Text button)
^top
anonymous.Location
Anonymous type for store location

numberlon: Longitude
numberlat: Latitude
^top
anonymous.Point
Anonymous type for store 2D & 3D point
Page is position from top-left of page
Screen is position from top-left of map
Point is 3D position from top-left of the world

intx: x
inty: y
intz: z   (Default: undefined)
^top
anonymous.Range
Anonymous type for store range

intmin: Mininum value (inclusive)
intmax: Maximun value (inclusive)
^top
anonymous.Bound
Anonymous type for store bounding box

numberminLon: Mininum longitude (inclusive)
numberminLat: Mininum latitude (inclusive)
numbermaxLon: Maxinum longitude (inclusive)
numbermaxLat: Maxinum latitude (inclusive)
^top
anonymous.Icon
Anonymous type for store icon

URLurl: Icon image URL
URLurlHD: Icon image URL for high density display
HTMLhtml: Custom icon code, override url parameter
Pointoffset: Icon offset   (Default: Center of icon)
^top
anonymous.Tile
Anonymous type for store tile

intu: x-axis id
intv: y-axis id
intw: inverse zoom level
intux: unbounded u value   (Default: u)
^top
anonymous.NumberUnit
Anonymous type for store number with unit as string

Example
'1deg', '1', 1 = 1 degree
'1.5m' = 1.5 metre
'-1E2km' = -100 km
^top
anonymous.Size
Anonymous type for store size

intwidth: width
intheight: height
^top
anonymous.SizeWithRange
Anonymous type for store size or range of size

intwidth: width   (Default: Use range of width)
intminWidth: Mininum width   (Default: Equal to width)
intmaxWidth: Maximun width   (Default: Equal to width)
intheight: height   (Default: Use range of height)
intminHeight: Mininum height   (Default: Equal to height)
intmaxHeight: Maximun height   (Default: Equal to height)
^top
anonymous.EventEnum
Event enumeration
Property/Method List
ready
Map is ready to use
beforeResize
Map is going to resized
Can prevent default behavior by return false
resize
Map resized
repaint
Map repainted
zoom
Zoom level changed

PointPivot of zoom
zoomRange
Zoom range changed
locationAnimationBegin
Map location animation begin
LocationTarget location
location
Map location changed
fullscreen
Map enter/exit fullsceen

boolIs fullscreen
rotate
Map rotated
suggest
Suggest result is ready

ObjectResult
search
Search result is ready

ObjectResult
address
Address result is ready

ObjectResult
nearPoi
Nearby POI result is ready

ObjectResult
toolbarChange
Toolbar is toggled
See Also:Toolbar.activeTool for mode list

stringMode
clearMeasure
Clear measure line
beforeContextmenu
Context menu is going to appear
Can prevent default behavior by return false

MenuEventMenu event
contextmenu
Context menu appeared
mousemove
User move mouse (without drag)

PointCursor point
click
User click/touch on map

PointClick point
doubleClick
User double click/touch on map
Can prevent default behavior by return false

PointClick point
wheel
User scroll wheel

PointWheel point
pinch
User pinch map

PointPinch point
pinchEnd
User stop pinch map
drag
User drag map
Can prevent default behavior by return false

PointOffset
drop
User stop drag map
Can prevent default behavior by return false
layerChange
Layer changed

LayerChange layer
loadTile
All visible tile are start or finish to load

string'start' or 'finish'
overlayChange
Overlay changed

LongdoOverlayOverlay
overlaySelect
User select overlay

LongdoOverlayOverlay
overlayClick
User click overlay
Can prevent default behavior by return false

LongdoOverlayOverlay
overlayLoad
overlay result is ready

ObjectData
overlayDrag
User drag overlay

LongdoOverlayOverlay
overlayDrop
User drop overlay

LongdoOverlayOverlay
overlayMove
Overlay moved

LongdoOverlayOverlay
overlayHover
Mouse hover over overlay

LongdoOverlayOverlay
overlayLeave
Mouse leave overlay

LongdoOverlayOverlay
pathAnimationEnd
Path animation end

LongdoOverlayOverlay
popupLoadDetail
Popup load detail
Can prevent default behavior by return false

PopupPopup
popupClose
Popup close

LongdoOverlay|PopupMiniPopup's parent
guideError
Routing guide error

intError code
guideComplete
Routing guide complete

Object[]Guide list
pathError
Routing path error

intError code
pathComplete
Routing path complete

ObjectData
beforeGeolocation
Geolocation request
Can prevent default behavior by return false
geolocation
Geolocation response

PositionPosition
See Also:dev.w3.org/geo/api/spec-source.html#position_interface
geolocationError
Geolocation error

PositionErrorError
See Also:dev.w3.org/geo/api/spec-source.html#position_error_interface
connectionError
Connection error

stringSource
^top
beforeContextmenu event
Property/Method List
Context menu location
Add element to menu

Element|HTMLelement: Element
^top
longdo.Event
longdo.Event(map)
Event class

In some event, if any handler return false the event will not excute.
Private constructor
Mapmap: Map

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

stringeventName: Name of event
delegatehandler: Handler function(eventData: Object): bool, Return false to prevent default behavior if able
thisSelf

See Also:EventEnum
unbind
unbind(eventName, handler)
Remove a handler from target event

stringeventName: Name of event
delegatehandler: Handler function
thisSelf
pause
pause(state)
Pause event handler from call

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
register
register(eventName)
Register new event

stringeventName: Name of event
thisSelf
^top
longdo.LineStyle
Line style enumeration

Static class
Property/Method List
Solid
Solid
Dashed
Dashed
Dot
Dot
^top
longdo.Polylineextends LongdoOverlay
longdo.Polyline(locationList, options)
Polyline class

Location[]locationList: List of locations
GeometryOptionsoptions: Extra options   (Default: Default value)
Property/Method List
linkEditing
linkEditing(geometry)
Link all editing node with another geometry

Polylinegeometry: Another geometry
thisSelf
update
update(newOptions)
Update this geometry options
Only lineWidth, lineColor, fillColor and lineStyle are support

GeometryOptionsnewOptions: New options value
thisSelf
shift
shift(vector)
Translate this geometry

Locationvector: Distance to shift
thisSelf
rotate
rotate(angle)
Rotate this geometry

numberangle: Angle to rotate in degree
thisSelf
size
size()
Formatted area or distance of this geometry

stringSize
^top
longdo.Polygonextends longdo.Polyline
longdo.Polygon(locationList, options)
Polygon class

Location[]locationList: List of locations
GeometryOptionsoptions: Extra options   (Default: Default value)
Property/Method List
contains
contains(overlay)
Tests if the specified overlay is inside the boundary of this polygon
Points on polygon's edge are count as outside

Location|LongdoOverlayoverlay: Overlay (support only marker, popup and dot) or location
boolIs overlay is inside, return null if overlay is exactly on polygon's edge
union
union(overlay, options)
Union this polygon with another polygon

Polygonoverlay: Another polygon
GeometryOptionsoptions: Extra options   (Default: Default value)
PolygonUnion polygon
intersection
intersection(overlay, options)
Intersection this polygon with another polygon

Polygonoverlay: Another polygon
GeometryOptionsoptions: Extra options   (Default: Default value)
PolygonIntersected polygon
difference
difference(overlay, options)
Difference this polygon by another polygon

Polygonoverlay: Another polygon
GeometryOptionsoptions: Extra options   (Default: Default value)
PolygonDifferenced polygon
split
split(splitter, options)
Split this polygon by another polygon or polyline
Can't split polygon with hole by polyline

Polyline|Polygonsplitter: Splitter
GeometryOptionsoptions: Extra options   (Default: Default value)
GeometryOptionsoptions: Extra options   (Default: Default value)
Polygon[]List of split polygons
^top
longdo.Circleextends longdo.Polyline
longdo.Circle(location, radius, options)
Circle class

Locationlocation: Center location
numberradius: Circle radius in degree
GeometryOptionsoptions: Extra options   (Default: Default value)
^top
longdo.Polycurveextends longdo.Polyline
longdo.Polycurve(locationList, options)
Polycurve class
Implement as cubic bezier curve

Location[]locationList: List of Locations and control points
GeometryOptionsoptions: Extra options   (Default: Default value)
^top
longdo.Dotextends longdo.Polyline
longdo.Dot(location, options)
Dot class

Locationlocation: Location
GeometryOptionsoptions: Extra options   (Default: Default value)
^top
longdo.Rectangleextends longdo.Polygon
longdo.Rectangle(location, size, options)
Rectangle class
Can apply texture

Locationlocation: Top-left location
Size|Locationsize: Size in degree or bottom-right location
GeometryOptionsoptions: Extra options   (Default: Default value)
Property/Method List
divide
divide(count, dir, options)
Divide this rectangle to multiple rectangle

intcount: Number of divided rectangle
booldir: Divide direction   (Default: Longer side)
GeometryOptionsoptions: Extra options   (Default: Default value)
LongdoOverlay[]Divided rectangle
^top
longdo.Keyboard
longdo.Keyboard(placeholder, map, handler)
Keyboard class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map
Objecthandler: Handler

See Also:UiCollection.Keyboard
Property/Method List
enable
enable(state)
Enable keyboard input

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableInertia
enableInertia(state)
Enable map to slide a little after move map by keyboard

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.Mouse
longdo.Mouse(placeholder, map, handler)
Mouse class
Support mouse and touchscreen up to 2 touches

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map
Objecthandler: Handler

See Also:UiCollection.Mouse
Property/Method List
enable
enable(state)
Enable click/drag/wheel in one function

boolstate: New state
thisSelf
enableClick
enableClick(state)
Enable mouse click

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableDrag
enableDrag(state)
Enable dragging

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableWheel
enableWheel(state)
Enable wheel scrolling

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableInertia
enableInertia(state)
Enable map to slide a little after dragging

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
overlayDoubleClick
overlayDoubleClick(state)
Enable double click event on overlay

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.LayerType
Layer type enumeration

Static class
Property/Method List
WMS
Web Map Service type
TMS
Tile Map Service type
WMTS
Web Map Tile Service (key-value-pairs encoding) type
WMTS_REST
Web Map Tile Service (RESTful encoding) type
ArcGIS_REST
ArcGIS REST Services type
Mapbox
Mapbox Services / XYZ type
Custom
Custom type, LayerOptions.url must be callback function
Longdo
Default type
^top
longdo.Layer
longdo.Layer(name, options)
Layer class

stringname: Name of layer
LayerOptionsoptions: Extra options   (Default: Default value)
Property/Method List
name
name()
Get name

stringName
^top
longdo.Layers
Layer list singleton class

Static class
Property/Method List
NORMAL
Standard base layer (TH)
NORMAL_EN
Standard base layer (EN)
REVERSE
Upside down base layer (TH)
REVERSE_EN
Upside down base layer (EN)
GRAY
Gray-ish base layer (TH)
GRAY_EN
Gray-ish base layer (EN)
POI
Standard+POI base layer (TH)
POI_EN
Standard+POI base layer (EN)
POLITICAL
Political base layer (TH)
POLITICAL_EN
Political base layer (EN)
POLITICAL_NOLABEL
Political base layer (No label)
BASE
Hillshade base layer
HYDRO
Basic base layer
OSM
Open Street Map base layer
LONGDO_OSM
Longdo OSM base layer
OPENCYCLE
Open Cycle base layer
TERRAIN
Bluemarble terrain base layer
GISTDA_SPOT5
SPOT5 satellite base layer
THAICHOTE
Thaichote satellite base layer
TOMTOM_NORMAL
TomTom standard base layer (TH)
TOMTOM_POI
TomTom standard+POI base layer (TH)
TOMTOM_HYDRO
TomTom basic base layer
ARCGIS_WORLD_IMAGERY
ArcGIS world imagery

See Also:goto.arcgisonline.com/maps/World_Imagery
ARCGIS_WORLD_STREET_MAP
ArcGIS world street map

See Also:goto.arcgisonline.com/maps/World_Street_Map
ARCGIS_WORLD_TOPO_MAP
ArcGIS world topographic map

See Also:goto.arcgisonline.com/maps/World_Topo_Map
ARCGIS_WORLD_DARK
ArcGIS world dark base

See Also:goto.arcgisonline.com/maps/World_Dark_Gray_Base
ARCGIS_WORLD_LIGHT
ArcGIS world light base

See Also:goto.arcgisonline.com/maps/World_Light_Gray_Base
BLANK
White base layer
CLEAR
Transparent base layer
CHECKERED
Checkered base layer
POI_TRANSPARENT
Standard+POI non-base layer (TH)
POI_TRANSPARENT_EN
Standard+POI non-base layer (EN)
TRAFFIC
Traffic non-base layer with auto-refresh
ARCGIS_WORLD_DARK_REF
ArcGIS world dark reference

See Also:goto.arcgisonline.com/maps/World_Dark_Gray_Reference
ARCGIS_WORLD_LIGHT_REF
ArcGIS world light reference

See Also:goto.arcgisonline.com/maps/World_Light_Gray_Reference
ARCGIS_WORLD_PLACE
ArcGIS world boundaries and places

See Also:goto.arcgisonline.com/maps/Reference/World_Boundaries_and_Places
ARCGIS_WORLD_TRANSPORTATION
ArcGIS world transportation

See Also:goto.arcgisonline.com/maps/Reference/World_Transportation
GOOGLE_ROADMAP
Google road map external layer (First load language)

See Also:stackoverflow.com/questions/7065420
GOOGLE_TRAFFIC
Google traffic external layer
GOOGLE_SATELLITE
Google satellite image external layer
GOOGLE_HYBRID
Google satellite image with road map external layer
MAPBOX_STREETS
Mapbox GL streets external layer
MAPBOX_SATELLITE
Mapbox GL satellite image external layer
MAPBOX_HYBRID
Mapbox GL satellite image with streets external layer
MAPBOX_LONGDO_OSM
Mapbox GL Longdo style OSM external layer
MAPBOX_LONGDO_TRAFFIC
Mapbox GL Longdo traffic external layer
byName
byName(name)
Get layer by name

@param {string) name Layer name
LayerLayer
^top
longdo.Projections
Projection list singleton class

Static class
Property/Method List
EPSG3857
EPSG:3857 projection (WGS 84 / Pseudo-Mercator) - sphere earth
EPSG4326
EPSG:4326 projection (WGS 84) - ellipsoid earth
getBound
getBound(projection)
Get bounding box

Projectionsprojection: Projection
BoundWorld bounding box
^top
longdo.LayerCollection
longdo.LayerCollection(map)
LayerCollection class

Private constructor
Mapmap: Map

See Also:Map.Layers
Property/Method List
setBase
setBase(layer)
Set base layer of this collection
Bind layerChange event

Layerlayer: Base layer
thisSelf
add
add(layer)
Add a non-base layer to this collection
Bind layerChange event to get notify

Layerlayer: Non-base layer
thisSelf
insert
insert(index, layer)
Insert a non-base layer to this collection
Bind layerChange event to get notify

intindex: Position of layer
Layerlayer: Non-base layer
thisSelf
remove
remove(layer)
Remove a non-base layer from this collection
Bind layerChange event to get notify

Layerlayer: Non-base layer
thisSelf
clear
clear()
Clear all non-base layers in this collection
Bind layerChange event to get notify

thisSelf
list
list()
List layers in this collection

Layer[]List of layers in collection
size
size()
Number of layers in this collection

intSize of collection
contains
contains(layer)
Check if this collection contains the specified layer

Layerlayer: Layer
boolContain
externalMap
externalMap()
Get current external map data

object[]External map, provider name and layers
externalOptions
externalOptions(options)
Access external map options
Not affect external map added before set this function

Getter
ExternalOptionsCurrent options

Setter
ExternalOptionsstate: New options
thisSelf
^top
longdo.LocationMode
Location mode enumeration

Static class
Property/Method List
Pointer
Get location at mouse position mode
Geolocation
Set value to geolocation mode
^top
longdo.Map
longdo.Map(options)
Map class
Bind ready event to get notify

MapOptionsoptions: Extra options   (Default: Default value)
Property/Method List
id
id()
Get map id

intID
resize
resize()
Resize map
Call this function when resize or reposition map
Bind beforeResize and resize event to get notify

thisSelf
repaint
repaint(mode)
Repaint map
Bind repaint event to get notify

Objectmode: For internal use   (Default: null)
thisSelf
pause
pause(state)
Pause map from repaint

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
placeholder
placeholder()
Get map placeholder

ElementPlaceholder
projection
projection()
Get map projection

ProjectionProjection
zoom
zoom(value, animate, pivot)
Zoom map
Bind zoom event to get notify

Getter
numberCurrent zoom

Setter
Number|boolvalue: New zoom or direction
boolanimate: Show animation   (Default: true)
Pointpivot: Pivot of zoom   (Default: center of screen)
thisSelf
zoomRange
zoomRange(value)
Access zoom range
Bind zoomRange event to get notify

Getter
RangeCurrent zoom range

Setter
Rangevalue: New zoom range
thisSelf
location
location(value, animate)
Access map location
Bind beforeGeolocation, geolocation, geolocationError and location event to get notify

Getter
LocationCurrent location
Point|LocationModemode: use LocationMode.Pointer for get location at mouse position or Point for arbitrary location   (Default: crosshair location)

Setter
Location|LocationModevalue: New location, use LocationMode.Geolocation for set value to geolocation
boolanimate: Show animation   (Default: true)
thisSelf
bound
bound(value, pivot, allowZoomIn)
Access visible map bounding box

Getter
BoundCurrent bounding box

Setter
Boundvalue: New bounding box
Locationpivot: Pivot of bounding box   (Default: center of bounding box)
boolallowZoomIn: Allow zoom in to fit bounding box   (Default: yes)
thisSelf
move
move(offset, animate)
Move map in pixel unit

Pointoffset: Offset in pixel
boolanimate: Show animation   (Default: true)
thisSelf
pinch
pinch(value, screen)
Pinch map
Bind pinch event to get notify

numbervalue: Multiplier
Pointscreen: Position on screen
thisSelf
pinchEnd
pinchEnd(screen)
Stop pinch map and round the zoom level
Bind pinchEnd event to get notify

Pointscreen: Position on screen
thisSelf
language
language(value)
Access language setting for all components in ISO 639-1 format

Getter
stringCurrent language

Setter
stringvalue: New language
thisSelf

See Also:en.wikipedia.org/wiki/List_of_ISO_639-1_codes
focus
focus()
Set focus to map

thisSelf
pageToScreen
pageToScreen(page)
Convert position in page to position in placeholder

Pointpage: Position from top-left of page
PointPosition from top-left of map
loadingTile
loadingTile()
Get number of loading tiles

intNumber of loading tiles
rotate
rotate(angle)
Rotate map

Getter
stringCurrent angle in degree

Setter
numberangle: Angle to rotate in degree
thisSelf
enableNightMode
enableNightMode(state)
Enable night mode

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
Event
See Also:Event
Layers
See Also:LayerCollection
Overlays
See Also:OverlayCollection
Ui
See Also:UiCollection
Search
See Also:Search
Tags
See Also:TagCollection
Route
See Also:Route
^top
longdo.Math
Math singleton class

Static class
Property/Method List
square
square(value)
Find square of the value

intvalue: Value
intSquare of value
distance
distance(dx, dy)
Find 2D distance from X and Y distance

intdx: X distance
intdy: Y distance
number2D Distance
isPointInRect
isPointInRect(x, y, l, t, r, b)
Check if the point in the rectangle

intx: X of point
inty: Y of point
intl: Left of rectangle
intt: Top of rectangle
intr: Right of rectangle
intb: Bottom of rectangle
boolIs point in rectangle
isPointInPolygon
isPointInPolygon(point, pointList)
Check if the point is in the polygon
Can't check point on polygon's edge

pointpoint: The point
point[]pointList: List of polygon vertices
boolIs point in polygon
isPointOnPolyline
isPointOnPolyline(point, pointList, width)
Check if the point is on the polyline or polygon border

pointpoint: The point
Point[]pointList: List of polyline/polygon vertices
intwidth: Line width   (Default: 0)
boolIs point on polyline or polygon border
closestPointOnLine
closestPointOnLine(x, y, x1, y1, x2, y2)
Find closest point on the line

intx: X of point
inty: Y of point
intx1: Begin of line's X
inty1: Begin of line's Y
intx2: End of line's X
inty2: End of line's Y
PointClosest point on line
^top
longdo.ButtonType
Button type enumeration

Static class
Property/Method List
Radio
Radio button
Toggle
Toggle button
Push
Push button
Reset
Reset button/option
can use in dropdown
Group
Option group
for dropdown only
Custom
HTML
^top
export
Longdo control class
The root of all controls

Private constructor
Elementelement: Control's elment
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.MenuBar(options)
Menu bar class

MenuBarOptionsoptions: Menu options
Property/Method List
selectIndex(index)
Select index

integerindex: Menu index
thisSelf
selectValue(value)
Select value

Objectvalue: Menu value
thisSelf
^top
longdo.TagPanelextends LongdoControl
longdo.TagPanel(options)
Tag panel class

TagPanelOptionsoptions: Extra options   (Default: Default value)
^top
longdo.CustomControlextends LongdoControl
longdo.CustomControl(options)
Custom control class

CustomControlOptionsoptions: Extra options   (Default: Default value)
^top
longdo.LayerSelector
longdo.LayerSelector(placeholder, map, mode)
LayerSelector class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map
stringmode: Mode (undefined / button / dropdown)

See Also:UiCollection.LayerSelector
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.OverlayWeight
Overlay weight enumeration

Static class
Property/Method List
Top
Top flag
^top
longdo.ObjectLabel
Object label flags

Static class
Property/Method List
Title
Use title flag
^top
export
Longdo overlay class
The root of all overlays

Private constructor
Locationlocation: Location
Element|Imageelement: Icon elment or image (Maximum size for image type icon is 256x256px)
Pointoffset: Icon offset
RangevisibleRange: Visible range   (Default: Every zoom)
Property/Method List
location
location()
Get location

LocationOverlay location
offset
offset()
Get offset

PointIcon offset
visibleRange
visibleRange()
Get visible range

RangeVisible range
active
active()
Check if overlay is added to map

boolIs active
pop
pop(mode)
Show or hide popup of this overlay if any

boolmode: Show or hide   (Default: toggle)
thisSelf
move
move(location, animate)
Move this overlay to new location

Locationlocation: New location
boolanimate: Show animation   (Default: false)
thisSelf
^top
longdo.Markerextends LongdoOverlay
longdo.Marker(location, options)
Marker class

Locationlocation: Marker location
MarkerOptionsoptions: Extra options   (Default: Default value)
Property/Method List
update
update(newOptions)
Update overlay options
Only rotate is support

MarkerOptionsnewOptions: New options value
thisSelf
^top
longdo.Popup(location, options)
Popup class

Locationlocation: Popup location
PopupOptionsoptions: Extra options   (Default: Default value)
Property/Method List
title
title(value)
Access title of this popup
Not support custom popup

Getter
ElementTitle

Setter
HTMLvalue: New title
thisSelf
detail
detail(value)
Access detail of this popup
Not support custom popup

Getter
ElementDetail

Setter
HTMLvalue: New detail
thisSelf
fit
fit()
Fit popup width to it's content

thisSelf
focus
focus()
Move map to make whole popup visible unless it locate outside visible map area

thisSelf
^top
longdo.Overlays
Overlay list singleton class
Property/Method List
cameras
Cameras overlay

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

boolpopup: Enable popup   (Default: true)
Object
Object(id, dataset, options)
Predefined object overlay

stringid: Object ID
stringdataset: Object dataset
Objectoptions: Extra options as MarkerOptions, GeometryOptions, LayerOptions or ObjectOptions   (Default: Default value)
^top
longdo.OverlayCollection
longdo.OverlayCollection(map, handler)
OverlayCollection class

Private constructor
Mapmap: Map
Objecthandler: Handler

See Also:Map.Overlays
Property/Method List
add
add(overlay)
Add an overlay to this collection
Bind overlayChange event to get notify

LongdoOverlayoverlay: Overlay
thisSelf
remove
remove(overlay)
Remove an overlay from this collection
Bind overlayChange event to get notify

LongdoOverlayoverlay: Overlay
thisSelf
clear
clear()
Clear all overlays in this collection
Bind overlayChange event to get notify

thisSelf
list
list()
List overlays in this collection

LongdoOverlay[]List of overlays
size
size()
Number of overlays in this collection

intSize
move
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
load(mode)
Load predefined overlays and add to this collection
Bind overlayLoad event to get notify

Overlaysmode: Mode
thisSelf
unload
unload(mode)
Remove predefined overlays from this collection

Overlaysmode: Mode
thisSelf
pop
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
floorPlan(overlay)
Show floor plan of the overlay if any

LongdoOverlayoverlay: Overlay
thisSelf
drop
drop(overlay)
Show drop animation of the overlay and add to this collection

LongdoOverlayoverlay: Overlay
thisSelf
bounce
bounce(overlay)
Show bounce animation of the overlay

LongdoOverlayoverlay: Overlay
thisSelf
enableAutoClosePopup
enableAutoClosePopup(state)
Enable automatically close previous popup when open new one

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableAutoFocusPopup
enableAutoFocusPopup(state)
Enable automatically move map to make whole popup visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableFloorPlan
enableFloorPlan(state)
Enable automatically show floor plan if any

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableEditGuide
enableEditGuide(state)
Enable edit guide

boolstate: New state
thisSelf
lastOpenPopup
lastOpenPopup()
Get the last open popup

PopupLast open popup
linkEditing
linkEditing(a, b)
Link all editing node of both geometries

Polylinea: First geometry
Polylineb: Second geometry
thisSelf
pathAnimation
pathAnimation(marker, path, speed)
Move marker along the line

Markermarker: The marker to move
Polylinepath: Motion path
numberspeed: Speed   (Default: 2^-zoom)
thisSelf
^top
longdo.RouteType
Route type enumeration

Static class
Property/Method List
Road
Driving or walking, road
Air
Public transport, airline
Railway
Public transport, intercity railway
Ferry
Driving or public transport, Ferry
Tollway
Driving, tollway
Bus
Public transport, bus
Metro
Public transport, rapid transit
All
All
AllDrive
All driving (road, ferry, tollway)
AllTransit
All public transport (walk, air, railway, ferry, bus, metro)
^top
longdo.RouteMode
Route mode enumeration

Static class
Property/Method List
Traffic
Driving via fastest route, avoid traffic jam
Cost
Driving via fastest route
Distance
Driving via shortest route
Walk
Walking via shortest route or use fastest public transport
Both
Driving via fastest route, ignore driving direction
Fly
Fly directly to destination with superluminal speed
^top
longdo.RouteLabel
Route label enumeration

Static class
Property/Method List
Distance
Show distance
Time
Show time
Hide
Hide
^top
longdo.RouteRestrict
Vehicle restriction enumeration

Static class
Property/Method List
Bike
Don't use route that restrict motorcycle
Wheelchair
Don't use route that restrict wheelchair (walk/public transport mode only)
^top
longdo.Route
longdo.Route(map)
Route class

Private constructor
Mapmap: Map

See Also:Map.Routing
Property/Method List
language
language(value)
Access language setting in ISO 639-1 format

Getter
stringCurrent language

Setter
stringvalue: New language
thisSelf

See Also:en.wikipedia.org/wiki/List_of_ISO_639-1_codes
placeholder
placeholder(value)
Access placeholder element

Getter
ElementCurrent placeholder

Setter
Elementvalue: New placeholder
thisSelf
enableContextMenu
enableContextMenu()
Enable routing menu in context menu

thisSelf
line
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
auto(state)
Access auto update setting

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
mode
mode(value)
Access search mode

Getter
RouteModeCurrent mode

Setter
RouteModevalue: New mode
thisSelf
enableRoute
enableRoute(routeType, state)
Enable type of route

Getter
RouteTyperouteType: Route type
boolCurrent state

Setter
RouteTyperouteType: Route type
boolstate: New state
thisSelf
enableRestrict
enableRestrict(routeRestrict, state)
Enable vehicle restriction

Getter
RouteRestrictrouteRestrict: Restrict vehicle
boolCurrent state

Setter
RouteRestrictrouteRestrict: Restrict vehicle
boolstate: New state
thisSelf
time
time(value)
Access search time

Getter
DateCurrent time

Setter
Datevalue: New time
thisSelf
modeOf
modeOf(index, value)
Access search mode of each destination

Getter
RouteModeCurrent search mode of each destination

Setter
intindex: Index
RouteModevalue: New mode
thisSelf
useStopMarker
useStopMarker(state)
Use stop marker for last destination

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
usePoiName
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
useCumulativeDistance(state)
Use cumulative distance
This function don't change current guide

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
showUnknownRoad
showUnknownRoad(state)
Show unknown road in guide
This function don't change current guide

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
label
label(value)
Access label mode

Getter
RouteLabelCurrent mode

Setter
RouteLabelvalue: New mode
thisSelf
add
add(destination, mode)
Add a destination to this route

Marker|Locationdestination: Destination
thisSelf
insert
insert(index, destination, mode)
Insert a destination to this route

intindex: Index
Marker|Locationdestination: Destination
thisSelf
remove
remove(destination)
Remove a destination from this route

Markerdestination: Destination
thisSelf
removeAt
removeAt(index)
Remove destination at the index

intindex: Destination index
thisSelf
clearDestination
clearDestination()
Clear all destinations

thisSelf
clearPath
clearPath()
Clear all paths

thisSelf
clear
clear()
Clear everything

thisSelf
list
list()
List destination in this route

Marker[]List of destinations
size
size()
Number of destinations in this route

intSize
reverse
reverse()
Reverse the direction of route

thisSelf
search
search()
Search the route
Bind guideComplete, guideError, pathComplete, pathError event to get notify

thisSelf
distance
distance(format)
Distance of the route

boolformat: With format
int|stringDistance
interval
interval(format)
Time to travel through the route

boolformat: With format
int|stringInterval
guide
guide(format)
Guide for travel through the route

boolformat: With format
string|ElementElement
exportRouteLine
exportRouteLine(options)
Export route line as a single polyline

GeometryOptionsoptions: Extra options   (Default: Default value)
PolylineGeometry overlay
nextGuide
nextGuide()
Show next guide

thisSelf
^top
longdo.Search(map, secondary)
Search class

Private constructor
Mapmap: Map
boolsecondary: Is secondary search provider   (Default: false)

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

Getter
stringCurrent language

Setter
stringvalue: New language
thisSelf

See Also:en.wikipedia.org/wiki/List_of_ISO_639-1_codes
placeholder
placeholder(value, options)
Access placeholder element

Getter
ElementCurrent placeholder
SearchUiOptionsoptions: Extra options   (Default: Default value)

Setter
Elementvalue: New placeholder
thisSelf
suggest
suggest(keyword, options)
Request suggest data
Bind suggest event to receive the result

stringkeyword: Keyword
SuggestOptionsoptions: Extra options   (Default: Default value)
thisSelf
search
search(keyword, options)
Request search data
Bind search event to receive the result

stringkeyword: Keyword
SearchOptionsoptions: Extra options   (Default: Default value)
thisSelf
address
address(location, options)
Request address data
Bind address event to receive the result

Location|stringlocation: Location / Geocode / POI ID / Street address
AddressOptionsoptions: Extra options   (Default: Default value)
thisSelf
nearPoi
nearPoi(location, options)
Request near by POI
Bind nearPoi event to receive the result

Locationlocation: Location
NearPoiOptionsoptions: Extra options   (Default: Default value)
thisSelf
clear
clear()
Clear result

thisSelf
enablePopup
enablePopup(state)
Enable popup

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.TagCollection
longdo.TagCollection(map)
TagCollection class

Private constructor
Mapmap: Map

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

Getter
stringCurrent language

Setter
stringvalue: New language
thisSelf

See Also:en.wikipedia.org/wiki/List_of_ISO_639-1_codes
set
set(tag, options)
Clear and set single tag to collection

string|delegatetag: Name of tag or callback function(tile: Tile, zoom: int): void
TagOptionsoptions: Extra options   (Default: Default value)
thisSelf
add
add(tag, options)
Add tag to collection

string|delegatetag: Name of tag or callback function(tile: Tile, zoom: int): void
TagOptionsoptions: Extra options   (Default: Default value)
thisSelf
remove
remove(tag)
Remove tag from collection

stringtag: Name of tag
thisSelf
clear
clear()
Clear all tags in collection

thisSelf
list
list()
List tags in collection

string[]List of tags
size
size()
Size of collection

intSize
pop
Show tag popup

Objectdata: Tag data
thisSelf
enablePopup
enablePopup(state)
Enable popup

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.DPad
longdo.DPad(placeholder, map)
DPad class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.DPad
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.Zoombar
longdo.Zoombar(placeholder, map)
Zoombar class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.Zoombar
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.ZoombarMini
longdo.ZoombarMini(placeholder, map)
ZoombarMini class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.Zoombar
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.Geolocation
longdo.Geolocation(placeholder, map)
Geolocation class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.Geolocation
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
updateCurrentLocation
updateCurrentLocation(move)
Show geolocation marker on current location

thisSelf
^top
longdo.Toolbar
longdo.Toolbar(placeholder, map)
Toolbar class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map
Objecthandler: Handler

See Also:UiCollection.Toolbar
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
measureToggle
measureToggle(mode)
Toggle measure tool

boolmode: On or off   (Default: toggle)
thisSelf
rangeToggle
rangeToggle(mode)
Toggle range tool

boolmode: On or off   (Default: toggle)
thisSelf
measureList
measureList()
List measure overlays

LongdoOverlay[]List of overlays
activeTool
activeTool()
Get current active tool
'M' if measure is active
'R' if range is active
null if none are active

stringMode
^top
longdo.Fullscreen
longdo.Fullscreen(placeholder, map)
Fullscreen class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.Fullscreen
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
toggle
toggle(mode)
Toggle fullscreen

boolmode: Force fullscreen or normal size   (Default: toggle)
thisSelf
^top
longdo.Crosshair
longdo.Crosshair(placeholder, isMini)
Crosshair class

Private constructor
Elementplaceholder: Placeholder element

See Also:UiCollection.Crosshair
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.Scale
longdo.Scale(placeholder)
Scale class

Private constructor
Elementplaceholder: Placeholder element

See Also:UiCollection.Scale
Property/Method List
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableAbsolute
enableAbsolute(state)
Enable absolute scale, assume that display is 96 PPI by default

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableRelative
enableRelative(state)
Enable relative scale

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
ppi
ppi(value)
Access PPI

Getter
RangeCurrent PPI

Setter
Rangevalue: New PPI
thisSelf
^top
longdo.Legend
longdo.Legend(placeholder, map)
Legend class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.Legend
Property/Method List
visible
visible(image)
Visible

Getter
boolCurrent state

Setter
URL|boolimage: Legend image   (Default: hide)
thisSelf
enableLoadEvents
enableLoadEvents(state)
Enable automaic load events when trafic layer is present

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableLoadCameras
enableLoadCameras(state)
Enable automaic load cameras when trafic layer is present

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.Notice
longdo.Notice(placeholder, isMini)
Notice class

Private constructor
Elementplaceholder: Placeholder element

See Also:UiCollection.Notice
^top
longdo.ContextMenu
longdo.ContextMenu(placeholder, map)
ContextMenu class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.ContextMenu
Property/Method List
visible
visible(screen, location)
Visible

Getter
boolCurrent state

Setter
Point|boolscreen: Point on screen   (Default: hide)
Locationlocation: Location   (Default: hide)
thisSelf
enableNearPoi
enableNearPoi(state)
Enable near POI

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
enableAddress
enableAddress(state)
Enable address

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.Tooltip
longdo.Tooltip(placeholder, map)
Tooltip class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.Tooltip
Property/Method List
visible
visible(screen)
Visible

Getter
boolCurrent state

Setter
Point|boolscreen: Point on screen   (Default: hide)
thisSelf
set
set(message)
Set message

@param {HTML} [message] Message
thisSelf
get
get()
Get currentmessage

HTMLMessage
^top
longdo.PopupMini
longdo.PopupMini(placeholder, map)
PopupMini class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.Popup
Property/Method List
set
set(popup, mode)
Set popup

@param {Popup} popup
boolmode: Show or hide   (Default: toggle)
thisSelf
get
get()
Get last popup

Popuppopup
visible
visible(state)
Visible

Getter
boolCurrent state

Setter
boolstate: New state
thisSelf
^top
longdo.FloorSelector
longdo.FloorSelector(placeholder, map)
FloorSelector class

Private constructor
Elementplaceholder: Placeholder element
Mapmap: Map

See Also:UiCollection.FloorSelector
Property/Method List
visible
visible(id, floorList)
Visible

Getter
boolCurrent state

Setter
stringid: POI ID
string[]floorList: Floor list
thisSelf
^top
longdo.UiPosition
UI position enumeration

Static class
Property/Method List
Left
Left side flag
Right
Right side flag
^top
longdo.UiComponent
UI Component enumeration

Static class
Property/Method List
Full
Full mode
Compact
Compact mode - Same as full mode but layer selector will show as dropdown
Mobile
Mobile mode - Same as compact mode but with small zoombar, No directional pad and toolbar
None
No UI mode
^top
longdo.UiCollection
longdo.UiCollection(map, handler, ui, input)
UiCollection class

Private constructor
Mapmap: Map
Objecthandler: Handler
UiComponentui: Default UI
boolinput: Use default input

See Also:Map.Ui
Property/Method List
language
language(value)
Access language setting in ISO 639-1 format

Getter
stringCurrent language

Setter
stringvalue: New language
thisSelf

See Also:en.wikipedia.org/wiki/List_of_ISO_639-1_codes
add
add(control, position)
Add a control to top-right of map

LongdoControlcontrol: Control
UiPositionposition: Position   (Default: UiPosition.Left)
thisSelf
remove
remove(control)
Remove a control from map

LongdoControlcontrol: Control
thisSelf
enableTouchMeasure
enableTouchMeasure(options)
Enable measurement tool for touchscreen devices

TouchMeasureOptionsoptions: Extra options   (Default: Default value)
thisSelf
TopLeft
Top-left area of map
TopRight
Top-right area of map
BottomLeft
Bottom-left area of map
BottomRight
Bottom-right area of map
DPad
Directional pad

See Also:DPad
Geolocation
Geolocation button

See Also:Geolocation
Zoombar
Zoombar

See Also:Zoombar
Toolbar
Toolbar

See Also:Toolbar
LayerSelector
Layer selector

See Also:LayerSelector
Fullscreen
Fullscreen

See Also:Fullscreen
Scale
Scale

See Also:Scale
Legend
Legend

See Also:Legend
Notice
Notice

See Also:Notice
ContextMenu
Context menu

See Also:ContextMenu
Tooltip
Tooltip

See Also:Tooltip
FloorSelector
Floor selector

See Also:FloorSelector
Crosshair
Crosshair

See Also:Crosshair
Keyboard
Keyboard

See Also:Keyboard
Mouse
Mouse

See Also:Mouse
^top
longdo.MapTheme
Longdo map theme singleton class

Static class
^top
longdo.Util
Utility singleton class

Static class
Property/Method List
append
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
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
empty(element)
Remove all children from an element

Elementelement: Parent element
ElementEmpty element
addClass
addClass(element, className)
Add class to an element

Elementelement: Element
stringclassName: Class
ElementElement with added class
removeClass
removeClass(element, className)
Remove class from an element

Elementelement: Element
stringclassName: Class
ElementElement without removed class
hasClass
hasClass(element, className)
Check if an element has the specified class

Elementelement: Element
stringclassName: Class
boolHas class
transformOrigin
transformOrigin(element, origin)
Set transform origin of the element

Elementelement: Element
Pointorigin: Origin
transform
transform(element, mode, value, offset)
Scale element

Elementelement: Element
stringmode: Transform mode
numbervalue: value
Pointoffset: Translation offset
translate
translate(element, offset)
Translate element

Elementelement: Element
Pointoffset: Translation offset
transition
transition(element, state)
Animate or stop an element

Elementelement: Element
boolstate: State
transitionEnd
transitionEnd(element, callback)
Add animation end callback to an element

Elementelement: Element
delegatecallback: Callback function(event: Event): void   (Default: no callback)
loadStyle
loadStyle(url, media)
Load an additional stylesheet

stringurl: Stylesheet URL
stringmedia: Media   (Default: all)
loadScript
loadScript(url, callback)
Load an additional script

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

stringurl: Service URL
delegatecallback: Callback function(data: Object): void   (Default: no callback)
XMLHttpRequestThe request
isHD
isHD()
Check if display device has high pixel density or not

boolIs HD screen
validateLocation
validateLocation(location)
Validate the location

Locationlocation: Location in degree
boolIs location valid
boundOfTile
boundOfTile(projection, tile)
Find bounding box of the tile in target projection

Projectionsprojection: Projection
Tiletile: Tile
BoundBounding box
centerOfBound
centerOfBound(bound)
Find center of the bounding box

BoundBounding: box
LocationCenter location
sizeOfBound
sizeOfBound(bound)
Find size of the bounding box

BoundBounding: box
SizeSize in degree
polygonPivot
polygonPivot(locationList)
Find a location to represent the polygon

Location[]locationList: List of polygon vertices
LocationPivot Location
See Also:gis.stackexchange.com/a/76563
polylinePivot
polylinePivot(locationList)
Find a location to represent the polyline

Location[]locationList: List of polyline vertices
LocationPivot Location
locationBound
locationBound(locationList)
Find bounding box of the list of locations

Location[]locationList: List of locations
BoundBounding box
averageLocation
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
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
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
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
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
translateGeom(locationList, vector)
Translate geometry

Location[]locationList: List of geometry vertices
Locationvector: Distance to shift
Location[]List of translated geometry vertices
rotateGeom
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
longitudeLength(lat)
Find length of a degree of longitude at the given Latitude
Using fourier series

numberlat: Latitude
numberLength in metre
latitudeLength
latitudeLength(lat)
Find length of a degree of latitude at the given Latitude
Using fourier series

numberlat: Latitude
numberLength in metre
sameLocation
sameLocation(a, b)
Check if the given locations are equal

Locationa: First location
Locationb: Second location
boolIs same location
overlayFromWkt
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
overlayToWkt(overlayList)
Export overlay to well-known text

Polyline[]overlayList: List of homogeneous geometries
stringWell-known text
overlayFromGeoJSON
overlayFromGeoJSON(geo, options)
Create overlay from GeoJSON

Objectgeo: GeoJSON Object
GeometryOptionsoptions: Extra options   (Default: Default value)
Polyline[]Geometry overlays
overlayToGeoJSON
overlayToGeoJSON(overlayList)
Export overlay to GeoJSON

Polyline[]overlayList: List of homogeneous geometries
ObjectGeoJSON
locationToDMS
locationToDMS(location)
Convert decimal degrees location to degrees minutes seconds

Locationlocation: Location in degree
Objectdegrees minutes seconds version of location
locationToUTMZone
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
locationToGeohash(location, precision)
Find Geohash from the Location

Locationlocation: Location in degree
@param {int} precision
StringGeohash
boundOfGeohash
boundOfGeohash(geohash)
Find bounding box of the geohash

Stringgeohash: Geohash
BoundBounding box
isInRange
isInRange(value, range)
Check if the value is in the range

intvalue: Value
Rangerange: Range
boolIs value inside range
isAbsInRange
isAbsInRange(value, range)
Check if absolute of the value is in the range

intvalue: Value
intrange: Range
boolIs Absolute value inside range
bound
bound(value, min, max)
Limit value to the bound

intvalue: Value
intmin: Lower bound
intmax: Upper bound
intBounded value
boundAngle
boundAngle(value)
Limit angle to 0 - 360

Numbervalue: Angle in degree
NumberBounded angle
lastItem
lastItem(array)
Get last item in the array

Object[]array: Array
ObjectLast item in array
pushOrder
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
capFirst(string)
Capitalise first letter of the string

stringstring: String
stringFormatted string
formatDate
formatDate(date, language)
Format the given date

stringdate: Date string
stringlanguage: Language in ISO 639-1
stringFormatted date string
formatTime
formatTime(time)
Format the given time

stringtime: Time string
stringFormatted time string
formatDateTimeRange
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
formatInterval(interval, language)
Format the given time interval

numberinterval: Time interval in second
stringlanguage: Language in ISO 639-1
stringFormatted interval string
formatDistance
formatDistance(distance, language)
Format the given distance

numberdistance: Distance in metre
stringlanguage: Language in ISO 639-1
stringFormatted distance string
formatArea
formatArea(area, language)
Format the given area

numberarea: Area in square metre
stringlanguage: Language in ISO 639-1
stringFormatted area string
formatThaiArea
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
numberWithCommas(number)
Add thousands separator to the number

int|stringnumber: Number
stringNumber string with commas
hexToRgba
hexToRgba(color)
Convert hexadecimal color notation to RGBA

stringcolor: Hexadecimal color notation
stringEquivalent RGBA color notation
^top