8.7 KiB
Types
bbox
A bounding box that describes which part of the map the user is currently viewing.
top
(number, min: -90, max: 90): The latitude of the north end of the boxbottom
(number, min: -90, max: 90): The latitude of the south end of the boxleft
(number, min: -180, max: 180): The longitude of the west end of the boxright
(number, min: -180, max: 180): The longitude of the east end of the boxzoom
(number, min: 1, max: 20): The current zoom level. This is relevant for the density of track points that should be received.
marker
id
(number): The ID of this markerlat
(number, min: -90, max: 90): The latitude of this markerlon
(number, min: -180, max: 180): The longitude of this markername
(string): The name of this markercolour
(string): The colour of this marker as a 6-digit hex value, for exampleff0000
size
(number, min: 15): The height of the marker in pixelssymbol
(string): The symbol code for the marker. Default is an empty string.shape
(string): The shape code for the marker. Default is an empty string (equals"drop"
).elevation
(number): The elevation of this marker in metres (set by the server)typeId
(number): The ID of the type of this markerdata
({"key", "value"}
): The filled out form fields of the marker
line
Each line has routePoints
and trackPoints
. The routePoints
are the start, end and via points that the user created
for that line, the trackPoints
describe how the line should be drawn. If no routing is used, routePoints
and
trackPoints
are equal, but with routing, there will be a lot more trackPoints
than routePoints
.
When creating or updating a line, the trackPoints
, distance
and time
properties are automatically calculated by
the server. Only when the routing mode is track
, the trackPoints
can be specified by hand (meant for importing
existing tracks, for example from a GPX file). The idx
, zoom
and ele
properties of the track points are added by
the server automatically.
Note that line
objects coming from the server don’t contain the trackPoints
property, but the track points are sent
separately through linePoints
events.
id
(number): The ID of this lineroutePoints
([{lat, lon}]
): The route pointsmode
(string): The routing mode, an empty string for no routing, orcar
,bicycle
,pedestrian
, ortrack
colour
(string): The colour of this marker as a 6-digit hex value, for example0000ff
width
(number, min: 1): The width of the linename
(string): The name of the linedistance
(number): The distance of the line in kilometers (set by the server)ascent
,descent
(number): The total ascent/descent of the line in metres (set by the server)time
(number): The time it takes to travel the route in seconds (only if routing mode iscar
,bicycle
orpedestrian
) (set by the server)left
,top
,right
,bottom
(number): The bounding box of the line (set by the server)typeId
(number): The ID of the type of this linedata
({"key", "value"}
): The filled out form fields of the linetrackPoints
:- In the
lines
property of the client, an object of the format{"<idx>": trackPoint}
- When creating/updating a line with the routing mode
track
, an array of the format[trackPoint]
- In the
trackPoint
All track points have a zoom
level and are only received when the zoom level of the current bbox is at least that
level. This makes sure that at a small zoom level, only a low resolution of the line has to be downloaded. When zooming
in, only the additional track points are retrieved. They can be merged into the already retrieved track points using
their idx
property.
idx
(number): The index of this track point in the list of all track points of this linelat
(number, min: -90, max: 90): The latitude of this pointlon
(number, min: -180, max: 180): The longitude of this pointzoom
(number, min: 1, max: 20): The miminum zoom level from which this track point makes sense to showele
(number): The elevation of this track point in metres (set by the server). Not set for high zoom levels.
padData
id
(string): The read-only ID of this mapwriteId
(string): The read-write ID of this mapadminId
(string): The admin ID of this mapname
(string): The name of this mapsearchEngines
(boolean): Whether search engines may index the read-only version of this mapdescription
(string): The description for search enginesclusterMarkers
(boolean): Whether many markers close to each other should be grouped togetherlegend1
,legend2
(string): Markdown free text to be shown above and below the legenddefaultViewId
(number): The ID of the default view (if any)defaultView
(view): A copy of the default view object
view
id
(number): The ID of this viewname
(string): The name of this viewbaseLayer
(string): The key of the base layer in this viewlayers
([string]): An array of activated overlays in this viewtop
,bottom
,left
,right
: The bbox of this viewfilter
(string): If set, filter the objects according to this filtrex expression
historyEntry
id
(number): The ID of this history entrytime
(Date): The time when the modification was donetype
(string): The type of object that was modified, one ofMarker
,Line
,View
,Type
,Pad
action
(string): The action that was done, one ofcreate
,update
,delete
objectId
(number): The ID of the object that was modified (null if the object was the map itself)objectBefore
(object): The object before the modification (null ifaction
iscreate
)objectAfter
(object): The object after the modification (null ifaction
isdelete
)
type
id
(number): The ID of this typename
(string): The name of this typetype
(string):marker
orline
defaultColour
,defaultSize
,defaultSymbol
,defaultWidth
,defaultMode
(string/number): Default values for the different object propertiescolourFixed
,sizeFixed
,symbolFixed
,shapeFixed
,widthFixed
,modeFixed
(boolean): Whether those values are fixed and cannot be changed for an individual objectfields
([object]): The form fields for this type. Each field has the following properties:name
(string): The name of the field. This is at the same time the key in thedata
properties of markers and linesoldName
(string): When renaming a field (usingeditType(data)
), specify the former name heretype
(string): The type of field, one oftextarea
,dropdown
,checkbox
,input
controlColour
,controlSize
,controlSymbol
,controlShape
,controlWidth
(boolean): If this field is a dropdown, whether the different options set a specific property on the objectdefault
(string/boolean): The default value of this fieldoptions
([object]): If this field is a dropdown, an array of objects with the following properties:value
(string): The value of this option.oldValue
(string): When renaming a dropdown option (usingeditType(data)
), specify the former value herecolour
,size
,shape
,symbol
,width
(string/number): The property value if this field controls that property
searchResult
short_name
(string): Name of the resultdisplay_name
(string): Name with addressaddress
(string): Only the addressboundingbox
(bbox): bbox that has a good view onto the result. Might be null ifzoom
is set.lat
,lon
(number): Position of the search result.zoom
(number): Zoom level at which there is a good view onto the result. Might be null ifboundingbox
is set.extratags
(object): Extra OSM tags that might be usefulgeojson
(object): GeoJSON if the result has a shapeicon
(string): Symbol key of the resulttype
(string): Type of the resultid
(string): If the result is an OSM object, the ID of the OSM object, prefixed byn
(node),w
(way) orr
(relation)ele
(number): Elevation in meters
route
routePoints
(array): Array of route points (objects withlon
andlat
properties)mode
(string): Route mode:"car"
,"bicycle"
,"pedestrian"
or an empty string""
for a direct linetrackPoints
(array): An array of track points (objects with alon
,lat
,ele
,idx
property and also azoom
property that indicates from which zoom level the track point should be shown (to avoid an unnecessarily high resolution))distance
(number): The distance of the route in kilometerstime
(number): The time it takes to travel the route in secondsascent
(number): The total meters of climbdescent
(number) The total meters of drop