Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[Question] Is this possible to match the MGL view point in another (non Mapbox) opengl/webgl view? #3668

Closed
dagatsoin opened this issue Jan 22, 2016 · 7 comments
Labels
iOS Mapbox Maps SDK for iOS support

Comments

@dagatsoin
Copy link

This is not an issue or maybe a lack of information about the rendering design. (Or I miss some docs?)

My goal is to put 3D models on the map. I know it is not possible to draw 3D objects for now in Mapbox.

I plan to use another view on top of the MGLView. I will start with a cordova wkwebview + webgl canvas for cross plateform concern.

This 3D canvas will have a camera that I need to match to the MGLView.

I would like to know what should be a good starting point to do this with mapboxgl design in mind.

@dagatsoin dagatsoin changed the title [Question] Is this possible to match the camera in another opengl/webgl view? [Question] Is this possible to match the MGL view point in another opengl/webgl view? Jan 22, 2016
@1ec5 1ec5 added the iOS Mapbox Maps SDK for iOS label Jan 22, 2016
@jfirebaugh
Copy link
Contributor

Unfortunately this isn't something that's possible with the iOS SDK at this time.

@jfirebaugh jfirebaugh changed the title [Question] Is this possible to match the MGL view point in another opengl/webgl view? [Question] Is this possible to match the MGL view point in another opengl/webgl view? Mar 3, 2016
@1ec5
Copy link
Contributor

1ec5 commented Mar 3, 2016

To clarify, it isn't possible to place 3D models directly in the map, to have the Mapbox iOS SDK render it for you. If you wanted to synchronize some other view with the map view, that would be a pretty manual affair, but take a look at the documentation for MGLMapCamera as well as the geometric conversion methods in MGLMapView; maybe you could piece it together with those APIs.

@dagatsoin
Copy link
Author

@1ec5 It is exactly my point. I know that mapboxgl can't render 3D objects. Because of this I need an interface to retrieve the global space and camera informations to reproduce a 3D overlay with another view (wkwebview + tree.js or native gl View). Do you mind if we leave this issue opened until I figure it out?

@dagatsoin dagatsoin changed the title [Question] Is this possible to match the MGL view point in another opengl/webgl view? [Question] Is this possible to match the MGL view point in another (non Mapbox) opengl/webgl view? Mar 3, 2016
@dagatsoin
Copy link
Author

Are you talking about the doc in the source code or somewhere else?

@1ec5
Copy link
Contributor

1ec5 commented Mar 3, 2016

Yes, I’m referring to the documentation in the source code, which is also available online. Specifically, take a look at:

@dagatsoin
Copy link
Author

Thx you, this is a good starting point.

@suzukieng
Copy link

Hi @dagatsoin. I recently did something similar to what you describe using MapBox and a transparent overlay view for drawing 3D objects on top of the map. I blogged about it here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS support
Projects
None yet
Development

No branches or pull requests

4 participants