layers.type String

The layer type. Supported types are:

  • "bing" - a Bing (tm) tile layer
  • "tile" - a generic "slippy map" tile layer
  • "marker" - a data-bound marker layer
  • "shape" - a vector shape layer, e.g. bound to GeoJSON data
  • "bubble" - a specialized vector shape layer for bubble maps

Example - creating a tile layer

<div id="map"></div>
        layers: [{
            type: "tile",
            urlTemplate: " zoom #/#= x #/#= y #.png",
            attribution: "&copy; OpenStreetMap"
In this article