mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.06k stars 2.21k forks source link

Add ability to control feature altitude via a style spec property #3993

Open lucaswoj opened 7 years ago

lucaswoj commented 7 years ago

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

ashleyclough commented 7 years ago

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

robinbezak commented 7 years ago

@ashleyclough Ohh gooosh how u did the markers extrude?

ashleyclough commented 7 years ago

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

patodevilla commented 7 years ago

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?

ansis commented 7 years ago

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.

mariokam commented 6 years ago

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

peterqliu commented 6 years ago

@mariokam check out the roadmap here

mariokam commented 6 years ago

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

xkisu commented 6 years ago

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.

ansis commented 6 years ago

@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.

tianbaolin commented 6 years ago

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

1tylermitchell commented 6 years ago

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
songololo commented 6 years ago

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.

dbskccc commented 6 years ago

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

saferthanhouses commented 6 years ago

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?

janschmutz commented 6 years ago

Any updates on this?

DinakaranS commented 5 years ago

Any updates on this?

leehoss commented 5 years ago

Any updates on this???

fea17e86 commented 5 years ago

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.

maroonedione commented 5 years ago

Any updates on this????

asheemmamoowala commented 5 years ago

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

cl-nati commented 5 years ago

We on ClimaCell want it too. Upvote! ✌️

animeshjn commented 5 years ago

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

likeswinds commented 5 years ago

+1

1Map commented 5 years ago

+1

mayteio commented 4 years ago

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

narrowtux commented 4 years ago

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

rajputvishal commented 4 years ago

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

asheemmamoowala commented 4 years ago

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.

azhdarshirinzada commented 4 years ago

any updates?

arcsump commented 4 years ago

How come wrld.js is able to apply this using the elevation property in marker?

andrewharvey commented 4 years ago

How come wrld.js is able to apply this using the elevation property in marker?

This ticket is specifically about layers in the style spec, so excludes Marker elements, I think it's worth opening a separate ticket for Marker elevation/z-offset.

patrickkeenan commented 4 years ago

This ticket is specifically about layers in the style spec, so excludes Marker elements, I think it's worth opening a separate ticket for Marker elevation/z-offset.

But this issue says discussion should be concentrated here no? https://github.com/mapbox/mapbox-gl-js/issues/8988

andrewharvey commented 4 years ago

But this issue says discussion should be concentrated here no?

Ok, Personally I see them as different issues still, one is for layers part of the style spec, the other is for Marker elements. Different implementation and different API.

derrickrung commented 4 years ago

Hoping to bring some attention back to this...

Any updates on this?

cigone-openindoor commented 4 years ago

three.js could help...

arcsump commented 3 years ago

I'll be coming up with a more detailed use-case for this, but basically , a way to set the point's elevation is vital for visualizing points at different levels.

Our motivation is, we are surveyors working for a major tunnel project here in AU , and part of what we visualize is the monitoring status of the points for critical supporting structure. We are building a web-based site to be able to monitor the status.

Currently, the points in the area we are monitoring at the moment, look flat, image

when at least we wanted to reflect the multi-level nature of the points. image

And, I am not yet referring to the negative extrusion heights that should be useful in visualizing the whole area - this is part of an underground tunnel infrastructure ( which I would happily ask a feature request for separately.)

If someone can refer me to the format I can use to present this use-case, it would be helpful.

I hope we can push for the development of this feature, even just the support for the elevation for point layers.

Also if you feel that I am in the wrong issue, please feel free to advise me.

Many thanks!

mayteio commented 3 years ago

@arcsump Metro tunnel? I work for CoM across the road! Have you tried any esri arcgis JS products? The developer experience is horrible but it’s pretty powerful when it comes to 3D, supporting both elevation and negative elevation.

ats1999 commented 3 years ago

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

Can i get the source code?

arcsump commented 3 years ago

@arcsump Metro tunnel? I work for CoM across the road! Have you tried any esri arcgis JS products? The developer experience is horrible but it’s pretty powerful when it comes to 3D, supporting both elevation and negative elevation.

Yes, thank you for the suggestion - will definitely look at this and wrld.js as I am not sure what is the status of the request, as they pride on 3d stuff, but seem to have missed out on this functionality.

P.S. nice to know that you are in the "neighborhood", I am but a worker, I must say :-)

arcsump commented 3 years ago

an alternative is to use Maptalks until the feature can be implemented.

arcsump commented 3 years ago

three.js could help... It could In fact a complex solution was implemented for popups in #9814

likwidgames commented 3 years ago

Any updates on this? This has been open since 2017 and seems like an important feature that competitors already have in place.

arcsump commented 3 years ago

Unfortunately, the focus is on releasing 3D / terrain mapping instead.

You can use the excellent alternatives listed prior, like ESRI ArcGIS for JS

or the threeBOX library which still integrates into the mapbox library.

Asked our devs at Vinci Group in France to look at alternatives for now

On Mon, 21 June 2021, 06:04 likwidgames, @.***> wrote:

Any updates on this? This has been open since 2017 and seems like an important feature that competitors already have in place.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mapbox/mapbox-gl-js/issues/3993#issuecomment-864604833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKCCGHA5REU5Z2TWPHJY4DTTZCTHANCNFSM4C4YT7GA .

openSourcerer9000 commented 2 years ago

The people have spoken... we want more dimensionality!

leehoss commented 2 years ago

Yeah can we give this issue a bump up… this feature will change the game !

cigone-openindoor commented 2 years ago

I must admit that I do not use mapbox anymore, but maplibre. So no more interest for me...

spencerthayer commented 2 years ago

Has there been any progress getting markers, points, or any object to render with a z-offset or altitude?

arcsump commented 2 years ago

If someone can actually explain what's stopping Mapbox from implementing the 3rd dimension in this geojson spec, that would be helpful.

JonPichel commented 1 year ago

What's the current status of this? I have a Drone GCS which uses ArcGIS Maps SDK for Javascript but would love to switch to Mapbox, but without 3D I can't possibly do that. In my opinion the ability to draw markers, lines and models in 3D would suppose a huge grow for mapbox.