feat(assets): add dedicated icon for green surfaces distinct from trees
This commit is contained in:
parent
3037241762
commit
34e4da64a8
5 changed files with 88 additions and 9 deletions
|
|
@ -300,11 +300,11 @@
|
|||
naturegreensurface: {
|
||||
thematic: 'nature',
|
||||
color: '#2e7d32',
|
||||
iconUrl: '/static/assets/nature_tree_icon.svg?v=20260521a',
|
||||
iconSize: 56,
|
||||
iconClass: 'bi-tree-fill',
|
||||
glyphCodepoint: 'f5e1',
|
||||
mapImage: 'icon-nature',
|
||||
iconUrl: '/static/assets/nature_greensurface_icon.svg?v=20261010a',
|
||||
iconSize: 52,
|
||||
iconClass: 'bi-grid-fill',
|
||||
glyphCodepoint: 'f3fb',
|
||||
mapImage: 'icon-naturegreensurface',
|
||||
},
|
||||
natureshrub: {
|
||||
thematic: 'nature',
|
||||
|
|
@ -708,6 +708,7 @@
|
|||
natureregional: injected.natureregional || (ASSET_TYPE_OVERRIDES.naturetree_regional && ASSET_TYPE_OVERRIDES.naturetree_regional.iconUrl),
|
||||
natureremarkable: injected.natureremarkable || (ASSET_TYPE_OVERRIDES.naturetree_remarkable && ASSET_TYPE_OVERRIDES.naturetree_remarkable.iconUrl),
|
||||
naturedead: injected.naturedead || (ASSET_TYPE_OVERRIDES.naturetree_dead && ASSET_TYPE_OVERRIDES.naturetree_dead.iconUrl),
|
||||
naturegreensurface: injected.naturegreensurface || (ASSET_TYPE_OVERRIDES.naturegreensurface && ASSET_TYPE_OVERRIDES.naturegreensurface.iconUrl),
|
||||
structures: injected.structures || THEMATIC_CONFIG.structures.iconUrl,
|
||||
roaddrain: injected.roaddrain || ASSET_TYPE_OVERRIDES.roaddrain.iconUrl,
|
||||
roadconcreteblockset: injected.roadconcreteblockset || ASSET_TYPE_OVERRIDES.roadconcreteblockset.iconUrl,
|
||||
|
|
@ -733,6 +734,7 @@
|
|||
{ name: 'icon-trafficlightradarpole', codepoint: 'f4e0', color: '#e53935' },
|
||||
{ name: 'icon-sign', codepoint: 'f82b', color: '#0022ff' },
|
||||
{ name: 'icon-nature', codepoint: 'f5e1', color: '#2e7d32' },
|
||||
{ name: 'icon-naturegreensurface', codepoint: 'f3fb', color: '#2e7d32' },
|
||||
{ name: 'icon-naturebench', codepoint: 'f5e1', color: '#2e7d32' },
|
||||
{ name: 'icon-natureplanter', codepoint: 'f3ce', color: '#d97706' },
|
||||
{ name: 'icon-naturerwiasset', codepoint: 'f30b', color: '#0277bd' },
|
||||
|
|
@ -848,6 +850,7 @@
|
|||
['any', ['==', ['get', 'management_type'], 'regional'], ['==', ['get', 'management_type'], 'Régional']]
|
||||
], 'icon-nature-regional',
|
||||
['==', ['get', 'asset_type'], 'naturetree'], 'icon-nature',
|
||||
['==', ['get', 'asset_type'], 'naturegreensurface'], 'icon-naturegreensurface',
|
||||
['==', ['get', 'asset_type'], 'drain'], 'icon-roaddrain',
|
||||
['==', ['get', 'asset_type'], 'roaddrain'], 'icon-roaddrain',
|
||||
['==', ['get', 'category'], 'Ralentisseur'], 'icon-speedbump',
|
||||
|
|
|
|||
69
loko/assets/static/assets/nature_greensurface_icon.svg
Normal file
69
loko/assets/static/assets/nature_greensurface_icon.svg
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" aria-hidden="true">
|
||||
<defs>
|
||||
<!-- Background grass blades gradient (deep rich green) -->
|
||||
<linearGradient id="grass-dark" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#2e7d32"/>
|
||||
<stop offset="100%" stop-color="#1b5e20"/>
|
||||
</linearGradient>
|
||||
|
||||
<!-- Mid grass blades gradient (fresh vibrant green) -->
|
||||
<linearGradient id="grass-mid" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#66bb6a"/>
|
||||
<stop offset="100%" stop-color="#2e7d32"/>
|
||||
</linearGradient>
|
||||
|
||||
<!-- Side arching grass blades gradient -->
|
||||
<linearGradient id="grass-light" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#81c784"/>
|
||||
<stop offset="100%" stop-color="#388e3c"/>
|
||||
</linearGradient>
|
||||
|
||||
<!-- Ground turf base gradient -->
|
||||
<linearGradient id="turf-base" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#43a047"/>
|
||||
<stop offset="100%" stop-color="#1b5e20"/>
|
||||
</linearGradient>
|
||||
|
||||
<!-- Front turf lip gradient -->
|
||||
<linearGradient id="turf-front" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#4caf50"/>
|
||||
<stop offset="100%" stop-color="#2e7d32"/>
|
||||
</linearGradient>
|
||||
|
||||
<!-- Soil ground base gradient -->
|
||||
<linearGradient id="soil-base" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#6d4c41"/>
|
||||
<stop offset="100%" stop-color="#4e342e"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<!-- Ground / Soil base slab -->
|
||||
<rect x="9" y="52" width="46" height="6" rx="3" fill="url(#soil-base)"/>
|
||||
|
||||
<!-- Back turf mound -->
|
||||
<ellipse cx="32" cy="49" rx="25" ry="7" fill="url(#turf-base)"/>
|
||||
|
||||
<!-- Background grass blades -->
|
||||
<!-- Mid-left tall blade -->
|
||||
<path d="M 21 48 C 17 32, 16 19, 20 11 C 24 15, 27 29, 28 48 Z" fill="url(#grass-dark)"/>
|
||||
<!-- Mid-right tall blade -->
|
||||
<path d="M 36 48 C 37 29, 40 15, 44 11 C 48 19, 47 32, 43 48 Z" fill="url(#grass-dark)"/>
|
||||
|
||||
<!-- Main foreground grass blades -->
|
||||
<!-- Left arching blade -->
|
||||
<path d="M 14 49 C 10 38, 7 28, 8 19 C 14 21, 21 34, 25 49 Z" fill="url(#grass-light)"/>
|
||||
<!-- Right arching blade -->
|
||||
<path d="M 39 49 C 43 34, 50 21, 56 19 C 57 28, 54 38, 50 49 Z" fill="url(#grass-light)"/>
|
||||
<!-- Center tall proud blade -->
|
||||
<path d="M 26 49 C 27 30, 28 16, 32 6 C 36 16, 37 30, 38 49 Z" fill="url(#grass-mid)"/>
|
||||
|
||||
<!-- Center blade subtle highlight -->
|
||||
<path d="M 31 48 C 31.5 32, 31.8 18, 32 9 C 32.2 18, 32.8 32, 32.5 48 Z" fill="#a5d6a7" opacity="0.6"/>
|
||||
|
||||
<!-- Foreground turf rim -->
|
||||
<ellipse cx="32" cy="51" rx="23" ry="5" fill="url(#turf-front)"/>
|
||||
|
||||
<!-- Small front sprouting blades -->
|
||||
<path d="M 21 51 C 20 44, 18 36, 17 30 C 20 34, 23 42, 24 51 Z" fill="url(#grass-light)"/>
|
||||
<path d="M 40 51 C 41 42, 44 34, 47 30 C 46 36, 44 44, 43 51 Z" fill="url(#grass-light)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
|
@ -158,6 +158,12 @@ function loadUnifiedMapIcons(map) {
|
|||
.then(data => { if (!map.hasImage('icon-nature-dead')) map.addImage('icon-nature-dead', data); })
|
||||
.catch(e => console.warn('unified_map_layers: could not load nature dead icon', e));
|
||||
}
|
||||
// naturegreensurface: dedicated green surface / lawn SVG (52 px)
|
||||
if (iconUrls.naturegreensurface && !map.hasImage('icon-naturegreensurface')) {
|
||||
loadNormalisedIcon(iconUrls.naturegreensurface, 52)
|
||||
.then(data => { if (!map.hasImage('icon-naturegreensurface')) map.addImage('icon-naturegreensurface', data); })
|
||||
.catch(e => console.warn('unified_map_layers: could not load naturegreensurface icon', e));
|
||||
}
|
||||
|
||||
// structures: dedicated bridge/tunnel SVG (52 px)
|
||||
if (iconUrls.structures && !map.hasImage('icon-structures')) {
|
||||
|
|
|
|||
|
|
@ -1357,6 +1357,7 @@
|
|||
natureregional: "{% static 'assets/nature_tree_icon_regional.svg' %}?v=20261009_round",
|
||||
natureremarkable: "{% static 'assets/nature_tree_icon_remarkable.svg' %}?v=20261009_round",
|
||||
naturedead: "{% static 'assets/nature_tree_icon_dead.svg' %}?v=20261009_round",
|
||||
naturegreensurface: "{% static 'assets/nature_greensurface_icon.svg' %}?v=20261010a",
|
||||
structures: "{% static 'assets/structures_bridge_tunnel_icon.svg' %}?v=20260522b",
|
||||
roaddrain: "{% static 'assets/roaddrain_grille_icon.svg' %}?v=20260521a",
|
||||
speedbump: "{% static 'assets/road_speedbump_icon.svg' %}?v=20260920",
|
||||
|
|
@ -1373,7 +1374,7 @@
|
|||
<script src="{% static 'common/base_script.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/asset_symbology.js' %}?v=20261009_round_trees_v2"></script>
|
||||
<script src="{% static 'assets/unified_map_layers.js' %}?v=20261009_round_trees_v2"></script>
|
||||
<script src="{% static 'assets/unified_index.js' %}?v=20261009_round_trees_v2"></script>
|
||||
<script src="{% static 'assets/asset_symbology.js' %}?v=20261010_greensurface"></script>
|
||||
<script src="{% static 'assets/unified_map_layers.js' %}?v=20261010_greensurface"></script>
|
||||
<script src="{% static 'assets/unified_index.js' %}?v=20261010_greensurface"></script>
|
||||
{% endblock script %}
|
||||
|
|
@ -1134,7 +1134,7 @@
|
|||
{% endblock content %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
<script src="{% static 'assets/asset_symbology.js' %}?v=20261009_round_trees_v2"></script>
|
||||
<script src="{% static 'assets/asset_symbology.js' %}?v=20261010_greensurface"></script>
|
||||
<script>
|
||||
(function() {
|
||||
'use strict';
|
||||
|
|
|
|||
Loading…
Reference in a new issue