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
Add support for retina (scaling) TMS token #982
Comments
@zdila Is this an optional tms parameter? E.g. a source can work with or without this parameter? |
It is an optional parameter. If omitted then it is the same as In ideal world editors not understanding I have only checked editor iD which supports it and JOSM which shows error that I am not sure how to add a support for it and keep the compatibility. Maybe compiling geojsons for different editors? |
Just for the reference - JOSM: https://josm.openstreetmap.de/ticket/20030 |
BTW some tileservers support other scales and they can be also fractional. For example please see one particular tile: |
Since it would be a new parameter, existing editors wouldn't just strip it, and would get 404s if they call 0.png{r} instead of 0.png or 0.png@2x Maybe something like the srcset html attribute could work, or a second url source? Editors can also use the category to decide if they want to overzoom by default, for example on aerial imagery. In any case, this should be done together with the JOSM team. |
Ideally, there should be a consensus among all osm editors. Is there somebody else that should be included in the discussion? |
There seems to be a small number of sources that support @2x, but my test script could also be a bit buggy, so there could be more or less. Source ids returning a 512x512 pixel image for @2x:
Source ids returning a 768x768 pixel image for @3x:
|
Following sources certainly don't support it (I know, because I am from Freemap community):
|
@zdila |
Would someone be so kind and explain what the point of supporting this for aerial imagery is (contrary to maps with labels, where the reasoning is clear)? |
@simonpoole Aerial imagery sources (non-hybrid, without labels, icons and other added symbology) should only be flagged that they are scaleable witout issues. Then rendering on HDPI (2x) can be easily done by taking 4 tiles from zoom+1 and rendering them in 2x2 grid in the place of the original "non-HDPI" tile. |
Another good reason here for versioning releases. Can auto-strip it for the current version, but add a breaking change not for the next major version. Although some sources have a convention eg
I don't think it's needed in that case. But we should still support it for all the non-imagery maps in the index. |
Probably, the most elegant solution is to encode it in the url, the question is what the best way would be. https://outdoor.tiles.freemap.sk/12/2249/1460 I don't know if there is a guarantee that, if e.g. a service offers @2x variant, also the @1x works. Maybe something like `https://outdoor.tiles.freemap.sk/{zoom}/{x}/{y}{r:1,2,3}? Editors that do not wish to use higher resolutions could simply drop the {r} token. We could integrate this token in the URLs but drop it automatically in the imagery.* files until every editor supports it. |
More on a general note, is there a platform where such topics can be discussed and developers of all OSM editors listen to? E.g. a specific mailing list? |
https://lists.openstreetmap.org/pipermail/dev is for all OSM development and developers building tools for OSM data, not specific to editors. |
I suppose this could be solved the other way around, add a list of supported resolution tokens in the config. Assuming that ELI clients simply ignore json fields they don't recognize, for this to work there the client will need hardwired information on the semantics of @2x and @3x, but currently it would seem they need that anyway. |
Other option could be extending {
"properties": {
"url": "https://outdoor.tiles.freemap.sk/{zoom}/{x}/{y}",
"scales": {
"2": "https://outdoor.tiles.freemap.sk/{zoom}/{x}/{y}@2x",
"3": "https://outdoor.tiles.freemap.sk/{zoom}/{x}/{y}@3x"
}
// ...
}
// ...
} BTW |
If we do something like that, integrating alternative URLs (we currently can't model this, but JOSM has them) in general would make sense imho, so something like:
|
On CONTRIBUTING page I found no retina tile parameter. Editor iD has it implemented as {r} or {@2x}. Please add support for it.
The text was updated successfully, but these errors were encountered: