Three.js GIS Map (connect layers/attributive information)

236 Views Asked by At

Q: How to connect Three.js with any GIS map and place/process .JS (important .js) object there?

Description:

I have an app with .js model and 3D mesh model (tiles), now I need to retrieve the attributive information of the map (3D mesh) objects where ray intersects, e. I.: this is water, this is forest.

I got an idea to connect any open map and retrieve the information from there by layers (water layer, forest layer).

So far I found threebox + mapbox-gl to connect OpenStreetMap (seems like the one solution). But I cannot place the .js object. Moreover, there are two instances of three.js in the project (one is mine and one from threebox). Can anyone explain how to:

  1. Use just one Three.js instance?
  2. Place JS object in map?
  3. Move object in map (in my own app I have manipulators, but seems like they won't work)?

Would be nice to hear @jscastro

No result:

tb.loadObj({
        obj: 'projects/testProject/model/js/test.js',
        type: 'custom',
        scale: 1, /* same for 1000000000 */
        units: 'meters',
        rotation: { x: 90, y: 177, z: 0 },
        anchor: 'auto'
    }, function (model) {
        console.log(model)
        model.setCoords([25.2826859, 54.6718792, 1280]);
        model.addTooltip("Blabla", true);
        model.color = 0xffffff;
        //model.selected = true;
        tb.add(model);
    })

up: no problem with loading .js in own app.

0

There are 0 best solutions below