Optional
apiAn API key will ensure control and ownership over data
Optional
attributionHide the attribution tag. [default: false]
Optional
attributionsSet attributions for data. { [name: string]: URL string }
ex.
{
"OpenS2": "https://opens2.com/data"
}
Optional
canallow the user to move the map. [default: true]
Optional
canvasReference a canvas instead of a container
Optional
canvasControl the number of fragments per pixel. [default: window.devicePixelRatio]
Optional
canallow the user to zoom the map. [default: true]
Optional
colorblindDisplay a colorblind controller state. [default: true]
Optional
compassDisplay a compass controller state. [default: true]
Optional
containerCan be a reference to an ID (string) or an HTMLElement
Optional
contextForces the use of specific GPU Context:
1
: WebGL2
: WebGL23
: WebGPUOptional
controlszoom, compass, and colorblind turned on or off. [default: true]
Optional
darkdisplay controls, info icon, etc. in a dark style. [default: false]
Optional
hashIf true, the map will update the URL Hash with it's current View.
e.g. https://opens2.com/example/map#lon=0&lat=0&zoom=0&pitch=0&bearing=0
[default: false]
Optional
interactiveIf true, the map will be interactive with user mouse/keyboard/finger inputs; [default: true]
Optional
noAlow latitude and longitude to pass their limits (-90, 90) and (-180, 180) respectively. [default: false]
Optional
offscreenSupport OffscreenCanvas
Optional
positionalIf true, cursor position impacts zoom's x & y directions. [default: true]
Optional
scrollIf true, allow user to use scroll wheel to zoom. [default: true]
Either the style definition or a string URL pointing to the location of the style definition
Optional
urlAn API URL that remaps any source strings that start with "apiURL://" to whatever apiURL is
ex.
{
"apiURL": "https://api.opens2.com",
"baseURL": "https://opens2.com"
}
Optional
watermarkHide the logo. [default: false]
Optional
zoomDisplay a zoom controller state. [default: true]
Map MapOptions
Description
User defined configuration options for the map.
At a minimum, you probably want to define a StyleDefinition and an HTML element
container
.ex.
Rendering Options
contextType
: [See GPUType] Forces the use of specific GPU Context:1
: WebGL2
: WebGL23
: WebGPUoffscreen
: Support OffscreenCanvascanvas
: Reference a canvas instead of a containercontainer
: Can be a reference to an ID (string) or an HTMLElementstyle
: [See StyleDefinition] Either the style definition or a string URL pointing to the location of the style definitioncanvasMultiplier
: Control the number of fragments per pixel. [default: window.devicePixelRatio]darkMode
: boolean flag. Enable dark mode. [default: false]Control Options
interactive
: boolean flag. If true, the map will be interactive with user mouse/keyboard/finger inputs; [default: true]scrollZoom
: boolean flag. If true, allow user to use scroll wheel to zoom. [default: true]positionalZoom
: boolean flag. If true, cursor position impacts zoom's x & y directions. [default: true]controls
: boolean flag. If true, enable default controls; [default: true]zoomController
: boolean flag. Display zoom controller state. [default: true]compassController
: boolean flag. Display compass controller state. [default: true]colorblindController
: boolean flag. Display colorblind controller state. [default: true]canZoom
: boolean flag. Enable zooming functionality. [default: true]canMove
: boolean flag. Enable panning/moving functionality. [default: true]noClamp
: boolean flag. Allow latitude and longitude to pass their limits (-90, 90) and (-180, 180) respectively [default: false]Additional Options
hash
: If true, the map will update the URL Hash with it's current View. [default: false]apiKey
: string. API key for the map service.urlMap
: [See UrlMap] An API URL that remaps any source strings that start with "example://" to whatever example is{ "apiURL": "https://api.opens2.com" }
attributions
: Set additional attributions to be displayed on the map.{ "OpenS2": "https://opens2.com/data" }
attributionOff
: boolean flag. Disable attribution display. [default: false]watermarkOff
: boolean flag. Disable watermark display. [default: false]