Use a Custom Map Extent
Leaflet Map Control
Use a Custom Map Extent
To display a map with a custom
startup
extent, specify the
mapCenter
and
mapZoom
in the
configObject
:
afterViewLoad: function(){ var configObject = new Ab.view.ConfigObject(); configObject.mapCenter = [42.35803652353272, -71.06163024902344]; configObject.mapZoom = 14; this.mapControl = new Ab.leaflet.Map('mapPanel', 'mapDiv', configObject); },
A helper view is included to assist with determining and formatting
mapCenter
and
mapZoom
. The view provides a
geocoder
as well as access to all the Esri basemaps. Using the tools provided in the helper view, position the map as desired. Hit the Map Extent button to get the
mapCenter
and
mapZoom
for the current map. Copy and paste this message into your
configObject
.
View: http://localhost:8080/archibus/ab-leaflet-extent-helper.axvw