diff --git a/loko/inspections/templates/inspections/components/asset_fields/_naturerwiz.html b/loko/inspections/templates/inspections/components/asset_fields/_naturerwiz.html index 87e057b..047411c 100644 --- a/loko/inspections/templates/inspections/components/asset_fields/_naturerwiz.html +++ b/loko/inspections/templates/inspections/components/asset_fields/_naturerwiz.html @@ -592,10 +592,11 @@ hasCoords = true; } - // Marqueurs ronds pour les assets ayant des coordonnées valides + // Marqueurs ronds uniquement pour les géométries ponctuelles ou sans géométrie surfacique/linéaire (évite d'afficher le centroïde des polygones) + const isPolyOrLine = geom && ['polygon', 'multipolygon', 'linestring', 'multilinestring'].includes(geom.type.toLowerCase()); const lon = asset.lon; const lat = asset.lat; - if (lon !== null && lat !== null && !isNaN(lon) && !isNaN(lat)) { + if (!isPolyOrLine && lon !== null && lat !== null && !isNaN(lon) && !isNaN(lat)) { if (!geom) { bounds.extend([lon, lat]); hasCoords = true;