Leaflet "maxBounds" woes on a non-geo map -
i using leaflet display non-geo map: say, "paper map" of definite size has been cut tiles using appropriate software. moment, i'm generating of zoom-levels 0 ("the entire map in 1 square ...") whatever-zoom fits entire map @ actual size.
and find (leaflet 0.7.3) that, if zoom-level such size of map less size of container in map situated, , if use maxbounds keyed size of map, great many things seem go wrong:
(1) if zoom-level such "not-all 4 sides of map surrounded empty space," map anchored lower right-hand corner , cannot moved it: "pans was."
(2) if zoom-level is such "all 4 sides surrounded white space," map-display re-centers in center of window (if try move elsewhere), but markers spill outside boundaries of area in map sits.
if turn off maxbounds, markers still lie outside boundaries of zoomed-out maps (#2 above), , "stuck in lower right corner" (#1 ...) behavior no longer occurs, of course can scroll away map such you'll never able find again.
ex minimis, need find solution "problem #1." need make sure map, @ whatever zoom-level, cannot "completely escape bounds of window." i'm resigned fact might have write own code this, have no idea how. (so, i'm anxiously hoping else has banged his/her head against this??)
i can circumvent "problem #2" avoiding too-small zoom levels. lead believe done "not specifying minzoom @ all," not seem case.
help??
most recently, have found "the situation really doesn't seem work is: zoom-level zero, there 1 tile." if limit minimum-zoom "1," or whatever minimum-zoom causes display overlap boundaries of <div> "however slightly," many leaflet problems appear bypassed.
Comments
Post a Comment