-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symbols text/icon pointing to the actual point/poi on map in pitched mode (Parity with Google Maps) #7025
Comments
I'm strongly for supporting this as part of a generalisation of |
With multi-icon symbols the leader line could be implemented as an icon. Do you think it makes sense to add this on to that issue? #4366 cc @ChrisLoer who is working on multi-text right now |
This was implemented in two symbol layers, or one if multi-text is implemented:
Note that this produces labels that are always coplanar with the display, rather than staying perpendicular with the ground plane.
This works, but the raster-ness of icons limits our ability to resize and recolor. With text we would get these for free.
this is tricky, because extrusions are in units of meters while text offsets are in units of px or ems, making the two hard to synchronize. This is further compounded by zooming, and different px-meter relationships with changing latitudes. However, this would be valuable if ground-plane perpendicularity is important. |
@ansis and @peterqliu The length of the line is a function of the pitch in G's version. It disappears when pitch==0 and placement devolves into vanilla placement without line. Would the multi icon approach model this as well?
|
Awesome work as always @peterqliu ! 😄
"perpendicular to the ground plane" would basically mean the leader line length varied between 0 and 100%, as a function of pitch going from 0 to 60 degrees, right? This is getting deep into hacky territory, but just as a thought exercise: we could expose pitch as a parameter to what we currently call "zoom dependent expressions" in order to scale the leader line smoothly with pitch. The thing is |
Another way to look at this would be the main icon being placed at a certain altitude |
I don't think this would be hacky at all! Here it is by updating layout on the pitch event, and an expression embed would make it even tidier. Key snippet:
Yup, that's what the variable text-size is trying to simulate above ☝️, and what @mb12 seems to be getting at. Though interestingly, the text label still aligns to the screen, even when the line behaves like a real-world lamppost in the map world. |
@peterqliu This is pretty much it. The performance is also very good. |
@peterqliu Good point. Ideally the z offset for the leader line and symbol would be in screen space (pixels) but still sitting on top of any real world fill-extrusion or 3d-lines. |
@peterqliu One problem with this solution is that text-allow-overlap is set to true for both leaderline and label. So if there are too many symbols, the map would look really cluttered. However if we turn it off, there is no way to prevent leading lines from disappearing while keeping the symbol intact and vice-versa. |
@mb12 sounds like a job for the future multi-text symbol layers #7025 (comment) if the label is text. But if the label an icon (as in your Google Maps example), we can combine the two in one symbol layer, for all-or-nothing visibility. |
Perhaps a pitch expression would be a good option. |
Motivation
When the map is pitched, its difficult to associate the symbol name/icon with the actual point to which it is referring to. This style would make reading maps more feasible and actually useful when it is pitched.
I have also attached a screenshot from Google maps illustrating this.
Design Alternatives
Design
See attached screenshot.
Mock-Up
See attached screenshot.
Concepts
Implementation
The text was updated successfully, but these errors were encountered: