Skip to content
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

resolution {r} param #2

Closed
DanielJDufour opened this issue Feb 8, 2022 · 7 comments
Closed

resolution {r} param #2

DanielJDufour opened this issue Feb 8, 2022 · 7 comments
Assignees

Comments

@DanielJDufour
Copy link

It wouldn't require a specification change, but perhaps we could add to the description of XYZ href, that {r} is optional as well:
https://leafletjs.com/reference.html#tilelayer

@m-mohr
Copy link
Contributor

m-mohr commented Feb 8, 2022

Thanks. Is this Leaflet specific? I don't see such a parameter in any other mapping library I have looked at (Mapbox, Openlayers).

@DanielJDufour
Copy link
Author

Marblecutter has something similar but calls it "scale": https://github.com/DanielJDufour/marblecutter-virtual/blob/master/virtual/web.py#L110

@m-mohr m-mohr self-assigned this Feb 8, 2022
@m-mohr
Copy link
Contributor

m-mohr commented Feb 8, 2022

How should this be handled if {r} is not supported by the library of choice? Thinking about how to include this without breaking stuff for non-Leaflet or making things too difficult.

@DanielJDufour
Copy link
Author

That's a good point. I'm not sure there's a perfect answer, but here's a couple options to consider:

  1. adding another field like server-tech to the extension spec that says what technology the server uses: geoserver, marblecutter, titiler, lambda-tiler, etc
  2. recommend people just hardcode in any special parameters like url and resolution/scale, so just do https://example.org/tiles/{z}/{x}/{y}@2x.png?url=https://path.to.tif
  3. create a new "type" XYZParam and add a new field: xyz:params, that points to an object with parameter information like:
{
    "r": {
        "description": "resolution",
    },
    "bands": {
        "description": "comma separated ordering of bands"
    }
}

conclusion

After more thought, I think Number 2 makes the most sense (would be a hassle to support all the different libraries and params). If/when the community comes together and creates a standard for xyz tile service parameters (e.g., bands, expr, etc.), we can add more to this extension.

What do you think?

@cholmes
Copy link

cholmes commented Feb 16, 2022

Yeah, I think I like 2. the best. Would be good to call it out specifically though, and perhaps even have an example with it.

@m-mohr
Copy link
Contributor

m-mohr commented Feb 17, 2022

Okay, option 2 sounds good to me. Happy to accept PRs if anyone wants to give it a try.

@m-mohr
Copy link
Contributor

m-mohr commented Jan 27, 2023

Implemented.

@m-mohr m-mohr closed this as completed Jan 27, 2023
m-mohr added a commit that referenced this issue Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants