leaflet-india-boundary 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/LICENSE +25 -0
  2. package/LICENSE-DATA +101 -0
  3. package/README.md +391 -0
  4. package/data/india-boundary.geojson +1 -0
  5. package/dist/cjs/attribution.js +24 -0
  6. package/dist/cjs/attribution.js.map +1 -0
  7. package/dist/cjs/data.js +78 -0
  8. package/dist/cjs/data.js.map +1 -0
  9. package/dist/cjs/index.js +39 -0
  10. package/dist/cjs/index.js.map +1 -0
  11. package/dist/cjs/leaflet.js +152 -0
  12. package/dist/cjs/leaflet.js.map +1 -0
  13. package/dist/cjs/package.json +3 -0
  14. package/dist/cjs/react.js +77 -0
  15. package/dist/cjs/react.js.map +1 -0
  16. package/dist/cjs/style.js +129 -0
  17. package/dist/cjs/style.js.map +1 -0
  18. package/dist/cjs/suppress.js +462 -0
  19. package/dist/cjs/suppress.js.map +1 -0
  20. package/dist/cjs/suppressionData.js +205 -0
  21. package/dist/cjs/suppressionData.js.map +1 -0
  22. package/dist/esm/attribution.d.ts +21 -0
  23. package/dist/esm/attribution.d.ts.map +1 -0
  24. package/dist/esm/attribution.js +21 -0
  25. package/dist/esm/attribution.js.map +1 -0
  26. package/dist/esm/data.d.ts +78 -0
  27. package/dist/esm/data.d.ts.map +1 -0
  28. package/dist/esm/data.js +75 -0
  29. package/dist/esm/data.js.map +1 -0
  30. package/dist/esm/index.d.ts +19 -0
  31. package/dist/esm/index.d.ts.map +1 -0
  32. package/dist/esm/index.js +19 -0
  33. package/dist/esm/index.js.map +1 -0
  34. package/dist/esm/leaflet.d.ts +103 -0
  35. package/dist/esm/leaflet.d.ts.map +1 -0
  36. package/dist/esm/leaflet.js +147 -0
  37. package/dist/esm/leaflet.js.map +1 -0
  38. package/dist/esm/package.json +3 -0
  39. package/dist/esm/react.d.ts +31 -0
  40. package/dist/esm/react.d.ts.map +1 -0
  41. package/dist/esm/react.js +69 -0
  42. package/dist/esm/react.js.map +1 -0
  43. package/dist/esm/style.d.ts +106 -0
  44. package/dist/esm/style.d.ts.map +1 -0
  45. package/dist/esm/style.js +121 -0
  46. package/dist/esm/style.js.map +1 -0
  47. package/dist/esm/suppress.d.ts +64 -0
  48. package/dist/esm/suppress.d.ts.map +1 -0
  49. package/dist/esm/suppress.js +456 -0
  50. package/dist/esm/suppress.js.map +1 -0
  51. package/dist/esm/suppressionData.d.ts +34 -0
  52. package/dist/esm/suppressionData.d.ts.map +1 -0
  53. package/dist/esm/suppressionData.js +202 -0
  54. package/dist/esm/suppressionData.js.map +1 -0
  55. package/dist/style.css +66 -0
  56. package/package.json +113 -0
  57. package/src/attribution.ts +23 -0
  58. package/src/data.ts +153 -0
  59. package/src/index.ts +45 -0
  60. package/src/leaflet.ts +252 -0
  61. package/src/react.ts +92 -0
  62. package/src/style.css +66 -0
  63. package/src/style.ts +168 -0
  64. package/src/suppress.ts +599 -0
  65. package/src/suppressionData.ts +238 -0
  66. package/tools/build-india-boundary.mjs +836 -0
  67. package/tools/postbuild.mjs +61 -0
