Optional
boundsOptional
centerInitial position of the map, array of two degrees [longitude, latitude]. LngLatArray
Optional
controlsList of controls that will be initialized when creating a map instance. It can be defined as a string, then points to the corresponding entry in the controlAdapters.
['ZOOM', 'ATTRIBUTION']
{
controls: [
'ZOOM',
new CustomControl()
]
}
Optional
controlsSet options for those controls that are specified by name.
{
controls: ['ZOOM', 'button1', 'button2'],
controlsOptions: {
'ZOOM': { position: 'top-right' },
'button1': { control: 'BUTTON', position: 'top-left' },
'button2': { control: 'BUTTON' },
}
}
Optional
createАutomatic creation of a map from the constructor
false
const webMap = new WebMap(options);
// create: false
webMap.create().then(() => doSomething());
// create: true
webMap.emitter.on('created', () => doSomething());
Optional
fitoptions to specify the initial position of the map
Optional
mapA pre-initialized instance of the map
Optional
mapThe main initialization property of WebMap. Determines the way of interaction with the selected GIS framework. Available: Leaflet; Openlayers; MapboxGL
Optional
mapspecial settings for the selected map adapter
Optional
maxOptional
maxThe maximum zoom level of the map (0-24).
Optional
minThe minimum zoom level of the map (0-24).
Optional
onThe callback function is calling before adding each layer
Optional
paintOptional
runtimeA way to save the state of a map to external services
import RuntimeParams from '@nextgis/url-runtime-params';
// this will allow to write in the url params of map center and zoomlevel when moving
new WebMap({
mapAdapter: new MapAdapter(),
runtimeParams: [new RuntimeParams]
})
Optional
selectedOptional
starterOne way to extend WebMap functionality with the help of kits.
Optional
targetThe HTML element in which NgwMap will render the map, or the element's string id. The specified element must have no children.
Optional
tileOptional
viewOptional
zoomThe initial zoom level of the map (0-24).
Generated using TypeDoc
Initial extent of the map, array of degrees in [west, south, east, north] order.
Remarks
Overrides the
center
andzoom
parameters. LngLatBoundsArrayExample