Help with resolutions #1956
Unanswered
fusionconsulting
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a map tile set with 3 zoom levels, 0 being the largest and 2 being the smallest. I have setup the map in the same manner as the CRS examples:
final resolutions = _tileProvider.zoomLevels.map<double>((level) => level.resolution).toList();
Resolution is calculated as meters per tile / tile pixel size to give meters per pixel as per the documentation.
My resolutions look like this:
0.416
0.833
1.666
My maxZoom is set to resolutions.length - 1 which is 2.0.
When I attempt to zoom, I get an error at crs.zoom():
RangeError (RangeError (length): Invalid value: Not in inclusive range 0..2: 3)
It appears to be trying to zoom beyond the maximum zoom but I can't see what I need to change to prevent this. I have tried reducing the maxZoom to no avail. I have tried switching
zoomReverse
on and adjusting thezoomOffset
which don't seem to have any effect.Any pointers on what I am doing wrong would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions