Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Option

Type

Default

Description

restApi

String

https://beta-api.ambita.com

REST API address, for production use https://api.ambita.com

crs

CRS Object

L.ambita.CRS[‘EPSG:25833’]

Map CRS used to show the base and other layers on the map in a different coordinate system than WGS84

zoom

Number

10

Initial map zoom level, a number between 1 and 17

center

Number[]

[60, 10]

Initial center of the map, an array of two coordinates in WGS84 coordinate system [latitude‎, longitude‎]

keyboard

Boolean

true

Enable keyboard controlled movement of the map

inertia

Boolean

true

Enable inertia when panning the map using mouse

attributionControl

Boolean

false

Show attribution control on the map

attributionControlOptions

Object

undefined

Options to customize the attribution control, see below for options

minZoom

Number

3

Minimum zoom level of the map

maxZoom

Number

17

Maximum zoom level of the map

ambitaToken

String

undefined

Authorization token from the Ambita authentication API (must set token to undefined on map initialization to use this option)

geoToken

String

undefined

GeoData token (fetched automatically on map initialization if not specified)

maxRetries

Number

3

Number of times tokenrequired is fired before ignoring new tokenrequired events. If the tokenrequired event is fired 3 consecutive times without getting a valid authorization token, then tokenfailed event is fired.

svgPathClassName

String

‘selection-cadastre’

Default SVG path class name for geometries added to the map

detailedHeightLegendControl

Boolean

true

Enable the detailed height legend control

fitBuffer

Number

10

The default buffer for fitBounds calls of points in pixels

zoomControl

Boolean

false

Show the default Leaflet zoom control

showPropertyLayer

Boolean

true

Show the property layer on the map

fullscreenControl

Boolean

undefined

Show the default Leaflet fullscreen control

layerControl

Boolean

true

Show the layer control button

layerControlPosition

String

‘topleft’

Position of the layer control button

layerControlHtml

String

L.ambita.Statics.SVG_BUTTONS.layers

HTML for the layer control button

scaleControl

Boolean

false

Show the scale control at the bottom left corner of the map

poweredByControl

Boolean

true

Show the Powered by Ambita control at the bottom right corner of the map

editable

Boolean

true

Enable the editing of geometries functionality on the map

editOptions.lineGuideOptions.className

String

‘selection-lineguide’

Class name of the selection tools line guide

editOptions.middleMarkerClass

Class

middleMarkerCustom

Custom class of the selection tools middle markers

selectionToolsOptions

Object

{ show: false }

Options to customize the selection tools, see below for options

pocLayer

Object

undefined

Options to customize the POC layer, see below for options

pobLayer

Object

undefined

Options to customize the POB layer, see below for options

restrictToMunicipality

String

undefined

Municipality code of the Norway municipality to fetch and draw a border of

addZoomControl

Boolean

true

Show the zoom control buttons

animateTools

Boolean

false

Animate the display of zoom, layer, selection tools controls

tokenUrl

String

‘/authentication/v2/token’

Path to authorization token resource

geoTokenUrl

String

‘/authentication/v2/geodatatoken’

Path to GeoData token resource

url

String

‘arcgis/rest/services/’

Path to ArcGIS REST services

utmCache

String

‘Geocache_UTM33_EUREF89/’

Path to UTM Cache service

utmDynamic

String

‘Geomap_UTM33_EUREF89/’

Path to UTM Dynamic service

mapServer

String

‘/MapServer/’

Path to map server

cache

String

‘Geocache’

Name of UTM Cache service

dynamic

String

‘Geomap’

Name of UTM Dynamic service

base

String

‘Basis’

Name of the base map layer

orto

String

‘Bilder’

Name of the map orto layer

property

String

‘Eiendom2’‘Eiendom3’

Name of the map property layer

cacheServer

String

https://services.geodataonline.no/

UTM Cache server address

dynamicServer

String

https://services.geodataonline.no/

UTM Dynamic server address

static

Boolean

false

Enable static map (no interactivity)

nopan

Boolean

false

Disable panning of the map

maxHeight

Number

200

Maximum height of the feature popup

maxWidth

Number

300

Maximum width of the feature popup

minWidth

Number

100

Minimum width of the feature popup

offset

Point

L.point(0, 0)

Offset of the feature popup

tokenExpiration

Number

60

GeoData token expiration time in minutes

ambitaControls

Object[]

undefined

Array of customizable Ambita controls, see below for options

fullscreenControlOptions

Object

undefined

Options to customize the fullscreen control, see below for options

scaleControlOptions

Object

undefined

Options to customize the scale control, see below for options

...