forked from MapComplete/MapComplete
Feature(360): actually show spheres when it is already linked
This commit is contained in:
parent
3e4708b0b9
commit
e81b0d10ea
17 changed files with 124 additions and 30 deletions
|
@ -234,7 +234,7 @@ class MapillaryFetcher implements ImageFetcher {
|
|||
async fetchImages(lat: number, lon: number): Promise<P4CPicture[]> {
|
||||
const boundingBox = new BBox([[lon, lat]]).padAbsolute(0.003)
|
||||
let url =
|
||||
"https://graph.mapillary.com/images?fields=computed_geometry,creator,id,thumb_256_url,thumb_original_url,compass_angle&bbox=" +
|
||||
"https://graph.mapillary.com/images?fields=geometry,computed_geometry,creator,id,thumb_256_url,thumb_original_url,compass_angle&bbox=" +
|
||||
[
|
||||
boundingBox.getWest(),
|
||||
boundingBox.getSouth(),
|
||||
|
@ -263,6 +263,7 @@ class MapillaryFetcher implements ImageFetcher {
|
|||
data: {
|
||||
id: string
|
||||
creator: string
|
||||
geometry: Point
|
||||
computed_geometry: Point
|
||||
is_pano: boolean
|
||||
thumb_256_url: string
|
||||
|
@ -272,7 +273,7 @@ class MapillaryFetcher implements ImageFetcher {
|
|||
}>(url)
|
||||
const pics: P4CPicture[] = []
|
||||
for (const img of response.data) {
|
||||
const c = img.computed_geometry.coordinates
|
||||
const c = img.computed_geometry?.coordinates ?? img.geometry.coordinates
|
||||
if (img.thumb_original_url === undefined) {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue