forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
79b6927b56
commit
42ded4c1b1
328 changed files with 4062 additions and 1284 deletions
|
@ -46,8 +46,7 @@
|
|||
(pics: P4CPicture[]) =>
|
||||
pics
|
||||
.filter(
|
||||
(p: P4CPicture) =>
|
||||
!loadedImages.data.has(p.pictureUrl) // We don't show any image which is already linked
|
||||
(p: P4CPicture) => !loadedImages.data.has(p.pictureUrl) // We don't show any image which is already linked
|
||||
)
|
||||
.slice(0, 25),
|
||||
[loadedImages]
|
||||
|
@ -60,15 +59,15 @@
|
|||
type: "Feature",
|
||||
geometry: {
|
||||
type: "Point",
|
||||
coordinates: [p4c.coordinates.lng, p4c.coordinates.lat]
|
||||
coordinates: [p4c.coordinates.lng, p4c.coordinates.lat],
|
||||
},
|
||||
properties: <PanoramaView>{
|
||||
id: p4c.pictureUrl,
|
||||
url: p4c.pictureUrl,
|
||||
northOffset: p4c.direction,
|
||||
rotation: p4c.direction,
|
||||
spherical: p4c.details.isSpherical ? "yes" : "no"
|
||||
}
|
||||
spherical: p4c.details.isSpherical ? "yes" : "no",
|
||||
},
|
||||
}
|
||||
)
|
||||
)
|
||||
|
@ -80,14 +79,14 @@
|
|||
type: "Feature",
|
||||
geometry: {
|
||||
type: "Point",
|
||||
coordinates: [s.coordinates.lng, s.coordinates.lat]
|
||||
coordinates: [s.coordinates.lng, s.coordinates.lat],
|
||||
},
|
||||
properties: {
|
||||
id: s.pictureUrl,
|
||||
selected: "yes",
|
||||
rotation: s.direction
|
||||
}
|
||||
}
|
||||
rotation: s.direction,
|
||||
},
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
|
@ -112,7 +111,7 @@
|
|||
rotation: state.mapProperties.rotation,
|
||||
pitch: state.mapProperties.pitch,
|
||||
zoom: new UIEventSource<number>(16),
|
||||
location: new UIEventSource({ lon, lat })
|
||||
location: new UIEventSource({ lon, lat }),
|
||||
})
|
||||
|
||||
const geocodedImageLayer = new LayerConfig(<LayerConfigJson>geocoded_image)
|
||||
|
@ -123,7 +122,7 @@
|
|||
onClick: (feature) => {
|
||||
console.log("CLicked:", feature.properties)
|
||||
highlighted.set(feature.properties.id)
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
ShowDataLayer.showMultipleLayers(map, new StaticFeatureSource([feature]), state.theme.layers)
|
||||
|
@ -146,24 +145,29 @@
|
|||
layer: geocodedImageLayer,
|
||||
onClick: (feature) => {
|
||||
highlighted.set(feature.properties.id)
|
||||
}
|
||||
},
|
||||
})
|
||||
let nearbyFeatures: Store<Feature[]> = asFeatures.map(nearbyPoints => {
|
||||
return [{
|
||||
type: "Feature",
|
||||
geometry: { type: "Point", coordinates: GeoOperations.centerpointCoordinates(feature) },
|
||||
properties: {
|
||||
name: layer.title?.GetRenderValue(feature.properties).Subs(feature.properties).txt,
|
||||
focus: true
|
||||
}
|
||||
}, ...nearbyPoints.filter(p => p.properties.spherical === "yes").map(f => ({
|
||||
...f, properties: {
|
||||
name: "Nearby panorama",
|
||||
pitch: "auto",
|
||||
type: "scene",
|
||||
gotoPanorama: f
|
||||
}
|
||||
}))
|
||||
let nearbyFeatures: Store<Feature[]> = asFeatures.map((nearbyPoints) => {
|
||||
return [
|
||||
{
|
||||
type: "Feature",
|
||||
geometry: { type: "Point", coordinates: GeoOperations.centerpointCoordinates(feature) },
|
||||
properties: {
|
||||
name: layer.title?.GetRenderValue(feature.properties).Subs(feature.properties).txt,
|
||||
focus: true,
|
||||
},
|
||||
},
|
||||
...nearbyPoints
|
||||
.filter((p) => p.properties.spherical === "yes")
|
||||
.map((f) => ({
|
||||
...f,
|
||||
properties: {
|
||||
name: "Nearby panorama",
|
||||
pitch: "auto",
|
||||
type: "scene",
|
||||
gotoPanorama: f,
|
||||
},
|
||||
})),
|
||||
]
|
||||
})
|
||||
|
||||
|
@ -204,7 +208,16 @@
|
|||
selected.set(undefined)
|
||||
}}
|
||||
>
|
||||
<LinkableImage {tags} {image} {state} {feature} {layer} {linkable} {highlighted} {nearbyFeatures} />
|
||||
<LinkableImage
|
||||
{tags}
|
||||
{image}
|
||||
{state}
|
||||
{feature}
|
||||
{layer}
|
||||
{linkable}
|
||||
{highlighted}
|
||||
{nearbyFeatures}
|
||||
/>
|
||||
</span>
|
||||
{/each}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue