@defra/interactive-map 0.0.42-fmp-2 → 0.0.42-fmp-3
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/assets/templates/add-polygons.njk +5 -1
- package/assets/templates/add-symbols.njk +5 -1
- package/dist/esm/im-core.js +1 -1
- package/dist/umd/im-core.js +1 -1
- package/docs/api/context.md +24 -0
- package/package.json +1 -1
- package/scripts/publish-package.sh +30 -2
- package/src/App/App.jsx +1 -1
- package/src/App/App.test.jsx +6 -1
- package/src/App/registry/pluginRegistry.js +13 -0
- package/src/App/registry/pluginRegistry.test.js +15 -0
- package/src/App/store/ServiceProvider.jsx +5 -3
- package/src/App/store/ServiceProvider.test.jsx +20 -1
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<link href="/public/stylesheets/application.css" rel="stylesheet" type="text/css">
|
|
9
9
|
<link href="/plugin-assets/%40defra%2Finteractive-map/dist/css/index.css" rel="stylesheet" type="text/css">
|
|
10
10
|
<link href="/plugin-assets/%40defra%2Finteractive-map/plugins/datasets/dist/css/index.css" rel="stylesheet" type="text/css">
|
|
11
|
+
<link href="/plugin-assets/%40defra%2Finteractive-map/plugins/map-key/dist/css/index.css" rel="stylesheet" type="text/css">
|
|
11
12
|
{% endblock %}
|
|
12
13
|
|
|
13
14
|
{% block bodyStart %}
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
<script src="/plugin-assets/%40defra%2Finteractive-map/dist/umd/index.js"></script>
|
|
41
42
|
<script src="/plugin-assets/%40defra%2Finteractive-map/providers/maplibre/dist/umd/index.js"></script>
|
|
42
43
|
<script src="/plugin-assets/%40defra%2Finteractive-map/plugins/datasets/dist/umd/index.js"></script>
|
|
44
|
+
<script src="/plugin-assets/%40defra%2Finteractive-map/plugins/map-key/dist/umd/index.js"></script>
|
|
43
45
|
|
|
44
46
|
<script>
|
|
45
47
|
// GeoJSON can also be loaded from a URL; use the tiles property for vector tile sources
|
|
@@ -126,6 +128,8 @@
|
|
|
126
128
|
}]
|
|
127
129
|
})
|
|
128
130
|
|
|
131
|
+
const mapKeyPlugin = defra.mapKeyPlugin()
|
|
132
|
+
|
|
129
133
|
new defra.InteractiveMap('map', {
|
|
130
134
|
behaviour: 'inline',
|
|
131
135
|
mapProvider: defra.maplibreProvider(),
|
|
@@ -137,7 +141,7 @@
|
|
|
137
141
|
center: [-2.464, 54.558],
|
|
138
142
|
zoom: 14,
|
|
139
143
|
containerHeight: '516px',
|
|
140
|
-
plugins: [datasetsPlugin]
|
|
144
|
+
plugins: [datasetsPlugin, mapKeyPlugin]
|
|
141
145
|
})
|
|
142
146
|
</script>
|
|
143
147
|
{% endblock %}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<link href="/public/stylesheets/application.css" rel="stylesheet" type="text/css">
|
|
9
9
|
<link href="/plugin-assets/%40defra%2Finteractive-map/dist/css/index.css" rel="stylesheet" type="text/css">
|
|
10
10
|
<link href="/plugin-assets/%40defra%2Finteractive-map/plugins/datasets/dist/css/index.css" rel="stylesheet" type="text/css">
|
|
11
|
+
<link href="/plugin-assets/%40defra%2Finteractive-map/plugins/map-key/dist/css/index.css" rel="stylesheet" type="text/css">
|
|
11
12
|
{% endblock %}
|
|
12
13
|
|
|
13
14
|
{% block bodyStart %}
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
<script src="/plugin-assets/%40defra%2Finteractive-map/dist/umd/index.js"></script>
|
|
41
42
|
<script src="/plugin-assets/%40defra%2Finteractive-map/providers/maplibre/dist/umd/index.js"></script>
|
|
42
43
|
<script src="/plugin-assets/%40defra%2Finteractive-map/plugins/datasets/dist/umd/index.js"></script>
|
|
44
|
+
<script src="/plugin-assets/%40defra%2Finteractive-map/plugins/map-key/dist/umd/index.js"></script>
|
|
43
45
|
|
|
44
46
|
<script>
|
|
45
47
|
const symbolGraphic = 'M3 15H1V1h2v2h2V1h2v5h2V4h2v2h2V4h2v11H6V9H3v6z'
|
|
@@ -102,6 +104,8 @@
|
|
|
102
104
|
}]
|
|
103
105
|
})
|
|
104
106
|
|
|
107
|
+
const mapKeyPlugin = defra.mapKeyPlugin()
|
|
108
|
+
|
|
105
109
|
new defra.InteractiveMap('map', {
|
|
106
110
|
behaviour: 'inline',
|
|
107
111
|
mapProvider: defra.maplibreProvider(),
|
|
@@ -113,7 +117,7 @@
|
|
|
113
117
|
center: [-2.4608, 54.5574],
|
|
114
118
|
zoom: 14,
|
|
115
119
|
containerHeight: '516px',
|
|
116
|
-
plugins: [datasetsPlugin]
|
|
120
|
+
plugins: [datasetsPlugin, mapKeyPlugin]
|
|
117
121
|
})
|
|
118
122
|
</script>
|
|
119
123
|
{% endblock %}
|