Friday, 12 July 2019

wms - OpenLayers 3 and Three.js


I have asked this question in StackOverflow, but got no useful answer - So perhaps I could get some help here.


I would like to generate a 3d Terrain using THREE.js, and I would like to overlay OpenLayers upon it. Does anyone know how to do it?


EDIT: I tried this (based on this)



var sphere2 = new THREE.Mesh(new THREE.SphereGeometry(60, 100, 100),material2);
scene.add(sphere2);
sphere2.position = new THREE.Vector3(100,230,140);
var material3= new THREE.MeshPhongMaterial();
material3.map = THREE.ImageUtils.loadTexture('http://vmap0.tiles.osgeo.org/wms/vmap0?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=basic&CRS=epsg:4326&BBOX=-90,-180,90,180&WIDTH=500&HEIGHT=500&FORMAT=image/png');

This should generate a sphere, and map the texture as returned by the WMS call to the sphere, making a full earth - but it does not load anything - the screen remains black.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...