[GIS] How to hide leaflet base map

leafletweb-mapping

I'm building a webGIS using leaflet library. Since the data visualization is for only a certain region, it seems that the broader leaflet base map looks a bit distracting. I wonder if there's a way to hide the redundant region.

Best Answer

If I understand correctly what you're asking, here are a few ideas:

  1. Limit the map bounds and zoom to a certain range with minZoom, maxZoom and maxBounds

  2. add an "inverted mask" to the area of interest. Check Bjorn's mask plugin, as well as the questions and answers in this discussion