mapbox / mapbox-maps-ios

Interactive, thoroughly customizable maps for iOS powered by vector tiles and Metal
https://www.mapbox.com/mapbox-mobile-sdk
Other
450 stars 148 forks source link

Possibility to draw lines and points with specific elevation/altitude #360

Open txaiwieser opened 3 years ago

txaiwieser commented 3 years ago

New Feature

We need a way to draw lines on 3d maps that have specific elevation/altitude. Currently, it seems that every path is only defined by lat/long and is always glued to the terrain.

This is what we want to achieve:

image

Why

The value is that now paths, points, and possibility annotations wouldn't be bound to the terrain anymore.

Not sure if there's a workaround to make this possible with the current beta sdk or if there's a plan to support this soon!

Thanks!

frabarbo commented 2 years ago

Did you find a solution?

txaiwieser commented 2 years ago

Not yet :(

richardpineo commented 2 years ago

We have the same need for our application - showing trajectories of flights. Are there any updates for implementing this feature or potential workarounds?

bambubr commented 2 years ago

Same need here - showing trajectories of flights. Any news on this feature?

amiratsita commented 2 years ago

Same need here. We at SITA also want to display trajectories that have different altitudes. Could you please let us know when this feature will be implemented? Thank you

jeradhoy commented 1 year ago

Any update on if this is a feature in the works, or if there are no plans for such a feature?

frabarbo commented 1 year ago

up

entioentio commented 1 year ago

Just peeking around. Some of you guys my find this usful: https://deck.gl/examples/mapbox/

entioentio commented 1 year ago

Or actually this demo: https://codesandbox.io/s/jolly-fast-ouoxgx

codeversed commented 1 year ago

@entioentio both great examples but I think what we need is LineString to support altitude. Height doesn't work well for flight paths and rendering webgl doesn't seem like the right solution for populating the map as a flight occurs.

The renderings do look great though! 👏

entioentio commented 1 year ago

Shoot, just now I've noticed we're in mapbox-maps-ios repo 😂 sorry!

frabarbo commented 1 year ago

@knov

john-work-ios commented 1 year ago

Anyone found a solution/workaround to achieve this?

jeradhoy commented 1 year ago

Upvote!

john-work-ios commented 7 months ago

Any news about this crucial missing feature?

andrew-hossack commented 3 months ago

Bump, any updates?

astojilj commented 1 month ago

Thanks for your interest in this feature, and I hope you can help to clarify the requirements. For now, the way to achieve this is with a Metal (iOS) / OpenGL (Android) powered Custom layer.

An example from our internal test code (color encodes distance to ground)...

https://github.com/mapbox/mapbox-maps-ios/assets/549216/57121da1-8d46-4a79-aae5-b6ba145962c8

Custom layer code here, samples the elevation (ground elevation) for all the points along the route and elevates bottom of the wall and and calculates the top.

@codeversed : @entioentio both great examples but I think what we need is LineString to support altitude. Height doesn't work well for flight paths and rendering webgl doesn't seem like the right solution for populating the map as a flight occurs.

@codeversed could you please explain the issue in some more details, to avoid missunderstanding?

@txaiwieser @richardpineo @bambubr @amiratsita

I'd like to verify if the altitude information height is always relative to sea level—or does it require combining (ground level offset used for landing?

john-work-ios commented 1 month ago

@astojilj thank you for the update. Is the sample code supposed to be behind a link somewhere? The result looks good enough, can the line be updated live? Example: following a plane flight live.