createOpenStreetMapImageryProvider

createOpenStreetMapImageryProvider(options)

Creates a UrlTemplateImageryProvider instance that provides tiled imagery hosted by OpenStreetMap or another provider of Slippy tiles. The default url connects to OpenStreetMap's volunteer-run servers, so you must conform to their Tile Usage Policy.
Name Type Description
options Object optional Object with the following properties:
Name Type Default Description
url String 'https://a.tile.openstreetmap.org' optional The OpenStreetMap server url.
fileExtension String 'png' optional The file extension for images on the server.
proxy Object optional A proxy to use for requests. This object is expected to have a getURL function which returns the proxied URL.
rectangle Rectangle Rectangle.MAX_VALUE optional The rectangle of the layer.
minimumLevel Number 0 optional The minimum level-of-detail supported by the imagery provider.
maximumLevel Number optional The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
ellipsoid Ellipsoid optional The ellipsoid. If not specified, the WGS84 ellipsoid is used.
credit Credit | String 'MapQuest, Open Street Map and contributors, CC-BY-SA' optional A credit for the data source, which is displayed on the canvas.
Throws:
  • DeveloperError : The rectangle and minimumLevel indicate that there are more than four tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.
Example:
var osm = Cesium.createOpenStreetMapImageryProvider({
    url : 'https://a.tile.openstreetmap.org/'
});
See: