-
Notifications
You must be signed in to change notification settings - Fork 240
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
Feature Request: Support meters as size unit for points #1121
Comments
Perhaps another use case would be tree-nodes. (natural=tree) |
@westnordost : one other posssible workaround would be to use a circular marker together with a js function for the size. That function would back out the size in pixel from the zoom level so it remains constant in meters. I haven't tested that yet. |
This comment has been minimized.
This comment has been minimized.
Another use case where supporting meters for points would be helpful: Rendering mini-roundabouts and turning circles with some realistic diameter in meters on high zoom levels. |
Actually, nevermind my earlier algorithm, much easier is
There is also a $meters_per_pixel in the docs, which would make it trivial to workaround this via a javascript function, however in tangram-es it doesn't seem to be supported. See #2138 |
(Ah, realized that $meters_per_pixel does actually not solve this, because it only changes on full zoom levels changes.) |
I am trying to show the accuracy radius of a location around the user. Here, I ran into some problems. I think part of it is a bug, part of it is a missing feature probably.
The relevant portion of the style file:
and the code
However, this gives i.e. the error:
styleParam.cpp:184: Invalid size parameter '22m'
If I set a static size in the style definition, I get no error, but it doesn't seem to show at all.
So my guess is that meters as a size unit for points is simply not implemented as there hasn't been a use case for this (until now :-P). At least it is not documented. That Tangram-ES does not report an error if you write
size: 50m
seems to be a bug then.In any case, this ticket shall be a feature request to support meters as a unit for points.
Plan B for the use case I have in mind would be to use a circle-polygon for the radius, but I find that rather ugly.
The text was updated successfully, but these errors were encountered: