Closed pauloFernandes closed 7 years ago
Yes that's possible. Please take a look at the example on https://commenthol.github.io/leaflet-rastercoords. Zooming out gives you the possibility to view the popup.
You can also set map.setMaxBounds()
like this: (from example/index.js
)
...
// assign map and image dimensions
var rc = new L.RasterCoords(map, img)
map.setMaxBounds(rc.unproject([0, 0]), rc.unproject(img))
// set the view on a marker ...
map.setView(rc.unproject([0, 0] /*[1589, 1447]*/), 4)
Apparently the plugin sets the map's bounds equals to image's size. When I put a marker on the edges of the image, and it has a popup, the map hides this popup.
Is it possible to create bounds to the map bigger than image's size?