[OSM-talk] JOSM slippy map max_zoom_level workaround
Beej Jorgensen
beej at beej.us
Wed Jun 24 21:07:07 BST 2009
Sorry if this has been talked about to death and I didn't notice, but I
did search a bit and didn't find the answer. I'm also pretty sure I'm
up-to-date on all the code.
I have been curious for a long time why JOSM's slippymap plugin seems to
decrease the max_zoom_level by 4 every time I run it, and only now
decided to chase it down.
The offending code seems to be in SlippyMapPreferences.java:
public static int getMinZoomLvl()
{
String minZoomLvl = Main.pref.get(PREFERENCE_MIN_ZOOM_LVL);
if (minZoomLvl == null || "".equals(minZoomLvl))
{
minZoomLvl = "" + (SlippyMapPreferences.getMaxZoomLvl() - 4);
Main.pref.put(PREFERENCE_MAX_ZOOM_LVL, minZoomLvl);
}
Perhaps that should be a PREFERENCE_MIN_ZOOM_LVL in the pref.put()?
In any case, a quick workaround is to add min_zoom_level to your
.josm/preferences file, e.g:
slippymap.max_zoom_lvl=17
slippymap.min_zoom_lvl=2
Again, I apologize if this is a rerun or out of date.
-Beej
More information about the talk
mailing list