< docs

tiled services test

This page tests initializing geomap with different services that support the same tilingScheme.

So long as all services support the current tiling scheme, they are interchangeabe without worrying about the tilingScheme property.

Dynamic services can be layered on top of tiled services as they don't require a tilingScheme at all, however you have to make sure the map units match, e.g., the dynamic service accepts a geodetic (lon/lat) bounding box or you set $.proj to null and work entirely in a specific projection's map units.

service examples

Choose a services array and click set via init to refresh the page and re-initialize the map (including center & zoom properties) or set via property to change only the services property at runtime.

[
  {
    id: "OSM",
    type: "tiled",
    src: function (view) {
      return "http://tile.openstreetmap.org/"
       + view.zoom + "/"
       + view.tile.column + "/"
       + view.tile.row
       + ".png";
    },
    attr: "© OpenStreetMap & contributors, CC-BY-SA"
  }
]
[
  {
    id: "OSM_MapQuest",
    type: "tiled",
    src: function (view) {
      return "http://otile" + ((view.index % 4) + 1) + ".mqcdn.com/tiles/1.0.0/osm/"
       + view.zoom + "/"
       + view.tile.column + "/"
       + view.tile.row
       + ".png";
    },
    attr: "Tiles Courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png'>"
  }
]
[
  {
    id: "Ortho_MapQuest",
    type: "tiled",
    src: function (view) {
      return "http://oatile" + ((view.index % 4) + 1) + ".mqcdn.com/naip/"
       + view.zoom + "/"
       + view.tile.column + "/"
       + view.tile.row
       + ".png";
    },
    attr: "Tiles Courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png'>"
  }
]
[
  {
    id: "Ortho_MapQuest",
    type: "tiled",
    src: function (view) {
      return "http://oatile" + ((view.index % 4) + 1) + ".mqcdn.com/naip/"
       + view.zoom + "/"
       + view.tile.column + "/"
       + view.tile.row
       + ".png";
    },
    attr: "Tiles Courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png'>"
  },
  {
    id: "OSM_MapQuest",
    type: "tiled",
    src: function (view) {
      return "http://otile" + ((view.index % 4) + 1) + ".mqcdn.com/tiles/1.0.0/osm/"
       + view.zoom + "/"
       + view.tile.column + "/"
       + view.tile.row
       + ".png";
    },
    style: { opacity: .3 }
  }
]