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

OGC WmsMapType minZoom - maxZoom range does not restrict tiles rendering #4

Open
thexs-dev opened this issue Feb 24, 2020 · 2 comments

Comments

@thexs-dev
Copy link

Using the example code with different wms servers

  • setting the values minZoom and maxZoom have no effect in the tiles rendering
  • regardless of those zoom values the tiles are rendered

This is a problem when rendering smaller geographic boundaries at a small zoom values, whereas the map becomes unreadable with some many overlapping lines

Some wms servers deal with the zoom by returning empty tiles below certain zoom level, like US census for counties boundaries below zoom 6

  url: "https://tigerweb.geo.census.gov/arcgis/services/TIGERweb/tigerWMS_Current/MapServer/WmsServer?",
  layers: "Counties",

But others keep rendering the tiles at any zoom level, ignoring minZoom value

Would it be possible for the WmsMapType plugin to stop calling the wms server when out of the zoom range (minZoom - maxZoom) if any of those values is set in the WmsMapType options?

Thanks

@jpoehnelt
Copy link
Contributor

Do you have a example for this? The WMS helper is a fairly light wrapper around https://developers.google.com/maps/documentation/javascript/reference/image-overlay#ImageMapType and should support setting min and max zoom.

@thexs-dev
Copy link
Author

The example from this repository also ignores the minZoom value as well

The following URL, using layer = "2" and minZoom = 8
It keeps showing the boundaries for any zoom value below 8

  url: "http://webservices.maps.canada.ca/arcgis/services/ELECTIONS/elections_canada_2019_en/MapServer/WMSServer?",
  layers: "2",

The fundamental question here would be

Who is responsible or has the capability for enforcing the zoom range?

  • The WMS server OR the Google ImageMapType / overlayMapTypes functions
  • Or this plugin should take care of that?

From Google documentation it looks like ImageMapTypeOptions is responsible for that
"minZoom: The minimum zoom level for the map when displaying this MapType. Optional; defaults to 0"

@jpoehnelt jpoehnelt transferred this issue from googlemaps/v3-utility-library Jun 21, 2021
@jpoehnelt jpoehnelt removed their assignment Jan 18, 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

2 participants