Hi Silvio
I think the reason you don't see anything is because your
cesium globe has nothing to display. It downloads the terrain
fine, but there's no overlay.
To use the overlay you defined for your 2D map with ol3, you
have to setup a Synchronizer, who takes care to 'translate' a
2D resource (wmts, wms, vector data) into a 3D resource.
See initialisation process in mf-geoadmin3:
https://github.com/geoadmin/mf-geoadmin3/blob/master/src/js/GaCesium.js#L83
I hope this helps.
Gilbert
>>> href="
http://openlayers.org/en/v3.14.2/css/ol.css [2]"
>> [3]"></script>
>> [4]
>> [5]")
>>>
>>> var swisstlm3d = new ol.layer.Tile({
>>> source: new ol.source.WMTS(options)
>>> });
>>>
>>> var map = new ol.Map({
>>> controls: ol.control.defaults().extend([
>>> new ol.control.ScaleLine({
>>> units: 'degrees'
>>> })
>>> ]),
>>> layers: [swisstlm3d],
>>> target: 'map',
>>> view: new ol.View({
>>> projection:'EPSG:4326',
>>> center: [8.5, 46],
>>> zoom: 10
>>> })
>>> });
>>>
>>> var ol3d = new olcs.OLCesium({map: map});
>>> var scene = ol3d.getCesiumScene();
>>> var terrainProvider = new Cesium.CesiumTerrainProvider({
>>> url:
>>>
>>
> '//
3d.geo.admin.ch/1.0.0/ch.swisstopo.terrain.3d/default/20160115/4326
>> [6]'
>>> });
>>> scene.terrainProvider = terrainProvider;
>>>
>>> //if this is enabled, the scene remains black
>>> ol3d.setEnabled(true);
>>>
>>> })
>>>
>>> </script>
>>> </body>
>>> </html>
>>>
>>> --
>>> You received this message because you are subscribed to the
>> Google
>>> Groups "GeoAdmin API" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>
>>> send an email to
geoadmin-api...@googlegroups.com.
>>> For more options, visit
https://groups.google.com/d/optout [7]
>> [1]
>>> [2]
https://groups.google.com/d/optout [7]
>
> --
> You received this message because you are subscribed to the Google
> Groups "GeoAdmin API" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
geoadmin-api...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout [7].
> [2]
http://openlayers.org/en/v3.14.2/css/ol.css
> [3]
http://openlayers.org/en/v3.14.2/build/ol.js
> [4]
>
http://wmts10.geo.admin.ch/EPSG/4326/1.0.0/WMTSCapabilities.xml').then(function(response)
> [5]
>
http://wmts10.geo.admin.ch/1.0.0/ch.swisstopo.swisstlm3d-karte-farbe/default/%7BTime%7D/4326/%7BTileMatrix%7D/%7BTileCol%7D/%7BTileRow%7D.png
> [6]
>
http://3d.geo.admin.ch/1.0.0/ch.swisstopo.terrain.3d/default/20160115/4326
> [7]
https://groups.google.com/d/optout