Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draw a line on openstreemap( via leaflet) and extrude something in threejs in this geo-viewer example? #11

Open
zxo102 opened this issue Jan 19, 2020 · 3 comments

Comments

@zxo102
Copy link

zxo102 commented Jan 19, 2020

Hi there,
geo-viewer is an amazing example and I am learning it (in three-geo/examples/geo-viewer/io/).

I would like to add something onto both openstreemap via leaflet and threejs in this geo-viewer example. Any documentations or suggestions? It is really appreciated if a demo is available for the above purpose.

Also, It is hard to read app.min.js, where can I get the unminified version?

Thanks a lot.

ouyang

@zxo102 zxo102 changed the title Where can I get the unminified version of app.js in three-geo/examples/geo-viewer/io/? Add something onto both openstreemap via leaflet and threejs in this geo-viewer example Jan 19, 2020
@zxo102 zxo102 changed the title Add something onto both openstreemap via leaflet and threejs in this geo-viewer example where is api of three-geo to add something onto openstreemap( via leaflet) and threejs in geo-viewer example? Jan 19, 2020
@zxo102 zxo102 changed the title where is api of three-geo to add something onto openstreemap( via leaflet) and threejs in geo-viewer example? How to add drawing a line on openstreemap( via leaflet) and extrude something in threejs in this geo-viewer example? Jan 19, 2020
@zxo102 zxo102 changed the title How to add drawing a line on openstreemap( via leaflet) and extrude something in threejs in this geo-viewer example? Draw a line on openstreemap( via leaflet) and extrude something in threejs in this geo-viewer example? Jan 19, 2020
@j-devel
Copy link
Contributor

j-devel commented Jan 20, 2020

Thanks for trying geo-viewer!

I would like to add something onto both openstreemap via leaflet and threejs in this geo-viewer example. Any documentations or suggestions?

three-geo doesn't have any specific API for interacting with Leaflet. So, I think you are likely to work on Leaflet and three.js independently.

For example, to render a polygon, follow two separate steps:

  1. draw a GeoJSON-based polygon in Leaflet using its LatLng coordinates.
  2. create a three.js object (by e.g. ShapeGeometry or ExtrudeGeometry) that represents the polygon in WebGL space using its (x, y, z) coordinates.

And, importantly, you can resolve the relationship between the two types of coordinates following this information.

Some related references:

Also, It is hard to read app.min.js, where can I get the unminified version?

You can find all the source files in the source directory.

@zxo102
Copy link
Author

zxo102 commented Jan 20, 2020

Hi, J-devel
Thanks for your reply. I have done 1. and 2. in two separate steps. I am playing mapbox with Add a GeoJSON line [https://jsfiddle.net/ozinfo/nt3ha9cp/] and 3d tubes with three.js [https://jsfiddle.net/ozinfo/xekjcg08/].

But I do like putting the two things together very much like your geo-viewer example: click the map and got 3d view in three-geo. Is that possible to "cut into" your app.min.js and put my map js (with leaftlet or mapbox) and 3d tubes js (with terrain) there?

I am studying your reference and see how far I can go.

@zxo102
Copy link
Author

zxo102 commented Jan 21, 2020

Just display those drill holes of a underground mine in three-geo and two maps via mapbox and leaflet. Next step is to connect the maps and to three-geo. J-devel, thanks a lot.

three-geo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants