feat: add regional and remarkable nature asset symbology icons and matching logic
This commit is contained in:
parent
f271d65be2
commit
9bdd68bea2
3 changed files with 21 additions and 8 deletions
|
|
@ -717,6 +717,8 @@
|
||||||
{ name: 'icon-trafficlightradarpole', codepoint: 'f4e0', color: '#e53935' },
|
{ name: 'icon-trafficlightradarpole', codepoint: 'f4e0', color: '#e53935' },
|
||||||
{ name: 'icon-sign', codepoint: 'f82b', color: '#0022ff' },
|
{ name: 'icon-sign', codepoint: 'f82b', color: '#0022ff' },
|
||||||
{ name: 'icon-nature', codepoint: 'f5e1', color: '#2e7d32' },
|
{ name: 'icon-nature', codepoint: 'f5e1', color: '#2e7d32' },
|
||||||
|
{ name: 'icon-nature-regional', codepoint: 'f5e1', color: '#1d4ed8' },
|
||||||
|
{ name: 'icon-nature-remarkable', codepoint: 'f5e1', color: '#d97706' },
|
||||||
{ name: 'icon-naturebench', codepoint: 'f5e1', color: '#2e7d32' },
|
{ name: 'icon-naturebench', codepoint: 'f5e1', color: '#2e7d32' },
|
||||||
{ name: 'icon-natureplanter', codepoint: 'f3ce', color: '#d97706' },
|
{ name: 'icon-natureplanter', codepoint: 'f3ce', color: '#d97706' },
|
||||||
{ name: 'icon-naturerwiasset', codepoint: 'f30b', color: '#0277bd' },
|
{ name: 'icon-naturerwiasset', codepoint: 'f30b', color: '#0277bd' },
|
||||||
|
|
@ -812,10 +814,14 @@
|
||||||
['==', ['slice', ['get', 'code'], 0, 7], 'CSE-BAC'],
|
['==', ['slice', ['get', 'code'], 0, 7], 'CSE-BAC'],
|
||||||
], 'icon-natureplanter',
|
], 'icon-natureplanter',
|
||||||
['==', ['get', 'asset_type'], 'naturebench'], 'icon-naturebench',
|
['==', ['get', 'asset_type'], 'naturebench'], 'icon-naturebench',
|
||||||
['all', ['==', ['get', 'thematic'], 'nature'], ['==', ['get', 'is_remarkable'], true]], 'icon-nature-remarkable',
|
['all',
|
||||||
['all', ['==', ['get', 'thematic'], 'nature'], ['==', ['get', 'management_type'], 'regional']], 'icon-nature-regional',
|
['any', ['==', ['get', 'asset_type'], 'naturetree'], ['==', ['get', 'thematic'], 'nature']],
|
||||||
['all', ['==', ['get', 'asset_type'], 'naturetree'], ['==', ['get', 'is_remarkable'], true]], 'icon-nature-remarkable',
|
['any', ['==', ['get', 'is_remarkable'], true], ['==', ['get', 'is_remarkable'], 'true'], ['==', ['get', 'is_remarkable'], 1]]
|
||||||
['all', ['==', ['get', 'asset_type'], 'naturetree'], ['==', ['get', 'management_type'], 'regional']], 'icon-nature-regional',
|
], 'icon-nature-remarkable',
|
||||||
|
['all',
|
||||||
|
['any', ['==', ['get', 'asset_type'], 'naturetree'], ['==', ['get', 'thematic'], 'nature']],
|
||||||
|
['any', ['==', ['get', 'management_type'], 'regional'], ['==', ['get', 'management_type'], 'Régional']]
|
||||||
|
], 'icon-nature-regional',
|
||||||
['==', ['get', 'asset_type'], 'naturetree'], 'icon-nature',
|
['==', ['get', 'asset_type'], 'naturetree'], 'icon-nature',
|
||||||
['==', ['get', 'asset_type'], 'drain'], 'icon-roaddrain',
|
['==', ['get', 'asset_type'], 'drain'], 'icon-roaddrain',
|
||||||
['==', ['get', 'asset_type'], 'roaddrain'], 'icon-roaddrain',
|
['==', ['get', 'asset_type'], 'roaddrain'], 'icon-roaddrain',
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,10 @@ function loadUnifiedMapIcons(map) {
|
||||||
// ── File-based icons (full colour, non-SDF) ─────────────────────────────
|
// ── File-based icons (full colour, non-SDF) ─────────────────────────────
|
||||||
// UNIFIED_ICON_URLS is set in the inline <script> of unified_index.html
|
// UNIFIED_ICON_URLS is set in the inline <script> of unified_index.html
|
||||||
// using {% static %} so the URL is resolved server-side.
|
// using {% static %} so the URL is resolved server-side.
|
||||||
const iconUrls = (typeof UNIFIED_ICON_URLS !== 'undefined') ? UNIFIED_ICON_URLS : {};
|
const injected = (typeof UNIFIED_ICON_URLS !== 'undefined') ? UNIFIED_ICON_URLS : {};
|
||||||
|
const iconUrls = (typeof AssetSymbology !== 'undefined' && AssetSymbology.getIconUrls)
|
||||||
|
? Object.assign({}, AssetSymbology.getIconUrls(), injected)
|
||||||
|
: injected;
|
||||||
|
|
||||||
// trafficlights: traffic_light_icon.svg (56 px)
|
// trafficlights: traffic_light_icon.svg (56 px)
|
||||||
if (iconUrls.trafficlights && !map.hasImage('icon-trafficlights')) {
|
if (iconUrls.trafficlights && !map.hasImage('icon-trafficlights')) {
|
||||||
|
|
@ -231,6 +234,8 @@ function loadUnifiedMapIcons(map) {
|
||||||
{ name: 'icon-trafficlightsequipment', codepoint: 'f1d5', color: '#331110' },
|
{ name: 'icon-trafficlightsequipment', codepoint: 'f1d5', color: '#331110' },
|
||||||
{ name: 'icon-sign', codepoint: 'f82b', color: '#0022ff' },
|
{ name: 'icon-sign', codepoint: 'f82b', color: '#0022ff' },
|
||||||
{ name: 'icon-nature', codepoint: 'f5e1', color: '#2e7d32' },
|
{ name: 'icon-nature', codepoint: 'f5e1', color: '#2e7d32' },
|
||||||
|
{ name: 'icon-nature-regional', codepoint: 'f5e1', color: '#1d4ed8' },
|
||||||
|
{ name: 'icon-nature-remarkable', codepoint: 'f5e1', color: '#d97706' },
|
||||||
{ name: 'icon-structures', codepoint: 'f876', color: '#6d4c41' },
|
{ name: 'icon-structures', codepoint: 'f876', color: '#6d4c41' },
|
||||||
{ name: 'icon-its', codepoint: 'f1d5', color: '#0288d1' },
|
{ name: 'icon-its', codepoint: 'f1d5', color: '#0288d1' },
|
||||||
{ name: 'icon-clean', codepoint: 'f78a', color: '#5e5e5e' },
|
{ name: 'icon-clean', codepoint: 'f78a', color: '#5e5e5e' },
|
||||||
|
|
|
||||||
|
|
@ -1354,6 +1354,8 @@
|
||||||
publiclighting: "{% static 'assets/public_lamp_post_icon.svg' %}?v=20260521c",
|
publiclighting: "{% static 'assets/public_lamp_post_icon.svg' %}?v=20260521c",
|
||||||
publiclightingelectricalcabinet: "{% static 'assets/electrical-panel.png' %}",
|
publiclightingelectricalcabinet: "{% static 'assets/electrical-panel.png' %}",
|
||||||
nature: "{% static 'assets/nature_tree_icon.svg' %}?v=20260521a",
|
nature: "{% static 'assets/nature_tree_icon.svg' %}?v=20260521a",
|
||||||
|
natureregional: "{% static 'assets/nature_tree_icon_regional.svg' %}?v=20261009a",
|
||||||
|
natureremarkable: "{% static 'assets/nature_tree_icon_remarkable.svg' %}?v=20261009a",
|
||||||
structures: "{% static 'assets/structures_bridge_tunnel_icon.svg' %}?v=20260522b",
|
structures: "{% static 'assets/structures_bridge_tunnel_icon.svg' %}?v=20260522b",
|
||||||
roaddrain: "{% static 'assets/roaddrain_grille_icon.svg' %}?v=20260521a",
|
roaddrain: "{% static 'assets/roaddrain_grille_icon.svg' %}?v=20260521a",
|
||||||
speedbump: "{% static 'assets/road_speedbump_icon.svg' %}?v=20260920",
|
speedbump: "{% static 'assets/road_speedbump_icon.svg' %}?v=20260920",
|
||||||
|
|
@ -1370,7 +1372,7 @@
|
||||||
<script src="{% static 'common/base_script.js' %}"></script>
|
<script src="{% static 'common/base_script.js' %}"></script>
|
||||||
<script src="{% static 'common/base_map.js' %}"></script>
|
<script src="{% static 'common/base_map.js' %}"></script>
|
||||||
<script src="{% static 'assets/sign_panels_shared.js' %}?v=20260703c"></script>
|
<script src="{% static 'assets/sign_panels_shared.js' %}?v=20260703c"></script>
|
||||||
<script src="{% static 'assets/asset_symbology.js' %}?v=20260920_grid_options"></script>
|
<script src="{% static 'assets/asset_symbology.js' %}?v=20261009_tree_icons"></script>
|
||||||
<script src="{% static 'assets/unified_map_layers.js' %}?v=20260920_grid_options"></script>
|
<script src="{% static 'assets/unified_map_layers.js' %}?v=20261009_tree_icons"></script>
|
||||||
<script src="{% static 'assets/unified_index.js' %}?v=20260920_grid_options"></script>
|
<script src="{% static 'assets/unified_index.js' %}?v=20261009_tree_icons"></script>
|
||||||
{% endblock script %}
|
{% endblock script %}
|
||||||
Loading…
Reference in a new issue