Skip to main content
added 65 characters in body
Source Link
Mike
  • 12.9k
  • 1
  • 12
  • 18

The quantized mesh will let you see terrain as in https://docs.maptiler.com/cesium/ it will not fill the holes at the poles, and the format is not supported by OpenLayers. To display the mountains in ol-cesium you would need to set the terrainProvider in the Cesium scene:

const scene = ol3d.getCesiumScene();

const terrainProvider = new Cesium.CesiumTerrainProvider({
  url: 'https://api.maptiler.com/tiles/terrain-quantized-mesh-v2/?key=MYKEY',
  requestVertexNormals: true
});

scene.terrainProvider = terrainProvider;

The holes at the poles is different problem. In the MapTiler example Cesium fills the holes by extending the color at the edge of the imagery to the pole

enter image description here

That works with a Cesium Viewer, but ol-cesium uses a Cesium Scene which does not support that, so your only option to get coverage at the poles would be to use an OpenLayers view and source in EPSG:4326 which reaches the poles as in https://openlayers.org/en/latest/examples/epsg-4326.html or https://openlayers.org/en/latest/examples/ogc-map-tiles-geographic.html

Working example https://jsbin.com/hudezugonu/edit?html,output

The quantized mesh will let you see terrain as in https://docs.maptiler.com/cesium/ it will not fill the holes at the poles, and the format is not supported by OpenLayers. To display the mountains in ol-cesium you would need to set the terrainProvider in the Cesium scene:

const scene = ol3d.getCesiumScene();

const terrainProvider = new Cesium.CesiumTerrainProvider({
  url: 'https://api.maptiler.com/tiles/terrain-quantized-mesh-v2/?key=MYKEY',
  requestVertexNormals: true
});

scene.terrainProvider = terrainProvider;

The holes at the poles is different problem. In the MapTiler example Cesium fills the holes by extending the color at the edge of the imagery to the pole

enter image description here

That works with a Cesium Viewer, but ol-cesium uses a Cesium Scene which does not support that, so your only option to get coverage at the poles would be to use an OpenLayers view and source in EPSG:4326 which reaches the poles as in https://openlayers.org/en/latest/examples/epsg-4326.html or https://openlayers.org/en/latest/examples/ogc-map-tiles-geographic.html

The quantized mesh will let you see terrain as in https://docs.maptiler.com/cesium/ it will not fill the holes at the poles, and the format is not supported by OpenLayers. To display the mountains in ol-cesium you would need to set the terrainProvider in the Cesium scene:

const scene = ol3d.getCesiumScene();

const terrainProvider = new Cesium.CesiumTerrainProvider({
  url: 'https://api.maptiler.com/tiles/terrain-quantized-mesh-v2/?key=MYKEY',
  requestVertexNormals: true
});

scene.terrainProvider = terrainProvider;

The holes at the poles is different problem. In the MapTiler example Cesium fills the holes by extending the color at the edge of the imagery to the pole

enter image description here

That works with a Cesium Viewer, but ol-cesium uses a Cesium Scene which does not support that, so your only option to get coverage at the poles would be to use an OpenLayers view and source in EPSG:4326 which reaches the poles as in https://openlayers.org/en/latest/examples/epsg-4326.html or https://openlayers.org/en/latest/examples/ogc-map-tiles-geographic.html

Working example https://jsbin.com/hudezugonu/edit?html,output

Source Link
Mike
  • 12.9k
  • 1
  • 12
  • 18

The quantized mesh will let you see terrain as in https://docs.maptiler.com/cesium/ it will not fill the holes at the poles, and the format is not supported by OpenLayers. To display the mountains in ol-cesium you would need to set the terrainProvider in the Cesium scene:

const scene = ol3d.getCesiumScene();

const terrainProvider = new Cesium.CesiumTerrainProvider({
  url: 'https://api.maptiler.com/tiles/terrain-quantized-mesh-v2/?key=MYKEY',
  requestVertexNormals: true
});

scene.terrainProvider = terrainProvider;

The holes at the poles is different problem. In the MapTiler example Cesium fills the holes by extending the color at the edge of the imagery to the pole

enter image description here

That works with a Cesium Viewer, but ol-cesium uses a Cesium Scene which does not support that, so your only option to get coverage at the poles would be to use an OpenLayers view and source in EPSG:4326 which reaches the poles as in https://openlayers.org/en/latest/examples/epsg-4326.html or https://openlayers.org/en/latest/examples/ogc-map-tiles-geographic.html