1. A concise explanation of the problem you’re experiencing.
Hi I am building an application where i want the OSM as the default base layer instead of the bing Maps is there a way to do so. I have tried adding the code as mentioned as shown below
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
var osm = new Cesium.OpenStreetMapImageryProvider({
url : 'https://a.tile.openstreetmap.org/'
});
But it throws an error
“Uncaught TypeError: Cesium.OpenStreetMapImageryProvider is not a constructor”
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
Because of the reason i have to visualize the data every time a small change happens and i am nearly at the limit of 1000 bing sessions. Secondly i am doing this for my MS so i cant buy the cesium ion upgraded version
4. The Cesium version you’re using, your operating system and browser.
var osm = new Cesium.createOpenStreetMapImageryProvider({
url : '[https://a.tile.openstreetmap.org/](https://a.tile.openstreetmap.org/)'
});
this.viewer.imagerLayers.addImageryProvider(osm)
I am still getting the following error:
ERROR TypeError: Cesium.createOpenStreetMapImageryProvider is not a constructor
The name of the constructor for OpenStreetMap imagery has changed. See this note from CHANGES.md:
createTileMapServiceImageryProvider and createOpenStreetMapImageryProvider have been removed. Instead, pass the same options to new TileMapServiceImageryProvider and new OpenStreetMapImageryProvider respectively. The old functions have been deprecated since 1.62. #8174