Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srividyacb/6436a5134eda6eb2cce9aaadd52c8129 to your computer and use it in GitHub Desktop.
Save srividyacb/6436a5134eda6eb2cce9aaadd52c8129 to your computer and use it in GitHub Desktop.

Fixing India on mapbox-streets style

  • Add Indian disputed boundaries source: planemad.bb1ba8b5 to you 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