You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was 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
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? [/+]on Jan 22, 2016
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?[/+]on 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.
@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?
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?[/+]on Mar 3, 2016
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.
Activity
[-][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? [/+]jfirebaugh commentedon Mar 3, 2016
Unfortunately this isn't something that's possible with the iOS SDK at this time.
[-][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?[/+]1ec5 commentedon 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 commentedon Mar 3, 2016
@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?
[-][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?[/+]dagatsoin commentedon Mar 3, 2016
Are you talking about the doc in the source code or somewhere else?
1ec5 commentedon Mar 3, 2016
Yes, I’m referring to the documentation in the source code, which is also available online. Specifically, take a look at:
-[MGLMapViewDelegate mapViewRegionIsChanging:]-[MGLMapView camera]-[MGLMapView convertCoordinate:toPointToView:](and the other conversion methods in that section)dagatsoin commentedon Mar 3, 2016
Thx you, this is a good starting point.
suzukieng commentedon Mar 15, 2017
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.