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: Full mode)
⌥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)
^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)
⌥floatopacity: 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)

^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)
⌥floatrotate: marker rotation in degree   (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 (For IE 8-10, only work with Polyline and Polygon without fillColor)   (Default: LineStyle.Solid)
⌥Locationpivot: 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)   (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)
⌥stringdropdpwnLabel: 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

⌥floatspan: 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)
^top
anonymous.Location
Anonymous type for store location

⎆floatlon: Longitude
⎆floatlat: 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

⎆floatminLon: Mininum longitude (inclusive)
⎆floatminLat: Mininum latitude (inclusive)
⎆floatmaxLon: Maxinum longitude (inclusive)
⎆floatmaxLat: 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 resize
Can prevent default behavior
resize
Map resized
repaint
Map repainted
zoom
Zoom level changed
zoomRange
Zoom range changed
location
Map location changed
fullscreen
Map enter/exit fullsceen

⏎boolIs fullscreen
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

⏎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

⏎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

⏎PointOffset
drop
User stop drag map
Can prevent default behavior
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

⏎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

⏎PopupPopup
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
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
⎆floatradius: 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 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)
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
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
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
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

⏎string[]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)
Access visible map bounding box

Getter
⏎BoundCurrent bounding box

Setter
⎆Boundvalue: New bounding box
⌥Locationpivot: Pivot of bounding box   (Default: center of bounding box)
⏎thisSelf
move
move(offset, animate)
Move map by 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

⎆floatvalue: 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
Convert position in page to position in placeholder

⎆Pointpage: Position from top-left of page
@returns {Point) position from top-left of map
loadingTile
loadingTile()
Get number of loading tiles

⏎intNumber of loading tiles
rotate
rotate(angle)
Rotate map

⎆Numberangle: Angle to rotate in degree
⏎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
⏎float2D 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.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
LongdoOverlay
LongdoOverlay(location, element, offset, visibleRange)
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
⌥MarkerOptions|GeometryOptions|LayerOptions|ObjectOptionsoptions: Extra options   (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
⌥boolanimate: Show animation   (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
Road
Air
Air
Railway
Railway
Ferry
Ferry
Tollway
Tollway
All
All
^top
longdo.RouteMode
Route mode enumeration

Static class
Property/Method List
Traffic
Avoid traffic jam, use fastest route
Cost
Use fastest route
Distance
Use shortest route
Walk
Walking, use shortest route
Both
Ignore driving direction, use fastest route
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.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(routeType, value)
Access route line options
Avaliable type are road, air, rail, ferry, focus

Getter
⎆RouteTyperouteType: Route type
⏎GeometryOptionsCurrent options

Setter
⎆RouteTyperouteType: Route 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
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
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
^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
^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
^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
LongdoControl
LongdoControl(element)
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.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
^top
longdo.Toolbar
longdo.Toolbar(placeholder, map, handler)
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.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.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
^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(message)
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
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
transform
transform(element, mode, value, offset, origin)
Scale element

⎆Elementelement: Element
⎆stringmode: Transform mode
⎆floatvalue: value
⎆Pointoffset: Translation offset
⎆Pointorigin: Origin of scale
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)
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
See Also:gis.stackexchange.com/a/76563

⎆Location[]locationList: List of polygon vertices
⏎LocationPivot Location
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
Use 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

⎆floatlat: Latitude
⏎floatLength in metre
latitudeLength
latitudeLength(lat)
Find length of a degree of latitude at the given Latitude
Using fourier series

⎆floatlat: Latitude
⏎floatLength 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
⏎stringwkt Well-known text
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
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