Amelioration de la navigation sur la carte

This commit is contained in:
EpicKiwi 2026-06-13 15:37:07 +02:00
parent aa8ea624c7
commit 799dd817ae
Signed by: epickiwi
GPG key ID: C4B28FD2729941CE
5 changed files with 171 additions and 46 deletions

View file

@ -102,8 +102,14 @@ function getBaseSymbolForFeature(feature){
if(feature.properties["batiment"] || feature.properties["piece-batiment"]){
return BUILDING_SYMBOL
}
return DEFAULT_SYMBOL
if(feature.parentFeature && feature.parentFeature.geometry.type != "Point"){
return DEFAULT_AREA_SYMBOL
} else if (feature.geometry.type != "Point") {
return DEFAULT_AREA_SYMBOL
} else {
return DEFAULT_SYMBOL
}
}
// PREDEFINED Symbols
@ -115,6 +121,12 @@ export const DEFAULT_SYMBOL = new MapSymbol()
DEFAULT_SYMBOL.borderColor = "white"
}
export const DEFAULT_AREA_SYMBOL = new MapSymbol()
{
DEFAULT_AREA_SYMBOL.backgroundColor = "white"
DEFAULT_AREA_SYMBOL.borderColor = "white"
}
export const SLEEPING_SYMBOL = new MapSymbol()
{
SLEEPING_SYMBOL.markerUrl = new URL("../icons/dortoir.svg", import.meta.url)