mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Add ability to control feature altitude via a style spec property

Open lucaswoj opened this issue 8 years ago • 55 comments

Continued from https://github.com/mapbox/DEPRECATED-mapbox-gl/issues/6

@peterqliu We should take advantage of the extra dimension that map pitching affords us, and use depth to visualize overlapping elements that would otherwise obstruct each other.

screen shot 2015-12-15 at 4 51 20 pm

Currently, the layer stack order is dictated by the sequence it was specified in the stylesheet; when applied, the proposed z-offset would override that. This is analogous to HTML's natural stacking order overridden by z-index in CSS.

Also, label rendering order is currently tightly bound to layers' z-order, because they both key off of the stylesheet layer sequence. Adding z-offset will free us to decide which layers get rendering priority, regardless of whether they go above or below other layers.

cc @lucaswoj @kkaefer

cc @tmcw @samanpwbb @jfirebaugh @ansis

lucaswoj avatar Jan 17 '17 21:01 lucaswoj

Allowing polygons and symbols to have an altitude or z value would then mean that data presented by fill-extrusion could be represented and interrogated consistent with the 3D presentation [mockup]:

3d polygon and symbol

ashleyclough avatar Jan 18 '17 09:01 ashleyclough

@ashleyclough Ohh gooosh how u did the markers extrude?

robinbezak avatar Jul 10 '17 17:07 robinbezak

I didn't, the image is just a mockup, created in Photoshop, of how I would like it to work!

ashleyclough avatar Jul 11 '17 09:07 ashleyclough

Is there any progress on this feature? I'm building a indoor 3D application and need to have markers or popups to offset from the terrain when the map is pitched. Is there an alternative solution to make this work?

patodevilla avatar Jul 12 '17 00:07 patodevilla

We're currently working on a new approach to symbol placement (collision avoidance) that will be able to handle symbols with z offsets. After we finish that we can take a look at adding this to the spec and implementing it.

ansis avatar Jul 12 '17 00:07 ansis

Hi ansis, any updates on this topic? Is it in the roadmap?

mariokam avatar Oct 30 '17 15:10 mariokam

@mariokam check out the roadmap here

peterqliu avatar Oct 30 '17 19:10 peterqliu

Thanks peterqliu, and I know about this roadmap, but I would expect that big company/startup as Mapbox to have more detailed roadmap, than 4 features in progress and 4 feature in long-term. So I don't see any plans even for z offsets

mariokam avatar Oct 30 '17 19:10 mariokam

Any updates on this? I have need of this for a client project where we have several raster layers stacked that need an offset so you can tell them apart.

xkisu avatar Nov 09 '17 00:11 xkisu

@xkisu, @mariokam the new approach to symbol placement is being ported from here to mapbox/mapbox-gl-native. We'll be able to start looking at this after that is done.

ansis avatar Nov 09 '17 14:11 ansis

I hope mapbox can support altitude in geojson or can set height attribute in a layer..

tianbaolin avatar Nov 14 '17 11:11 tianbaolin

We're setting a raster layer height value and it does draw the layer but only at certain angles. Will this issue (above) address that? It looks like some sort of clipping occurs depending on angle. Any tip? mapbox_clip_error

1tylermitchell avatar Nov 21 '17 06:11 1tylermitchell

Another vote for supporting relatively basic 3d features in the sense of being able to show overlapping features in 3d space (map pitch) - i.e. a bridge crossing a road, or multiple floor levels inside a building shell. i.e. very simple support for a z-height coordinate, not unlike PostGIS supports a height coordinate.

songololo avatar Nov 24 '17 21:11 songololo

well, i am just hit this when i want to show an indoor map. all is ok, except for the symbol on top of Extrude layer my example url

dbskccc avatar Apr 21 '18 00:04 dbskccc

This is something that we'd very much like to see and seems like a necessity in a platform that supports 3d mapping. Are there any updates on a timeline for this? Is there any comparable functionality already existing in the native-sdks?

saferthanhouses avatar Apr 21 '18 11:04 saferthanhouses

Any updates on this?

janschmutz avatar Jul 16 '18 02:07 janschmutz

Any updates on this?

DinakaranS avatar Oct 29 '18 08:10 DinakaranS

Any updates on this???

leehoss avatar Jan 10 '19 14:01 leehoss

We need a feature, like being able to set the z offset or base height to speak in fill extrusion lang, too. Please give us feedback about related plans.

fea17e86 avatar Feb 26 '19 05:02 fea17e86

Any updates on this????

maroonedione avatar May 25 '19 19:05 maroonedione

@maroonedione @fea17e86 @leehoss This is on our radar, but not currently on our roadmap over the next 6 months.

asheemmamoowala avatar May 29 '19 16:05 asheemmamoowala

We on ClimaCell want it too. Upvote! ✌️

cl-nati avatar Jul 08 '19 18:07 cl-nati

+1 We really want this feature of Z-offsets per point of a line

animeshjn avatar Jul 15 '19 22:07 animeshjn

+1

likeswinds avatar Jul 16 '19 04:07 likeswinds

+1

1Map avatar Sep 04 '19 20:09 1Map

+1 - need to label extruded buildings at the top.

mayteio avatar Sep 27 '19 06:09 mayteio

stop getting my hopes up with the pointless +1 bumps :P

narrowtux avatar Sep 30 '19 13:09 narrowtux

https://deck.gl/#/examples/overview?section=core-layers is able to do it and it can also be integrated with mapbox.

rajputvishal avatar Sep 30 '19 18:09 rajputvishal

Some work on this is being done in the Vector Tile 3 specification. This is part of the team's long term roadmap, but there is not a timeframe for it as yet.

asheemmamoowala avatar Sep 30 '19 19:09 asheemmamoowala

any updates?

mrn06ody avatar Oct 23 '19 13:10 mrn06ody