UNPKG

@panoramax/web-viewer

Version:

Panoramax web viewer for geolocated pictures

56 lines (52 loc) 1.3 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title>Panoramax Photo Viewer</title> <style> #viewer { position: relative; width: 95%; margin: 2.5%; height: 400px; } #viewer.fullpage { position: fixed; top: 0; bottom: 0; left: 0; right: 0; height: unset; width: unset; margin: 0; } </style> </head> <body> <noscript> You need to enable JavaScript to run this app. </noscript> <pnx-photo-viewer id="viewer" class="fullpage" sequence="ecfe4b2c-0acd-4d3a-a10d-c3e6818755c8" picture="329af5c6-4761-4a6d-9c1e-674fd6daa8b6" ></pnx-photo-viewer> <script> var servers = { meta: "https://api.panoramax.xyz/api", ign: "https://panoramax.ign.fr/api", osm: "https://panoramax.openstreetmap.fr/api", local: "http://localhost:5000/api", dev: "https://panoramax.codeureusesenliberte.fr/api", }; var urlParams = new URLSearchParams(window.location.search); var server = servers[urlParams.get("server") || "meta"]; window.onload = () => { var viewer = document.getElementById("viewer"); viewer.setAttribute("endpoint", server); }; </script> </body> </html>