Skip to content

Instantly share code, notes, and snippets.

@planemad
Last active November 15, 2017 06:06
Show Gist options
  • Save planemad/bab2795da23be8bf7006 to your computer and use it in GitHub Desktop.
Save planemad/bab2795da23be8bf7006 to your computer and use it in GitHub Desktop.

Fixing India border on mapbox-streets style using Mapbox Studio Classic

  • Add Indian disputed boundaries source: planemad.bb1ba8b5 to your style project from the layers panel
  • If the source is locked, open the project.yml file and append it manually to the source field. You would also need to manually add the layers boundaries-claimed and boundaries-disputed after the admin layer similiar to this:
source: "mapbox:///mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v6,planemad.bb1ba8b5"
layers:
  - landcover
  - landuse
  - contour.line
  - hillshade
  - waterway
  - water
  - aeroway
  - barrier_line
  - building
  - landuse_overlay
  - tunnel
  - road
  - bridge
  - admin
  - boundaries-claimed
  - boundaries-disputed
  - country_label_line
  - country_label
  - marine_label
  - state_label
  - place_label
  - water_label
  - poi_label
  - road_label
  - waterway_label
  - housenum_label
  - contour.label
  • Add #boundaries-claimed["@relations"=~'.*"claimed_by":[ ]*"IN".*'] selector to the #admin style block to enable the additional boundaries for styling
#admin,#boundaries-claimed["@relations"=~'.*"claimed_by":[ ]*"IN".*'] {
  • Add #boundaries-claimed selector to [admin_level=2] style block to render the additional boundaries in the same style as the international boundaries
[admin_level=2],#boundaries-claimed {
  • Add this style block within the previous style block to make disputed boundaries transparant
[disputed=1]{line-opacity:0.5;}

The result should look like this: http://openstreetmap.in/#5/22.167/79.102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment