JS API
Map Object
QueryEngine Object
Layer Object
Feature Object
Query Object
GeoJson Function Library (Experimental)

Options

Name Default Description
debug false If this option is set to true, debug information is written to the console.
server null If the value is null, the Mapzania server that is used by the JavaScript API is the same the one from which the javascript is served.

If not, it should be a url to the api root of the server that will be used e.g. www.mapzania.com/mz (see example below).

NOTE: You will have to enable CORS in the server application to which you are connecting. See this article from Microsoft on how to enable CORS.
toolbar (default toolbar options) A object used to configure the toolbar.

See below for the valid settings of this object.

Toolbar Options

Name Default Description
layout Mapzania.Toolbar.Layouts.Simple

or, equivalently

["ZoomIn", "ZoomOut", "Reset"]
An array of button key strings, which the toolbar uses to determine which built-in buttons to display.

The lists of pre-defined layouts and built-in buttons are shown below.

Built-In Buttons

Key Description
'ZoomIn' Zooms the map in by 1 zoom step
'ZoomOut' Zooms the map out by 1 zoom step
'Reset' Resets the map to its starting bounds
'Pan' Sets the map to normal navigation (pan) mode
'DrawPoint' Sets the map to point-drawing mode
'DrawLine' Sets the map to line-drawing mode
'DrawPolygon' Sets the map to polygon-drawing mode

Pre-Defined Toolbar Layouts

Reference Value
Mapzania.Toolbar.Layouts.Simple ["ZoomIn", "ZoomOut", "Reset"]
Mapzania.Toolbar.Layouts.Standard ["ZoomIn", "ZoomOut", "Reset", "Pan", "DrawPoint", "DrawLine", "DrawPolygon"]