Various small fixes

This commit is contained in:
Pieter Vander Vennet 2021-11-09 18:41:20 +01:00
parent 261cde3e28
commit 1af5e44ad4
6 changed files with 176 additions and 20 deletions

View file

@ -55,7 +55,7 @@ export default class ScrollableFullScreen extends UIElement {
if (!isShown.data) {
return;
}
if (hash === undefined || hash === "") {
if (hash === undefined || hash === "" || hash !== hashToShow) {
isShown.setData(false)
}
})

View file

@ -24,7 +24,7 @@ export default class LocationInput extends InputElement<Loc> implements MinimapO
osmTags: {and: []}
},
mapRendering: [{
location: ["point"],
location: ["point","centroid"],
icon: "./assets/svg/crosshair-empty.svg"
}]
}, "matchpoint icon", true

View file

@ -152,7 +152,7 @@ export default class ShowDataLayer {
continue
}
try {
if ((feat.geometry.type === "LineString" || feat.geometry.type === "MultiLineString")) {
if (feat.geometry.type === "LineString") {
const self = this;
const coords = L.GeoJSON.coordsToLatLngs(feat.geometry.coordinates)
const tagsSource = this.allElements?.addOrGetElement(feat) ?? new UIEventSource<any>(feat.properties);
@ -270,7 +270,7 @@ export default class ShowDataLayer {
let infobox: FeatureInfoBox = undefined;
const id = `popup-${feature.properties.id}-${feature.geometry.type}-${this.showDataLayerid}-${this._cleanCount}-${feature.pointRenderingIndex ?? feature.lineRenderingIndex}`
const id = `popup-${feature.properties.id}-${feature.geometry.type}-${this.showDataLayerid}-${this._cleanCount}-${feature.pointRenderingIndex ?? feature.lineRenderingIndex}-${feature.multiLineStringIndex ?? ""}`
popup.setContent(`<div style='height: 65vh' id='${id}'>Popup for ${feature.properties.id} ${feature.geometry.type} ${id} is loading</div>`)
leafletLayer.on("popupopen", () => {
if (infobox === undefined) {