Feat: upload to specified panoramax instance
This commit is contained in:
parent
35b4943948
commit
3df0f9ca94
3 changed files with 5 additions and 4 deletions
|
@ -42,7 +42,8 @@
|
|||
},
|
||||
"panoramax": {
|
||||
"url": "https://panoramax.mapcomplete.org",
|
||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnZW92aXNpbyIsInN1YiI6IjU5ZjgzOGI0LTM4ZjAtNDdjYi04OWYyLTM3NDQ3MWMxNTUxOCJ9.0rBioZS_48NTjnkIyN9497c3fQdTqtGgH1HDqlz1bWs"
|
||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnZW92aXNpbyIsInN1YiI6IjU5ZjgzOGI0LTM4ZjAtNDdjYi04OWYyLTM3NDQ3MWMxNTUxOCJ9.0rBioZS_48NTjnkIyN9497c3fQdTqtGgH1HDqlz1bWs",
|
||||
"sequence": "6e702976-580b-419c-8fb3-cf7bd364e6f8"
|
||||
},
|
||||
"default_overpass_urls": [
|
||||
"https://overpass-api.de/api/interpreter",
|
||||
|
|
|
@ -204,10 +204,10 @@ export class PanoramaxUploader implements ImageUploader {
|
|||
console.error("Could not read EXIF-tags")
|
||||
}
|
||||
|
||||
let [lon, lat] = currentGps
|
||||
const [lon, lat] = currentGps
|
||||
|
||||
const p = this._panoramax
|
||||
const defaultSequence = (await p.mySequences())[0]
|
||||
const defaultSequence = (await p.mySequences()).find(s => s.id === Constants.panoramax.sequence)
|
||||
const img = <ImageData>await p.addImage(blob, defaultSequence, {
|
||||
// It might seem odd that we set 'undefined' here - keep in mind that, by default, panoramax will use the EXIF-data
|
||||
// We only pass variables as fallback!
|
||||
|
|
|
@ -50,7 +50,7 @@ export default class Constants {
|
|||
...Constants.no_include,
|
||||
] as const
|
||||
|
||||
public static panoramax: { url: string; token: string } = packagefile.config.panoramax
|
||||
public static panoramax: { url: string; token: string, sequence: string } = packagefile.config.panoramax
|
||||
|
||||
// The user journey states thresholds when a new feature gets unlocked
|
||||
public static userJourney = {
|
||||
|
|
Loading…
Reference in a new issue