Simple panoramax SDK to upload pictures;
  • TypeScript 100%
Find a file
2026-04-28 23:08:52 +02:00
src Fix: fix type in returned type 2026-04-24 13:36:22 +02:00
test Fix: fix issue #1 2026-04-28 23:01:19 +02:00
.gitignore First working version 2024-09-26 17:22:48 +02:00
.nvmrc Feature: allow to change properties of a sequence, such as visibility 2026-04-22 18:38:35 +02:00
LICENSE Initial commit 2024-09-26 12:57:10 +00:00
package-lock.json Fix: fix issue #1 2026-04-28 23:01:19 +02:00
package.json Officialize the move 2026-04-28 23:08:52 +02:00
README.md Fix: fix issue #1 2026-04-28 23:01:19 +02:00
tsconfig.json Fix: fix issue #1 2026-04-28 23:01:19 +02:00

panoramax-js

Simple panoramax SDK to upload pictures and use some common API-endpoints in a typed way.

This library is developed for (and used by) https://MapComplete.org and the corresponding mastodon bot. As such, it implements the methods what those projects need and not much more.

Do you want to use it in your project and is something missing? Feel free to add functionality and do a pull request.

There is a minimal testing suite; run npm run test to see if that didn't break

Usage

const p = new Panoramax("https://panoramax.openstreetmap.fr")
const defaultSequence = (await p.mySequences())[0]
const img = <ImageData>await p.addImage(blob, defaultSequence, {

            // lat, lon and datetime should be in the EXIF-data. If they are not (or they are incorrect), one can set them manually or override them
            // You can use e.g. ExifReader to check this
            lat: !hasGPS ? lat : undefined,
            lon: !hasGPS ? lon : undefined,
            datetime: !hasDate ? new Date().toISOString() : undefined,
            
            exifOverride: { // optional, if you want to add an extra author to the file
                Artist: author,
            },

        })