Skip to content

Commit

Permalink
cas particulier des incohérences plan ign bdtopo
Browse files Browse the repository at this point in the history
  • Loading branch information
IGNFhc committed Mar 1, 2024
1 parent f299ed8 commit 11d4995
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/js/map-interactivity/legend-plan-ign.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,16 @@ function Legend(features, zoom) {
if (feat.source == "plan_ign" && feat.layer.id != "bckgrd") {
// Dans le cas où c'est un symbole textuel et pas une icone on n'affichera pas de légende.
if (feat.layer.type == "symbol" && !Object.hasOwnProperty.call(feat.layer.layout, "icon-image")) return;
// les aplats zone bati ne sont jamais représentés dans la bdtopo
if (feat.layer.id == "zone batie") return;

// Exceptions à la règle suivante qui évite les désynchronisations
if (feat.sourceLayer == "toponyme_bati_ponc" && FeaturesBDTOPO[0].sourceLayer == "equipement_de_transport") return feat;
if (feat.sourceLayer == "bati_ponc" && FeaturesBDTOPO[0].sourceLayer == "construction_ponctuelle") return feat;

// pour éviter les désynchronisation Bdtopo PLANIGN on prend feature de plan ign si correspond au type de feature bdtopo sélectionnée.
if (feat.layer.type != FeaturesBDTOPO[0].layer.type) return;

return feat;
}
}
Expand Down

0 comments on commit 11d4995

Please sign in to comment.