TransWikia.com

OpenStreetMap baselayer of just one country

Geographic Information Systems Asked by Rabie Ben on February 21, 2021

In Leaflet map I want to have like you see above an OSM baselayer with only one country the rest of the world has to be just a blank, only with international border. How can we create this? which URL of tillelayer give us this result?

enter image description here

One Answer

There is a Leaflet plugin that lets you mask a tile layer:

https://github.com/aparshin/leaflet-boundary-canvas

The demo shows a region around Moscow:

http://aparshin.github.io/leaflet-boundary-canvas/examples/canvas-boundary-providers.html

enter image description here

but notice how labels get cropped at the edges:

enter image description here

Correct answer by Spacedman on February 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP