Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
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

Closed

Description

@dagatsoin

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.

Activity

  1. 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
  2. added
    iOS
    on Jan 22, 2016
  3. jfirebaugh commented on Mar 3, 2016

    @jfirebaugh
    Contributor

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

  4. 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
  5. 1ec5 commented on Mar 3, 2016

    @1ec5
    Contributor

    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.

  6. dagatsoin commented on Mar 3, 2016

    @dagatsoin
    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?

  7. 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
  8. dagatsoin commented on Mar 3, 2016

    @dagatsoin
    Author

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

  9. 1ec5 commented on Mar 3, 2016

    @1ec5
    Contributor

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

  10. dagatsoin commented on Mar 3, 2016

    @dagatsoin
    Author

    Thx you, this is a good starting point.

  11. suzukieng commented on Mar 15, 2017

    @suzukieng

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    iOSsupport

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions