MCPcopy Index your code
hub / github.com/Maps4HTML/MapML.js / _createMap

Method _createMap

src/mapml-viewer.js:313–340  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

311 shadowRoot.appendChild(this._container);
312 }
313 _createMap() {
314 if (!this._map) {
315 this._map = map(this._container, {
316 center: new LatLng(this.lat, this.lon),
317 minZoom: 0,
318 maxZoom: M[this.projection].options.resolutions.length - 1,
319 projection: this.projection,
320 query: true,
321 contextMenu: true,
322 announceMovement: M.options.announceMovement,
323 featureIndex: true,
324 mapEl: this,
325 crs: M[this.projection],
326 zoom: this.zoom,
327 zoomControl: false
328 });
329 this._addToHistory();
330
331 this._createControls();
332 this._toggleControls();
333 this._crosshair = crosshair().addTo(this._map);
334
335 if (M.options.featureIndexOverlayOption)
336 this._featureIndexOverlay = featureIndexOverlay().addTo(this._map);
337
338 this._setUpEvents();
339 }
340 }
341 disconnectedCallback() {
342 this._removeEvents();
343 while (this.shadowRoot.firstChild) {

Callers 1

connectedCallbackMethod · 0.95

Calls 6

_addToHistoryMethod · 0.95
_createControlsMethod · 0.95
_toggleControlsMethod · 0.95
_setUpEventsMethod · 0.95
crosshairFunction · 0.90
featureIndexOverlayFunction · 0.90

Tested by

no test coverage detected