Metadata-Version: 2.4
Name: g3w-admin-panoramax
Version: 0.0.1
Summary: G3W-ADMIN plugin that enables Panoramax controls on all maps.
Author-email: Gis3w snc <info@gis3w.it>
License: Mozilla Public License 2.0 (MPL 2.0)
Project-URL: Homepage, https://github.com/g3w-suite/g3w-admin-panoramax
Project-URL: Bug Tracker, https://github.com/g3w-suite/g3w-admin-panoramax/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# G3W-ADMIN-PANORAMAX

[![PyPI version](https://img.shields.io/pypi/v/g3w-admin-panoramax)](https://pypi.org/project/g3w-admin-panoramax/)

Proof of concept G3W-SUITE plugin that adds a **Panoramax** map control to your published maps: click on the map (or use the map context menu) to view the nearest [Panoramax](https://panoramax.fr/) street-level 360° image, if any is available at that location.

<img width="1266" height="913" alt="image" src="https://github.com/user-attachments/assets/62e12070-f9af-4ade-8bfe-ca340d46ad0e" />

## How it works

- The Django app (`panoramax/`) has no models, migrations or API routes: on startup it just registers a signal receiver ([`receivers.py`](panoramax/receivers.py)) that adds a `panoramax` entry (plugin version + project id) to the client init config for every project.
- G3W-CLIENT reads that config and loads the client-side plugin ([`static/panoramax/js/plugin.js`](panoramax/static/panoramax/js/plugin.js)), which registers a map control that:
  1. queries the public Panoramax API (`https://api.panoramax.xyz/api`) for the closest image to the picked coordinate;
  2. shows a vector tile layer with the available image coverage while the control is active;
  3. opens the result in a 360° viewer ([`@photo-sphere-viewer/core`](https://photo-sphere-viewer.js.org/), loaded on demand from a CDN).

No server-side settings or credentials are required: all requests to Panoramax are made directly from the browser.

## Installation

Install the module into [`g3w-admin`](https://github.com/g3w-suite/g3w-admin/tree/v.3.5.x/g3w-admin) applications folder:

```sh
# Install module from github (v1.0.0)
pip3 install git+https://github.com/g3w-suite/g3w-admin-panoramax.git@v1.0.0

# Install module from github (master branch)
# pip3 install git+https://github.com/g3w-suite/g3w-admin-panoramax.git@master

# Install module from local folder (git development)
# pip3 install /g3w-admin/g3w-admin/panoramax
```

Enable `'panoramax'` module adding it to `G3WADMIN_LOCAL_MORE_APPS` list:

```py
# local_settings.py

G3WADMIN_LOCAL_MORE_APPS = [
    ...
    'panoramax'
    ...
]
```

Refer to [g3w-suite-docker](https://github.com/g3w-suite/g3w-suite-docker) repository for more info about running this on a docker instance.

## Configuration

No server-side settings are required. Once installed and enabled, the control is automatically shown on every project's map.

## Development and tests

Version numbers are derived from git tags via `setuptools_scm`.
The BDD scenarios are in [`panoramax/tests/features`](panoramax/tests/features)
and run in the G3W-ADMIN/QGIS environment used by CI. Install test dependencies:

```sh
python3 -m pip install -r requirements_test.txt
```

From the configured G3W-ADMIN directory, run:

```sh
python3 manage.py behave --simple panoramax/tests
```

---

**Compatibile with:**
[![g3w-admin version](https://img.shields.io/badge/g3w--admin-3.11-1EB300.svg?style=flat)](https://github.com/g3w-suite/g3w-admin/tree/v.3.11.x)
[![g3w-suite-docker version](https://img.shields.io/badge/g3w--suite--docker-3.11-1EB300.svg?style=flat)](https://github.com/g3w-suite/g3w-suite-docker/tree/v3.11.x)

---

**License:** MPL-2