package/dist/style.css ADDED
@@ -0,0 +1,66 @@
1
+ /*
2
+ * leaflet-india-boundary — OPTIONAL stylesheet.
3
+ *
4
+ * You do not need this file. The layer sets colour, width, opacity and join as
5
+ * SVG attributes, so `indiaBoundaryLayer().addTo(map)` already draws a border
6
+ * that matches the basemap. Import this only if you would rather drive the
7
+ * styling from CSS than from JavaScript options.
8
+ *
9
+ * import "leaflet-india-boundary/style.css";
10
+ *
11
+ * Be aware of the precedence if you do: a CSS `stroke` beats the SVG `stroke`
12
+ * attribute Leaflet writes, so any colour rule here silently wins over the
13
+ * `color` / `colorWide` options. That is the point of the file, but it is worth
14
+ * knowing before you spend an afternoon wondering why `color` does nothing.
15
+ *
16
+ * One rule you must not add: `stroke-linejoin`. The layer sets `lineJoin: bevel`
17
+ * as an SVG attribute to match carto, and a CSS property would override it.
18
+ */
19
+
20
+ .leaflet-india-boundary {
21
+ /* Belt and braces. The layer also passes `interactive: false`, which keeps
22
+ Leaflet from marking the paths as pointer targets, so clicks reach the
23
+ markers underneath. */
24
+ pointer-events: none;
25
+
26
+ /* CSS route to the tile-filter fix, for apps that would rather set a variable
27
+ than pass `tileFilter` in JS. Set it on your map container:
28
+
29
+ .leaflet-container {
30
+ --india-boundary-filter: invert(1) hue-rotate(192deg) saturate(0.45);
31
+ }
32
+
33
+ Use one route or the other, not both — `tileFilter` filters a dedicated pane,
34
+ and combining the two filters the stroke twice.
35
+
36
+ Why this exists at all: if you filter `.leaflet-tile-pane` to turn OSM's light
37
+ tiles into a dark basemap, the tiles on screen are no longer the colours OSM
38
+ rendered, while this overlay sits in an unfiltered pane. carto's purple applied
39
+ raw here lands nowhere near the purple actually visible. Putting the overlay
40
+ through the same filter is what makes them match. See the README. */
41
+ filter: var(--india-boundary-filter, none);
42
+ }
43
+
44
+ /*
45
+ * carto's own values, for reference and for overriding. Uncomment to take control
46
+ * of the colours from CSS.
47
+ *
48
+ * These are openstreetmap-carto's `@admin-boundaries` and `@admin-boundaries-wide`
49
+ * verbatim from `style/admin.mss`, which is the whole trick: the border reads as
50
+ * part of the map because it is the exact colour the map draws every other national
51
+ * border in.
52
+ *
53
+ * Do not add a white line underneath. carto has one, but it is a `comp-op: darken`
54
+ * device for hiding the seam where two countries' borders overlap — not a visible
55
+ * casing. On a single overlay there is no seam to hide and it just looks wrong.
56
+ */
57
+
58
+ /*
59
+ .leaflet-india-boundary {
60
+ stroke: #8d618b;
61
+ }
62
+
63
+ .leaflet-india-boundary--wide {
64
+ stroke: #a37da1;
65
+ }
66
+ */
package/package.json ADDED
@@ -0,0 +1,113 @@
1
+ {
2
+ "name": "leaflet-india-boundary",
3
+ "version": "0.1.0",
4
+ "description": "India's official boundary through Jammu & Kashmir, Ladakh and Aksai Chin as a Leaflet overlay, styled to match OpenStreetMap's own borders. Framework-agnostic GeoJSON + carto-derived style values inside, so MapLibre and OpenLayers work too.",
5
+ "keywords": [
6
+ "leaflet",
7
+ "leaflet-plugin",
8
+ "maplibre",
9
+ "maplibre-gl",
10
+ "openlayers",
11
+ "india",
12
+ "boundary",
13
+ "border",
14
+ "geojson",
15
+ "openstreetmap",
16
+ "osm",
17
+ "kashmir",
18
+ "ladakh",
19
+ "aksai-chin",
20
+ "survey-of-india",
21
+ "political-view",
22
+ "map"
23
+ ],
24
+ "license": "MIT AND ODbL-1.0",
25
+ "author": "Abhilaksh Sharma",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/lux-in-tenebris-lucet/leaflet-india-boundary.git"
29
+ },
30
+ "bugs": {
31
+ "url": "https://github.com/lux-in-tenebris-lucet/leaflet-india-boundary/issues"
32
+ },
33
+ "homepage": "https://github.com/lux-in-tenebris-lucet/leaflet-india-boundary#readme",
34
+ "type": "module",
35
+ "sideEffects": false,
36
+ "main": "./dist/cjs/index.js",
37
+ "module": "./dist/esm/index.js",
38
+ "types": "./dist/esm/index.d.ts",
39
+ "exports": {
40
+ ".": {
41
+ "types": "./dist/esm/index.d.ts",
42
+ "import": "./dist/esm/index.js",
43
+ "require": "./dist/cjs/index.js"
44
+ },
45
+ "./leaflet": {
46
+ "types": "./dist/esm/leaflet.d.ts",
47
+ "import": "./dist/esm/leaflet.js",
48
+ "require": "./dist/cjs/leaflet.js"
49
+ },
50
+ "./react": {
51
+ "types": "./dist/esm/react.d.ts",
52
+ "import": "./dist/esm/react.js",
53
+ "require": "./dist/cjs/react.js"
54
+ },
55
+ "./suppress": {
56
+ "types": "./dist/esm/suppress.d.ts",
57
+ "import": "./dist/esm/suppress.js",
58
+ "require": "./dist/cjs/suppress.js"
59
+ },
60
+ "./style.css": "./dist/style.css",
61
+ "./india-boundary.geojson": "./data/india-boundary.geojson",
62
+ "./package.json": "./package.json"
63
+ },
64
+ "files": [
65
+ "dist",
66
+ "data",
67
+ "src",
68
+ "tools",
69
+ "README.md",
70
+ "LICENSE",
71
+ "LICENSE-DATA"
72
+ ],
73
+ "scripts": {
74
+ "clean": "rm -rf dist",
75
+ "prepare": "npm run build",
76
+ "build": "npm run clean && tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node tools/postbuild.mjs",
77
+ "typecheck": "tsc -p tsconfig.json --noEmit",
78
+ "pretest": "npm run build",
79
+ "test": "node --test test/*.test.mjs",
80
+ "boundary:derive": "node tools/build-india-boundary.mjs",
81
+ "prepublishOnly": "npm test"
82
+ },
83
+ "dependencies": {
84
+ "@types/geojson": "^7946.0.14"
85
+ },
86
+ "peerDependencies": {
87
+ "leaflet": ">=1.7.0",
88
+ "react": ">=17",
89
+ "react-leaflet": ">=4"
90
+ },
91
+ "peerDependenciesMeta": {
92
+ "leaflet": {
93
+ "optional": true
94
+ },
95
+ "react": {
96
+ "optional": true
97
+ },
98
+ "react-leaflet": {
99
+ "optional": true
100
+ }
101
+ },
102
+ "devDependencies": {
103
+ "@types/leaflet": "^1.9.21",
104
+ "@types/react": "^19.0.0",
105
+ "leaflet": "^1.9.4",
106
+ "react": "^19.0.0",
107
+ "react-leaflet": "^5.0.0",
108
+ "typescript": "^5.7.3"
109
+ },
110
+ "engines": {
111
+ "node": ">=18"
112
+ }
113
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The attribution the OSM-corroborated portion of this dataset requires.
3
+ *
4
+ * The OSM-derived geometry is ODbL 1.0, which asks for attribution wherever the
5
+ * data is shown — so the layer factories in this package set this string as the
6
+ * layer's `attribution` by default and Leaflet's attribution control picks it up
7
+ * on its own. That is deliberate: an adopter should be compliant without having
8
+ * read the licence section first.
9
+ *
10
+ * If your map already credits OpenStreetMap for its tiles, this is still worth
11
+ * keeping. The tile credit covers the basemap; this covers the overlay, which is
12
+ * a separate extract of the same database.
13
+ *
14
+ * Note what it does *not* say. It does not claim OSM as the source of the whole
15
+ * line — 31 of the 67 features have no OSM counterpart (see `data.ts`) — and it
16
+ * does not suggest OpenStreetMap or its contributors endorse the depiction.
17
+ */
18
+ export const INDIA_BOUNDARY_ATTRIBUTION =
19
+ 'India boundary: <a href="https://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a> (ODbL), partly hand-carried';
20
+
21
+ /** The same credit without markup, for renderers whose attribution is plain text. */
22
+ export const INDIA_BOUNDARY_ATTRIBUTION_TEXT =
23
+ "India boundary: © OpenStreetMap contributors (ODbL), partly hand-carried";
package/src/data.ts ADDED
@@ -0,0 +1,153 @@
1
+ import type { FeatureCollection, LineString } from "geojson";
2
+
3
+ /**
4
+ * India's boundary through Jammu & Kashmir, Ladakh and Aksai Chin, as depicted
5
+ * by the Survey of India, ready to draw over a basemap that renders the Line of
6
+ * Actual Control as the border instead.
7
+ *
8
+ * 67 LineString features, 689 points. Coordinates are [lon, lat], WGS 84,
9
+ * per RFC 7946.
10
+ *
11
+ * PROVENANCE — what `properties.source` means
12
+ *
13
+ * These coordinates are shivrajgodle's (github.com/shivrajgodle), posted to
14
+ * Leaflet/Leaflet#8943 in February 2025:
15
+ * https://github.com/Leaflet/Leaflet/issues/8943#issuecomment-2655497924
16
+ * Every feature below still traces back to that comment — the first one is
17
+ * byte-for-byte identical — and this package exists because they wrote the line
18
+ * down first.
19
+ *
20
+ * What a list in an issue thread cannot tell you is where it came from, so
21
+ * `tools/build-india-boundary.mjs` re-derives the boundary from OpenStreetMap and
22
+ * tags every feature with whether that derivation backs it up. The tags audit the
23
+ * data; they are not a comment on its author:
24
+ *
25
+ * "osm" (36 features) — OSM independently places a boundary along this feature,
26
+ * so it is corroborated by data anyone can re-query and diff. 30 of the 36
27
+ * match OSM's geometry exactly; the furthest is 5.1 km off.
28
+ * "hand" (31 features) — it does not. The nearest OSM boundary is 14.3 km away at
29
+ * best and 180 km at worst: there is nothing there to check against. Trust
30
+ * these exactly as far as you trust the original comment, which is to say:
31
+ * they look right, and nobody has verified them against a second source.
32
+ *
33
+ * Note the gap between those two ranges — 5.1 km to 14.3 km, with no feature in it.
34
+ * The two groups are separated by a factor of 2.8, so the split is a fact about the
35
+ * data rather than an artefact of where a threshold was put: any cutoff between
36
+ * 6 km and 14 km produces exactly these 36 and these 31. Re-run
37
+ * `node tools/build-india-boundary.mjs --retag` to print the full distribution and
38
+ * check the gap is still there.
39
+ *
40
+ * The split is not arbitrary, and the reason is the interesting part. The western
41
+ * edge — Azad Kashmir and Gilgit-Baltistan against Pakistan and Afghanistan — is
42
+ * simultaneously India's claim *and* a real administered boundary that exists on
43
+ * the ground, so OSM maps it the way it maps any border. That is the "osm" set.
44
+ * The eastern and northern edges — the Aksai Chin claim line, and India's claim
45
+ * north of the Sino-Pakistan line across the Shaksgam Valley / Trans-Karakoram
46
+ * Tract — have no administered counterpart for anyone to survey, so OSM carries
47
+ * only fragments: a targeted `claimed_by` query in the far north returns two ways.
48
+ * Those stretches are the "hand" set, and they cannot currently be sourced from
49
+ * OSM at all — which is precisely why they are still hand-carried rather than
50
+ * regenerated.
51
+ *
52
+ * Two deliberate decisions follow from that, and both should survive future edits:
53
+ *
54
+ * - The "hand" features are not stripped. They are what makes the line
55
+ * continuous, and Shaksgam is exactly the land this overlay exists to show as
56
+ * India's. A tidier-looking dataset would be a broken border.
57
+ * - The "hand" features are not rendered differently. Every feature draws
58
+ * identically. The tag is a note to whoever maintains this file, not a
59
+ * statement about the border.
60
+ *
61
+ * To improve this: get the missing claim line mapped in OSM upstream, then re-run
62
+ * the generator and watch features flip from "hand" to "osm".
63
+ *
64
+ * LICENSING — see LICENSE-DATA. The OSM-corroborated portion is ODbL 1.0 and
65
+ * requires attribution; the layer factories in this package set that attribution
66
+ * for you. OSM does not vouch for the "hand" features.
67
+ */
68
+ export type IndiaBoundarySource = "osm" | "hand";
69
+
70
+ export interface IndiaBoundaryProperties {
71
+ /**
72
+ * Whether an OpenStreetMap-derived boundary corroborates this feature. For
73
+ * maintainers auditing the data — not a rendering hint. See the note above.
74
+ */
75
+ source: IndiaBoundarySource;
76
+ }
77
+
78
+ /** Total features, by `source`. Handy in tests and in tooling output. */
79
+ export const INDIA_BOUNDARY_COUNTS: Readonly<Record<IndiaBoundarySource, number>> =
80
+ Object.freeze({ osm: 36, hand: 31 });
81
+
82
+ export const INDIA_BOUNDARY: FeatureCollection<LineString, IndiaBoundaryProperties> = {
83
+ type: "FeatureCollection",
84
+ features: [
85
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.7541731,32.9466018],[73.8076029,32.9423743],[73.8313682,32.9287784]]},"properties":{"source":"osm"}},
86
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.6713786,33.2047351],[73.6755463,33.1954493],[73.6629287,33.1586631],[73.6375765,33.1539475],[73.6300569,33.1355147],[73.6355715,33.1041905],[73.6553984,33.0780875],[73.6997514,33.0736643],[73.7346844,33.064026]]},"properties":{"source":"osm"}},
87
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.7511423,33.0500452],[73.7452654,33.0346563],[73.7608652,33.0167016],[73.7602995,32.9945073],[73.784266,32.9666077],[73.7541731,32.9466018]]},"properties":{"source":"osm"}},
88
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.7346844,33.064026],[73.7511423,33.0500452]]},"properties":{"source":"osm"}},
89
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.126488,35.124629],[74.080276,35.151099],[74.044984,35.141381],[73.994706,35.176384],[73.955261,35.183326],[73.930268,35.20305],[73.891099,35.211663],[73.849716,35.207772],[73.804703,35.236106],[73.781098,35.240546],[73.730545,35.21971],[73.721374,35.229431],[73.699706,35.297219],[73.697206,35.362769],[73.709426,35.413605],[73.721923,35.42749],[73.764436,35.449433],[73.80304,35.503052],[73.780273,35.522491],[73.741653,35.522218],[73.726379,35.529716],[73.673035,35.532768],[73.570832,35.555267],[73.534715,35.553321],[73.493043,35.568603],[73.414429,35.573325],[73.347488,35.599435],[73.295823,35.607498],[73.23027,35.643883],[73.2061,35.665268],[73.157212,35.69027],[73.126084,35.722763],[73.113038,35.751107],[73.114989,35.79222],[73.124696,35.82888],[73.114989,35.847772],[73.092483,35.860275],[73.058868,35.861107],[73.008332,35.840827],[72.976379,35.833878],[72.878312,35.843605],[72.825272,35.856102],[72.800537,35.854714],[72.764435,35.838883],[72.688583,35.818603],[72.670822,35.81833],[72.618867,35.837769],[72.570267,35.848601],[72.549148,35.881104],[72.5107111,35.8960973]]},"properties":{"source":"osm"}},
90
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[72.7698226,36.3078837],[72.8053899,36.3432476],[72.8558265,36.373232],[72.8756919,36.3906618],[72.8671272,36.4113425],[72.8785468,36.4385255],[72.9047167,36.4593849],[72.9264853,36.4530703],[72.9474213,36.4603416],[72.9728775,36.4545054],[72.9862003,36.4680906],[72.9747807,36.4946799],[72.9798958,36.5123692],[73.0511493,36.5322529],[73.0586435,36.5678969],[73.0764866,36.5713362],[73.0802931,36.5939744],[73.0969467,36.6067712],[73.0760108,36.6213798],[73.0689925,36.6792141],[73.1086042,36.6856057],[73.1568996,36.7084011],[73.1739101,36.7265182],[73.2377885,36.707066],[73.3082094,36.7030605],[73.3707793,36.7334778],[73.4151493,36.7326198],[73.4435793,36.7211788],[73.4579728,36.7360517],[73.5000826,36.7134552],[73.5631283,36.7162206],[73.579544,36.7243253],[73.5948891,36.6948582],[73.6398538,36.6981011],[73.6900524,36.6907567],[73.7090851,36.713646],[73.7990145,36.6997225],[73.8241139,36.7115481],[73.8619413,36.6994363],[73.8825204,36.7033466],[73.8890629,36.7282343],[73.8818066,36.7692193],[73.8482616,36.7917994],[73.8151923,36.7991341],[73.7955648,36.8196105],[73.7641609,36.8146586],[73.7478642,36.8272282],[73.7050407,36.8351307],[73.654106,36.908791]]},"properties":{"source":"osm"}},
91
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.5862409,33.4257503],[73.590003,33.412472],[73.5663406,33.3718378],[73.5724287,33.3425105],[73.5956654,33.3240186],[73.6103332,33.2882871]]},"properties":{"source":"osm"}},
92
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.6103332,33.2882871],[73.6155971,33.2479462]]},"properties":{"source":"osm"}},
93
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.6155971,33.2479462],[73.6366118,33.210103],[73.6713786,33.2047351]]},"properties":{"source":"osm"}},
94
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.5733914,33.6752806],[73.5670237,33.6668826],[73.5839324,33.6174785],[73.6054284,33.5888159],[73.629182,33.5695089],[73.6225731,33.5438847],[73.6387736,33.5337437],[73.6103298,33.5117724],[73.6040033,33.4938069]]},"properties":{"source":"osm"}},
95
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.6212449,33.4758396],[73.6314493,33.4486554],[73.595894,33.4380221],[73.5862409,33.4257503]]},"properties":{"source":"osm"}},
96
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.6040033,33.4938069],[73.6212449,33.4758396]]},"properties":{"source":"osm"}},
97
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.575941,33.9109027],[73.5939142,33.8872066],[73.5596079,33.7813447],[73.5985897,33.747968]]},"properties":{"source":"osm"}},
98
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.5986353,33.7452151],[73.6067547,33.7259531],[73.6010127,33.7014501],[73.5733914,33.6752806]]},"properties":{"source":"osm"}},
99
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.5342636,33.9691291],[73.5461669,33.9407682],[73.575941,33.9109027]]},"properties":{"source":"osm"}},
100
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.5136885,34.0013148],[73.5342636,33.9691291]]},"properties":{"source":"osm"}},
101
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.610535,34.570831],[73.641098,34.566941],[73.658034,34.595824],[73.674423,34.645828],[73.661102,34.684159],[73.67276,34.703324],[73.709153,34.732208],[73.720535,34.767213],[73.760269,34.799438],[73.799423,34.803604],[73.833879,34.826942],[73.89833,34.824716],[73.937194,34.849433],[73.986373,34.870544],[74.00444,34.905265],[74.05165,34.955552],[74.055816,34.996102],[74.085265,35.018326],[74.086655,35.029159],[74.062196,35.060547],[74.060256,35.074714],[74.126488,35.124629]]},"properties":{"source":"osm"}},
102
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.3910239,34.376181],[73.398331,34.38234],[73.406937,34.424438],[73.432206,34.479158],[73.442749,34.554994],[73.464707,34.571937],[73.526093,34.57361],[73.581665,34.587768],[73.610535,34.570831]]},"properties":{"source":"osm"}},
103
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.3910239,34.376181],[73.4029651,34.3530396],[73.4433592,34.3212751],[73.4594363,34.2883684],[73.4856852,34.2727067],[73.473291,34.260812],[73.4800625,34.233512],[73.4968165,34.2088658],[73.4903309,34.1830069],[73.4908513,34.1264472],[73.5004697,34.0946105]]},"properties":{"source":"osm"}},
104
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.5136885,34.0013148],[73.4986167,34.0716161],[73.5004697,34.0946105]]},"properties":{"source":"osm"}},
105
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[72.5107111,35.8960973],[72.5088281,35.9160773],[72.523606,35.926942],[72.566941,36.007507],[72.559402,36.033341],[72.521912,36.072228],[72.522475,36.106948],[72.544692,36.15499],[72.540253,36.202476],[72.567215,36.248298],[72.614151,36.267174],[72.663315,36.2594],[72.686357,36.273277],[72.7070145,36.27311],[72.735088,36.2990642],[72.7698226,36.3078837]]},"properties":{"source":"osm"}},
106
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.8313682,32.9287784],[73.8924503,32.9246253],[73.9303692,32.933448],[73.9871521,32.9323311],[74.0097625,32.9426328],[74.0799088,32.9101082],[74.1349048,32.8991909],[74.183487,32.865696],[74.2369804,32.8475213],[74.253395,32.846275],[74.314689,32.8204231],[74.3275444,32.7829551],[74.3564689,32.7752404],[74.378952,32.801624],[74.397241,32.8009687],[74.408611,32.771667],[74.4638194,32.7766375]]},"properties":{"source":"osm"}},
107
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.389758,32.918015],[79.40078,32.940565],[79.379557,32.945744],[79.334741,32.997603],[79.341835,33.014705],[79.328358,33.034464],[79.340579,33.057364],[79.359082,33.063018],[79.373109,33.118749],[79.400529,33.148002],[79.395886,33.169414]]},"properties":{"source":"hand"}},
108
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.4148053,32.5422657],[79.46295,32.606116],[79.502924,32.643717]]},"properties":{"source":"hand"}},
109
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.502924,32.643717],[79.524636,32.651546],[79.548375,32.676552],[79.540843,32.703226],[79.561282,32.714367],[79.543609,32.731088],[79.557271,32.759179]]},"properties":{"source":"hand"}},
110
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.557271,32.759179],[79.5447607,32.7730679],[79.505323,32.783541],[79.4808,32.800677]]},"properties":{"source":"hand"}},
111
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.4808,32.800677],[79.460914,32.833437],[79.470847,32.84268],[79.472568,32.876263],[79.446354,32.89098],[79.421025,32.895212],[79.389758,32.918015]]},"properties":{"source":"hand"}},
112
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[75.9980541,36.484496],[76.0258665,36.4860462],[76.0692272,36.4775464],[76.1251036,36.4374592],[76.1731349,36.390302],[76.1986356,36.3874455],[76.2547611,36.3477937],[76.2973903,36.3504645],[76.3241353,36.361788],[76.352408,36.3598739],[76.4011526,36.3215115],[76.432004,36.308161],[76.4500366,36.2694054],[76.4324252,36.252071],[76.4560238,36.2413969],[76.4817068,36.2114093],[76.5448627,36.192757],[76.5629732,36.1730653],[76.6011647,36.1655489],[76.6372798,36.1849242],[76.6647957,36.1580606],[76.6972733,36.1358971],[76.7168607,36.0872442],[76.7260034,36.0784771],[76.8007285,36.0489926],[76.8049865,36.0168814],[76.7682293,36.0080173],[76.7543408,35.9826725],[76.7227707,35.9534305],[76.7856816,35.8899445],[76.8037794,35.8504117],[76.8653581,35.8264735],[76.8949429,35.7997362],[76.9352244,35.7840569],[77.004433,35.7750916],[77.033321,35.7764174],[77.081515,35.7977912],[77.1195362,35.796414],[77.1416322,35.7714596],[77.1658828,35.7586352],[77.1753165,35.7317285],[77.2221123,35.727116],[77.2245821,35.714978],[77.2854571,35.7110688],[77.3165673,35.7000154],[77.327599,35.7190901],[77.3584377,35.71772],[77.3832012,35.6931332],[77.4040978,35.6611799],[77.4269413,35.6593261],[77.4379117,35.6410899],[77.4271369,35.6105445],[77.4568505,35.5936084],[77.4655989,35.5733167],[77.4606132,35.5477076],[77.4836923,35.5363824],[77.4724145,35.5211137],[77.4402307,35.518059],[77.406699,35.5298165],[77.3783943,35.5503481],[77.3453946,35.5468226],[77.3227022,35.5367978]]},"properties":{"source":"hand"}},
113
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[75.9526061,36.5372951],[75.9874928,36.502322],[75.9980541,36.484496]]},"properties":{"source":"hand"}},
114
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[78.9054981,34.0051852],[78.9354793,34.0204138],[78.9952038,34.036832],[79.0189984,34.0161307],[79.0520729,34.0025678],[79.1087041,33.9901946],[79.1472513,33.9989986],[79.171046,34.0218414],[79.1938888,34.0249347],[79.2252977,34.010658],[79.2488543,34.0239829],[79.2969194,34.0094682],[79.3161931,34.014941],[79.3674407,33.9946664],[79.3906702,33.997095],[79.4101818,34.0101821],[79.4044711,34.0273142],[79.4294554,34.0596749],[79.4161304,34.1001257],[79.4382594,34.116544],[79.4701442,34.1160681],[79.4913214,34.134152],[79.497508,34.1741269],[79.4905886,34.1908996],[79.5586601,34.209343],[79.5898311,34.2409898],[79.6073639,34.2382215],[79.6100777,34.2841617],[79.6013549,34.3084887],[79.5732938,34.3214156],[79.5590171,34.3716222],[79.5347804,34.4007544],[79.5305915,34.4426436],[79.5091611,34.4511975]]},"properties":{"source":"osm"}},
115
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.0851428,33.6195384],[79.0825254,33.6492817],[79.0557405,33.6653971],[79.0220871,33.674266],[79.0079801,33.6924626],[79.0096535,33.7097317],[79.0282783,33.7536762],[79.0004386,33.7734257],[78.9933002,33.7946029],[78.9652226,33.8212529],[78.9371449,33.9126242],[78.8871763,33.9725866],[78.9054981,34.0051852]]},"properties":{"source":"osm"}},
116
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.395886,33.169414],[79.412751,33.176773],[79.38518,33.201913],[79.362314,33.19727],[79.33569,33.204029],[79.323878,33.190291],[79.255818,33.215399],[79.238447,33.233117],[79.216971,33.237886],[79.204401,33.20984],[79.182293,33.212241],[79.151971,33.181869]]},"properties":{"source":"hand"}},
117
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[78.9366127,33.3869223],[78.9273846,33.440603],[78.9314297,33.4867645],[78.9097505,33.5654311],[78.8883614,33.572663],[78.9077147,33.621128]]},"properties":{"source":"osm"}},
118
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[78.9077147,33.621128],[78.9499895,33.6176348],[79.0035273,33.6074032],[79.0251804,33.6190625],[79.0851428,33.6195384]]},"properties":{"source":"osm"}},
119
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.5091611,34.4511975],[79.5381633,34.4788814],[79.5631331,34.457944],[79.604798,34.4653105],[79.6233578,34.449844],[79.6735645,34.454603],[79.6849859,34.4767319],[79.7033077,34.4862498],[79.7216296,34.4717351],[79.7526815,34.4776837],[79.7655306,34.4705453],[79.7967052,34.4822221]]},"properties":{"source":"hand"}},
120
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.9079287,34.6946378],[79.9323937,34.6918877],[79.9515387,34.6737465],[79.9721896,34.6997035],[80.0152838,34.6936803],[80.0741464,34.7058061],[80.0792055,34.733439],[80.0669116,34.7622563],[80.0989921,34.7745363],[80.1204618,34.837705],[80.1674635,34.8800732],[80.1969966,34.8871385],[80.2060403,34.9114433],[80.1862573,34.9464874],[80.1975165,34.96062],[80.226635,34.9724685],[80.2335754,34.9895891],[80.2173653,35.0025938],[80.1936721,35.1184343]]},"properties":{"source":"hand"}},
121
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.7967052,34.4822221],[79.8107404,34.5402635],[79.7882498,34.5640188],[79.8018136,34.5892643],[79.787018,34.605969],[79.7865473,34.6273539],[79.8297132,34.6460687],[79.8452731,34.6690141],[79.8984776,34.69619],[79.9079287,34.6946378]]},"properties":{"source":"hand"}},
122
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[78.1571897,35.5509472],[78.1297226,35.5455394],[78.0766144,35.5599648],[78.0482686,35.5782463],[78.0224262,35.5642328],[77.9978907,35.5603415],[77.9672604,35.5681972],[77.9378503,35.559317],[77.9283455,35.5412573],[77.9338061,35.5224453],[77.9240974,35.4972106]]},"properties":{"source":"hand"}},
123
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[78.2510871,35.7282772],[78.2401006,35.7062087],[78.2093646,35.6740077],[78.1817008,35.6673563],[78.1960618,35.6496696],[78.1617348,35.5929304],[78.1571897,35.5509472]]},"properties":{"source":"hand"}},
124
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[78.8035393,35.8770789],[78.8002418,35.8698246],[78.7455044,35.8594926],[78.7217629,35.8630099],[78.6946747,35.8496793],[78.676115,35.8530106],[78.6566034,35.8220776],[78.6075865,35.8151771],[78.5767354,35.7972152],[78.5587882,35.7733295],[78.5225857,35.7627436],[78.5053525,35.771209],[78.462723,35.7644065],[78.4405012,35.7807327],[78.4211347,35.767396],[78.4087559,35.7306959],[78.3423159,35.7199],[78.3195253,35.7210563]]},"properties":{"source":"hand"}},
125
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[78.3195253,35.7210563],[78.2510871,35.7282772]]},"properties":{"source":"hand"}},
126
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[78.8558586,35.9742433],[78.836074,35.9419285],[78.8277205,35.9085145],[78.8035393,35.8770789]]},"properties":{"source":"hand"}},
127
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.7042776,35.6390451],[79.7004922,35.6594497],[79.676768,35.6778252],[79.6786294,35.7002396],[79.6645914,35.7185434],[79.6451242,35.7238949],[79.6424872,35.7501872],[79.6295668,35.7782117],[79.5925417,35.7888788],[79.56427,35.8297913],[79.5883037,35.877887],[79.5664131,35.8982187]]},"properties":{"source":"hand"}},
128
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[80.3664698,35.5251075],[80.3294639,35.534929],[80.3021734,35.5340292],[80.2974544,35.5560939],[80.2238609,35.5550776],[80.2054132,35.5751497],[80.1713024,35.557166],[80.1659653,35.5466079],[80.1825866,35.5088458],[80.1419485,35.4979942],[80.1271319,35.4783793],[80.1099998,35.4783793],[80.0884656,35.4381664],[80.0722853,35.4231758]]},"properties":{"source":"hand"}},
129
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[80.1936721,35.1184343],[80.2374457,35.1543721],[80.2223395,35.1780178],[80.2468013,35.1856643],[80.2563285,35.2041814],[80.2852472,35.211262]]},"properties":{"source":"hand"}},
130
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[80.2852472,35.211262],[80.2942892,35.2678932]]},"properties":{"source":"hand"}},
131
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[80.0722853,35.4231758],[80.0349278,35.4386423],[80.0168439,35.4657682],[80.0068501,35.4962253],[79.994001,35.5097882],[79.9645318,35.5714719],[80.0010814,35.5924701],[79.9545853,35.6162313],[79.957585,35.6328089]]},"properties":{"source":"hand"}},
132
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.957585,35.6328089],[79.9245878,35.620652],[79.9209565,35.604706],[79.8675304,35.5974051],[79.8607658,35.5766603],[79.8367138,35.5862811],[79.8392693,35.6016142],[79.816842,35.6269739],[79.7714728,35.6256662],[79.7340147,35.642769],[79.7042776,35.6390451]]},"properties":{"source":"hand"}},
133
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[80.2925906,35.3604184],[80.3467536,35.3910228],[80.3769176,35.3923438],[80.4119255,35.4260306],[80.4208426,35.4430942]]},"properties":{"source":"hand"}},
134
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[80.2942892,35.2678932],[80.2662115,35.2964467],[80.2925906,35.3604184]]},"properties":{"source":"hand"}},
135
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[80.4208426,35.4430942],[80.4115952,35.4771112],[80.3894676,35.4876797],[80.3660968,35.5134914],[80.3664698,35.5251075]]},"properties":{"source":"hand"}},
136
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.5664131,35.8982187],[79.5578387,35.8803554],[79.5253079,35.8657997],[79.5013308,35.8465243],[79.4717125,35.8586372],[79.4522501,35.8827864],[79.468368,35.9003393],[79.4563342,35.9240926],[79.4396228,35.9341975],[79.4369169,35.9722297],[79.3920214,35.9762218],[79.3434392,35.9878727],[79.3383831,35.9634717],[79.3131028,35.9568768],[79.2695767,35.9274197]]},"properties":{"source":"hand"}},
137
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[79.2695767,35.9274197],[79.1862615,35.9331353],[79.1644984,35.9447862],[79.077666,35.9469845],[79.0572219,35.9414888],[79.0257863,35.9151093],[79.0114975,35.9311568],[78.9635747,35.9370922],[78.9547816,35.9485233],[78.9264237,35.9452259],[78.8558586,35.9742433]]},"properties":{"source":"hand"}},
138
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.841253,36.925945],[73.827306,36.899294],[73.799916,36.890602],[73.7521,36.912051],[73.734868,36.903018],[73.69158,36.915797],[73.654106,36.908791]]},"properties":{"source":"osm"}},
139
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.9999254,36.9979211],[74.9189999,36.978957],[74.931881,36.945459],[74.9060629,36.92974],[74.8837271,36.936386],[74.8801829,36.960527],[74.8402621,37.019909],[74.836669,37.058713],[74.805633,37.053186],[74.794419,37.031096],[74.7741229,37.022023],[74.739209,37.021655],[74.717482,37.037366],[74.7214841,37.05441],[74.7019699,37.082359],[74.667951,37.082416],[74.622406,37.059823],[74.624373,37.047285],[74.5801222,37.030568],[74.564626,37.030852]]},"properties":{"source":"hand"}},
140
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.065299,36.841091],[74.048114,36.826411],[74.003385,36.836827],[73.99436,36.830229],[73.95743,36.842518],[73.932234,36.87474],[73.914651,36.869367],[73.892046,36.879803]]},"properties":{"source":"osm"}},
141
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[73.892046,36.879803],[73.90677,36.900804],[73.890465,36.912521],[73.841253,36.925945]]},"properties":{"source":"osm"}},
142
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.153365,36.898165],[74.129893,36.8637],[74.12079,36.83822],[74.065299,36.841091]]},"properties":{"source":"osm"}},
143
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.315913,36.938305],[74.309291,36.918906],[74.237211,36.894872],[74.223558,36.896831]]},"properties":{"source":"osm"}},
144
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.223558,36.896831],[74.180747,36.916499],[74.153365,36.898165]]},"properties":{"source":"osm"}},
145
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.534055,36.957221],[74.506271,36.966017],[74.491484,36.988002],[74.426558,37.01115]]},"properties":{"source":"osm"}},
146
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.395311,36.973441],[74.388036,36.964049],[74.350169,36.962302],[74.315913,36.938305]]},"properties":{"source":"osm"}},
147
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.426558,37.01115],[74.413732,36.975273],[74.395311,36.973441]]},"properties":{"source":"osm"}},
148
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[74.564626,37.030852],[74.51893,37.017367],[74.543524,36.967085],[74.534055,36.957221]]},"properties":{"source":"osm"}},
149
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[75.19221,36.974688],[75.2162911,36.971826],[75.233421,36.959055],[75.285346,36.974495],[75.315789,36.969826],[75.327187,36.958537],[75.3589271,36.956816],[75.3753049,36.946841],[75.3995239,36.955057],[75.4058632,36.936584],[75.387195,36.925916],[75.385606,36.903406],[75.4202048,36.889483],[75.4318285,36.8301725],[75.419898,36.7994229],[75.4195976,36.7733706],[75.4435014,36.7467937],[75.4514837,36.7246105],[75.4694223,36.7159075],[75.4992641,36.739151],[75.5324539,36.721379],[75.5339051,36.771441],[75.5736412,36.766664],[75.6373748,36.770191],[75.673418,36.764956],[75.6981101,36.74689],[75.7195099,36.752095],[75.7658138,36.724879]]},"properties":{"source":"hand"}},
150
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[75.19221,36.974688],[75.1581259,36.992952],[75.168135,37.009677],[75.1376891,37.026454],[75.1254728,37.012544],[75.0480739,37.00475],[75.0292459,37.01624],[74.9999254,36.9979211]]},"properties":{"source":"hand"}},
151
+ {"type":"Feature","geometry":{"type":"LineString","coordinates":[[75.7658138,36.724879],[75.803792,36.710235],[75.8487161,36.673665],[75.864847,36.669735],[75.888166,36.639054],[75.911314,36.629027],[75.9406328,36.5928932],[75.9257841,36.5730437],[75.9526061,36.5372951]]},"properties":{"source":"hand"}},
152
+ ],
153
+ };
package/src/index.ts ADDED
@@ -0,0 +1,45 @@
1
+ /**
2
+ * leaflet-india-boundary — framework-agnostic entry point.
3
+ *
4
+ * This module is the data and the style numbers, and nothing else. It imports no
5
+ * mapping library, so a MapLibre, OpenLayers or deck.gl user can take it without
6
+ * pulling in Leaflet:
7
+ *
8
+ * ```js
9
+ * import { INDIA_BOUNDARY, osmAdminBoundaryStyle } from "leaflet-india-boundary";
10
+ * ```
11
+ *
12
+ * The Leaflet layer lives at `leaflet-india-boundary/leaflet`, and the
13
+ * react-leaflet component at `leaflet-india-boundary/react`, so that neither
14
+ * becomes a dependency of the data.
15
+ */
16
+
17
+ export {
18
+ INDIA_BOUNDARY,
19
+ INDIA_BOUNDARY_COUNTS,
20
+ type IndiaBoundaryProperties,
21
+ type IndiaBoundarySource,
22
+ } from "./data.js";
23
+
24
+ export {
25
+ INDIA_BOUNDARY_ATTRIBUTION,
26
+ INDIA_BOUNDARY_ATTRIBUTION_TEXT,
27
+ } from "./attribution.js";
28
+
29
+ export {
30
+ isOsmAdminBoundaryVisible,
31
+ OSM_ADMIN_BOUNDARY_COLOR,
32
+ OSM_ADMIN_BOUNDARY_COLOR_WIDE,
33
+ OSM_ADMIN_BOUNDARY_MAX_TABLE_ZOOM,
34
+ OSM_ADMIN_BOUNDARY_MIN_ZOOM,
35
+ OSM_ADMIN_BOUNDARY_OPACITY,
36
+ OSM_ADMIN_BOUNDARY_WIDE_ZOOM,
37
+ OSM_ADMIN_BOUNDARY_WIDTH,
38
+ OSM_ADMIN_STYLE,
39
+ osmAdminBoundaryColor,
40
+ osmAdminBoundaryStyle,
41
+ osmAdminBoundaryWidth,
42
+ osmAdminBoundaryWidthExpression,
43
+ type OsmAdminBoundaryStyleOptions,
44
+ type ResolvedBoundaryStyle,
45
+ } from "./style.js";