Amelioration de l'affichage des points
This commit is contained in:
parent
cbab1d6eb3
commit
500a51b1fc
3 changed files with 31 additions and 1 deletions
|
|
@ -136,6 +136,14 @@ body > hr {
|
|||
margin-top: 1ex;
|
||||
}
|
||||
|
||||
#map .highlight-point-icon.point-feature img ~ h3 {
|
||||
opacity: clamp(0, calc( var(--zoom-level) - 20 ), 1) ;
|
||||
}
|
||||
|
||||
#map .highlight-point-icon img {
|
||||
opacity: clamp(0, calc( var(--zoom-level) - 17 ), 1) ;
|
||||
}
|
||||
|
||||
|
||||
#map .highlight-point-icon:not(.active) {
|
||||
opacity: 0;
|
||||
|
|
|
|||
|
|
@ -135,9 +135,15 @@ export async function init_places(places_db){
|
|||
contentEl.append(nameEl)
|
||||
}
|
||||
|
||||
let classlist = ["highlight-point-icon"]
|
||||
|
||||
if((!feature.parentFeature && feature.geometry.type == "Point") || feature.parentFeature?.geometry.type == "Point"){
|
||||
classlist.push("point-feature")
|
||||
}
|
||||
|
||||
return L.marker(latlng, {
|
||||
icon: L.divIcon({
|
||||
className: "highlight-point-icon",
|
||||
className: classlist.join(" "),
|
||||
html: contentEl,
|
||||
iconSize: [0, 0]
|
||||
})
|
||||
|
|
|
|||
|
|
@ -76,6 +76,10 @@ function getBaseSymbolForFeature(feature){
|
|||
return STAGE_SYMBOL
|
||||
}
|
||||
|
||||
if(feature.properties["village"]){
|
||||
return VILLAGE_SYMBOL
|
||||
}
|
||||
|
||||
if(feature.properties["bar"]){
|
||||
return DRINKS_SYMBOL;
|
||||
}
|
||||
|
|
@ -506,4 +510,16 @@ export const DRINKS_SYMBOL = new MapSymbol()
|
|||
"kefir",
|
||||
"maté"
|
||||
]
|
||||
}
|
||||
|
||||
export const VILLAGE_SYMBOL = new MapSymbol()
|
||||
{
|
||||
VILLAGE_SYMBOL.genericName = "Installation permanente"
|
||||
VILLAGE_SYMBOL.markerUrl = new URL("../icons/default-marker.svg", import.meta.url)
|
||||
VILLAGE_SYMBOL.backgroundColor = "white"
|
||||
VILLAGE_SYMBOL.borderColor = "white"
|
||||
VILLAGE_SYMBOL.indexSynonyms = [
|
||||
"village",
|
||||
"installation"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue