Closed RyanEwen closed 12 years ago
Yes, you can hide the layer (by setting visible to false) when the map is at the higher zoom levels.
Thanks for the quick reply!
Am I able to keep the closest zoom level visible? Ex: Show tiles for zoom level 7 while at 8, 9, 10, etc? Or am I making that layer hidden?
You can do that by setting a zoom function on the layer, say, function(z) { return Math.min(7, z); }
. "Currently, the transformed zoom level delta may be up to +2 and down to -4." So, you'll be able to go from 7 to 11 this way. Beyond that, the tiles would be unreasonably large and performance deteriorates, so you'll want to either limit zooming to have a reasonable constant-color background.
Thanks, Mike!
That worked perfectly.
Is there any way to tell Polymaps the range of available zoom levels for tiles, while still allowing zooming further?
Ex: I have an offline application which has tiles with zoom level 1-7 available. I still want users to be able to zoom in as close as level 18 (there are SVG objects on the map, the background tiles are just a bonus).
Right now the browser hammers the server for tiles that do not exist. I would like to be able to prevent Polymaps from requesting tiles for zoom level 8+.
Cheers,
Ryan