Demo of how to create an OpenStreetMap slippy map with custom disputed boundaries with Mapbox GL JS.
- Completely free and no API key required
A custom Mapbox GL map style is used to define the basemap and custom boundaries to overlay:
- Basemap is a raster layer of openStreetMap Mapnik tiles
- A GeoJSON with the disputed boundary lines for India is added as an additional datasource. The boundaries are sourced from OSM using Overpass API and simplified for minimal filesize.
- An overlay layer is added of de facto boundary lines disputed by India with a line style to mute the boundaries from the basemap
- An overlay layer is added of claimed boundary lines by India with a line style matching the boundaries in the basemap
The net effect creates a basemap with national boundaries of India according to local laws. For comparison see the boundaries of Kashmir in North India on the OpenStreetMap website