forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
e33d448055
commit
d2134668b1
25 changed files with 109 additions and 171 deletions
|
@ -190,7 +190,7 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher {
|
|||
provider: "panoramax",
|
||||
direction: imageData.properties["view:azimuth"],
|
||||
osmTags: {
|
||||
panoramax: imageData.id
|
||||
panoramax: imageData.id,
|
||||
},
|
||||
thumbUrl: imageData.assets.thumb.href,
|
||||
date: new Date(imageData.properties.datetime).getTime(),
|
||||
|
@ -199,22 +199,26 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher {
|
|||
detailsUrl: imageData.id,
|
||||
details: {
|
||||
isSpherical:
|
||||
imageData.properties["exif"]["Xmp.GPano.ProjectionType"] === "equirectangular"
|
||||
}
|
||||
imageData.properties["exif"]["Xmp.GPano.ProjectionType"] === "equirectangular",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
public async fetchImages(lat: number, lon: number): Promise<P4CPicture[]> {
|
||||
const radiusSettings = [{
|
||||
place_fov_tolerance: 180,
|
||||
radius: 15
|
||||
}, {
|
||||
place_fov_tolerance: 180,
|
||||
radius: 25
|
||||
}, {
|
||||
place_fov_tolerance: 90,
|
||||
radius: 50
|
||||
}]
|
||||
const radiusSettings = [
|
||||
{
|
||||
place_fov_tolerance: 180,
|
||||
radius: 15,
|
||||
},
|
||||
{
|
||||
place_fov_tolerance: 180,
|
||||
radius: 25,
|
||||
},
|
||||
{
|
||||
place_fov_tolerance: 90,
|
||||
radius: 50,
|
||||
},
|
||||
]
|
||||
const promises: Promise<ImageData[]>[] = []
|
||||
const maxRadius = this._radius
|
||||
let prevRadius = 0
|
||||
|
@ -223,7 +227,7 @@ class ImagesFromPanoramaxFetcher implements ImageFetcher {
|
|||
place: [lon, lat],
|
||||
place_distance: [prevRadius, Math.min(maxRadius, radiusSetting.radius)],
|
||||
place_fov_tolerance: radiusSetting.place_fov_tolerance,
|
||||
limit: 50
|
||||
limit: 50,
|
||||
})
|
||||
promises.push(promise)
|
||||
prevRadius = radiusSetting.radius
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue