@openhistoricalmap/map-styles 0.9.8 → 0.9.10
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.
- package/.nvmrc +1 -1
- package/CODE_OF_CONDUCT.md +94 -94
- package/LICENSE.md +121 -121
- package/README.md +115 -115
- package/demo.html +79 -79
- package/dist/fonts/OpenHistorical/README.md +42 -42
- package/dist/historical/historical.json +12938 -12730
- package/dist/historical/historical_spritesheet.json +1149 -1149
- package/dist/historical/historical_spritesheet@2x.json +1149 -1149
- package/dist/japanese_scroll/japanese_scroll.json +4077 -4076
- package/dist/japanese_scroll/japanese_scroll_spritesheet.json +38 -38
- package/dist/japanese_scroll/japanese_scroll_spritesheet@2x.json +38 -38
- package/dist/ohm.styles.js +35216 -35005
- package/dist/railway/railway.json +13933 -13932
- package/dist/railway/railway_spritesheet.json +1135 -1135
- package/dist/railway/railway_spritesheet@2x.json +1135 -1135
- package/dist/woodblock/woodblock.json +4261 -4260
- package/dist/woodblock/woodblock_spritesheet.json +72 -72
- package/dist/woodblock/woodblock_spritesheet@2x.json +72 -72
- package/docs/historical.md +34 -34
- package/docs/japanese_scroll.md +40 -40
- package/docs/railway.md +60 -60
- package/docs/woodblock.md +29 -29
- package/glyphicons/fonts/glyphicons-regular.svg +827 -827
- package/glyphicons/index.html +857 -857
- package/glyphicons/license.txt +63 -63
- package/historical/historical.json +7014 -6883
- package/historical/historical_spritesheet.json +1149 -1149
- package/historical/historical_spritesheet@2x.json +1149 -1149
- package/historical/poi/bell_tower-18.svg +68 -68
- package/historical/poi/border_control-12.svg +10 -10
- package/historical/poi/border_control-18.svg +4 -4
- package/historical/poi/bucket-18.svg +4 -4
- package/historical/poi/grave_yard-18.svg +6 -6
- package/historical/poi/updated_POI.json +1149 -1149
- package/img/README.md +1 -1
- package/index.html +54 -54
- package/japanese_scroll/japanese_scroll.json +2286 -2285
- package/japanese_scroll/japanese_scroll_spritesheet.json +38 -38
- package/japanese_scroll/japanese_scroll_spritesheet@2x.json +38 -38
- package/package.json +32 -32
- package/railway/railway.json +6889 -6888
- package/railway/railway_demo.html +144 -144
- package/railway/railway_spritesheet.json +1135 -1135
- package/railway/railway_spritesheet@2x.json +1135 -1135
- package/scripts/prepare.js +84 -84
- package/ssl/cert.pem +23 -23
- package/ssl/csr.pem +18 -18
- package/ssl/key.pem +28 -28
- package/woodblock/woodblock.json +2424 -2423
- package/woodblock/woodblock_spritesheet.json +72 -72
- package/woodblock/woodblock_spritesheet@2x.json +72 -72
package/img/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
pngs in this directory are used by `maplibre-gl-style-flipper` to switch between individual styles during local development.
|
|
1
|
+
pngs in this directory are used by `maplibre-gl-style-flipper` to switch between individual styles during local development.
|
package/index.html
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<script src="./node_modules/maplibre-gl/dist/maplibre-gl.js"></script>
|
|
4
|
-
<link href="./node_modules/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet" />
|
|
5
|
-
</head>
|
|
6
|
-
<body>
|
|
7
|
-
<div id="map" style="width:100%;height:100%"></div>
|
|
8
|
-
|
|
9
|
-
<script type="module">
|
|
10
|
-
import StyleFlipperControl from "./node_modules/maplibre-gl-style-flipper/index.js";
|
|
11
|
-
const mapStyles = {
|
|
12
|
-
"historical": {
|
|
13
|
-
code: "historical",
|
|
14
|
-
image: "./img/historical.png",
|
|
15
|
-
url: "./historical/historical.json"
|
|
16
|
-
},
|
|
17
|
-
"japanese_scroll": {
|
|
18
|
-
code: "japanese_scroll",
|
|
19
|
-
image: "./img/japanese_scroll.png",
|
|
20
|
-
url: "./japanese_scroll/japanese_scroll.json"
|
|
21
|
-
},
|
|
22
|
-
"railway": {
|
|
23
|
-
code: "railway",
|
|
24
|
-
image: "./img/railway.png",
|
|
25
|
-
url: "./railway/railway.json"
|
|
26
|
-
},
|
|
27
|
-
"woodblock": {
|
|
28
|
-
code: "woodblock",
|
|
29
|
-
image: "./img/woodblock.png",
|
|
30
|
-
url: "./woodblock/woodblock.json"
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
var map = new maplibregl.Map({
|
|
35
|
-
container: 'map',
|
|
36
|
-
style: mapStyles["historical"].url,
|
|
37
|
-
center: [-74.033, 40.6259],
|
|
38
|
-
zoom: 11.73,
|
|
39
|
-
hash: true
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
// Create an instance of StyleFlipperControl
|
|
43
|
-
const styleFlipperControl = new StyleFlipperControl(mapStyles);
|
|
44
|
-
|
|
45
|
-
// Set the initial style code
|
|
46
|
-
styleFlipperControl.setCurrentStyleCode("historical");
|
|
47
|
-
|
|
48
|
-
// Add the control to the map
|
|
49
|
-
map.addControl(styleFlipperControl, "bottom-right");
|
|
50
|
-
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
</body>
|
|
54
|
-
</html>
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<script src="./node_modules/maplibre-gl/dist/maplibre-gl.js"></script>
|
|
4
|
+
<link href="./node_modules/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet" />
|
|
5
|
+
</head>
|
|
6
|
+
<body>
|
|
7
|
+
<div id="map" style="width:100%;height:100%"></div>
|
|
8
|
+
|
|
9
|
+
<script type="module">
|
|
10
|
+
import StyleFlipperControl from "./node_modules/maplibre-gl-style-flipper/index.js";
|
|
11
|
+
const mapStyles = {
|
|
12
|
+
"historical": {
|
|
13
|
+
code: "historical",
|
|
14
|
+
image: "./img/historical.png",
|
|
15
|
+
url: "./historical/historical.json"
|
|
16
|
+
},
|
|
17
|
+
"japanese_scroll": {
|
|
18
|
+
code: "japanese_scroll",
|
|
19
|
+
image: "./img/japanese_scroll.png",
|
|
20
|
+
url: "./japanese_scroll/japanese_scroll.json"
|
|
21
|
+
},
|
|
22
|
+
"railway": {
|
|
23
|
+
code: "railway",
|
|
24
|
+
image: "./img/railway.png",
|
|
25
|
+
url: "./railway/railway.json"
|
|
26
|
+
},
|
|
27
|
+
"woodblock": {
|
|
28
|
+
code: "woodblock",
|
|
29
|
+
image: "./img/woodblock.png",
|
|
30
|
+
url: "./woodblock/woodblock.json"
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var map = new maplibregl.Map({
|
|
35
|
+
container: 'map',
|
|
36
|
+
style: mapStyles["historical"].url,
|
|
37
|
+
center: [-74.033, 40.6259],
|
|
38
|
+
zoom: 11.73,
|
|
39
|
+
hash: true
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
// Create an instance of StyleFlipperControl
|
|
43
|
+
const styleFlipperControl = new StyleFlipperControl(mapStyles);
|
|
44
|
+
|
|
45
|
+
// Set the initial style code
|
|
46
|
+
styleFlipperControl.setCurrentStyleCode("historical");
|
|
47
|
+
|
|
48
|
+
// Add the control to the map
|
|
49
|
+
map.addControl(styleFlipperControl, "bottom-right");
|
|
50
|
+
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
</body>
|
|
54
|
+
</html>
|