Groupe open/panoramax streetview support#11822
Groupe open/panoramax streetview support#11822nrc97 wants to merge 7 commits intogeosolutions-it:masterfrom
Conversation
|
@nrc97 thank you so much for contributing with this. We will review as soon as possible. |
map.forEachFeatureAtPixel in openlayers/Map.jsx adapted for detection of features of type RenderFeature used for MVT layers. By doing that, MVT layers are clickable and the intersected features are return on clic TileProviderLayer for being able to create MVT layer and display it.
341255c to
5eed6a3
Compare
- Create a viewer using pnx-photo-viewer to display pictures. - Add a Panoramax VectorTileLayer using OpenLayers styling to match other providers. - Handle click events: retrieve picture data directly from the layer datas, or call the API if the data is not found.
…h, Italian and German
5eed6a3 to
6e7f4bf
Compare
|
Hi @nrc97 if you are still working on this, I kindly ask you to convert this PR to a Draft PR to avoid reviewing if you haven't completed yest the development. Thank you so much again for the collaboration and the contribution. |
|
Is this a tool dedicated to OpenLayers ? (Mapstore offering several map libraries) |
|
Fwiw, i'm not in a position to judge the code itself, but from basic testing against a locally deployed panoramax instance and a locally running mapstore from this PR, this works fine, eg sequences are loaded as MVT from the api, and clicking on the sequence brings up a window showing the picture. Features are basic (eg no link to the complete sequence, which can be useful, nor filters like on panoramax web viewer), but there's always the link to the original picture in panoramax, so that's fine. if i had a user-level remark to do, when the streetview window has its default scale (eg 'smallish'), the 'back' arrow is a bit hidden by the licence footer for the image. one has to make the window a bit higher to easily interact with the arrow. |
@nrc97 can we finally schedule a review session for this? Thank you for confirming that. |
@tdipisa Yes, I'll send you my availability by email. |
|
In order to contribute to the MapStore project, the CLA (Contributor License agreement) should be sent signed to GeoSolutions. Please consult contributing rules at: https://github.com/geosolutions-it/MapStore2/wiki/Contributing-to-MapStore#contributing-code |
@nrc97 please notice that, thank you. |
Removed unused DEFAULT_SRS constant from panoramax.js to match the eslint configuration
|
In order to contribute to the MapStore project, the CLA (Contributor License agreement) should be sent signed to GeoSolutions. Please consult contributing rules at: https://github.com/geosolutions-it/MapStore2/wiki/Contributing-to-MapStore#contributing-code |
|
@nrc97 please can you sign the CLA as requested to contribute your code? |
There was a problem hiding this comment.
Pull request overview
Adds Panoramax as a new provider for the StreetView plugin, including UI, API integration, and OpenLayers support for Panoramax MVT coverage tiles.
Changes:
- Added Panoramax provider wiring (constants, panels, API module, epics integration) and new UI viewer component.
- Added OpenLayers support for MVT-based
tileproviderlayers and improved feature-picking for MVTRenderFeatures. - Added i18n strings for Panoramax and introduced the
@panoramax/web-viewerdependency.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| web/client/translations/data.it-IT.json | Adds Panoramax “empty selection” message. |
| web/client/translations/data.fr-FR.json | Adds Panoramax “empty selection” message. |
| web/client/translations/data.es-ES.json | Adds Panoramax “empty selection” message. |
| web/client/translations/data.en-US.json | Adds Panoramax “empty selection” message. |
| web/client/translations/data.de-DE.json | Adds Panoramax “empty selection” message. |
| web/client/plugins/StreetView/StreetView.jsx | Documents Panoramax as a supported StreetView provider. |
| web/client/plugins/StreetView/selectors/streetView.js | Adds default Panoramax data-layer config (MVT tileprovider) and styling. |
| web/client/plugins/StreetView/epics/streetView.js | Passes provider settings into provider getLocation calls. |
| web/client/plugins/StreetView/containers/StreetViewContainer.jsx | Registers Panoramax panel in provider-to-panel mapping. |
| web/client/plugins/StreetView/containers/PanoramaxViewPanel.jsx | New Redux-connected panel for Panoramax view. |
| web/client/plugins/StreetView/constants.js | Adds PANORAMAX provider and default API URL constant. |
| web/client/plugins/StreetView/components/PanoramaxView/PanoramaxView.jsx | New Panoramax viewer component integration. |
| web/client/plugins/StreetView/api/panoramax.js | New Panoramax getLocation implementation (feature pick + API fallback). |
| web/client/plugins/StreetView/api/index.js | Exposes Panoramax API module alongside other providers. |
| web/client/components/map/openlayers/plugins/TileProviderLayer.js | Adds MVT support for tileprovider layers (VectorTileLayer/Source) and styling. |
| web/client/components/map/openlayers/Map.jsx | Adds RenderFeature handling so MVT features can be picked/intersected. |
| package.json | Adds @panoramax/web-viewer dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const type = geomLike.getType?.(); | ||
| const coords = geomLike.getFlatCoordinates?.(); | ||
| if (!type || !coords) return null; | ||
|
|
||
| switch (type) { | ||
| case 'Point': return new Point(coords); | ||
| case 'MultiPoint': return new MultiPoint([coords]); | ||
| case 'LineString': return new LineString(coords); | ||
| case 'MultiLineString': return new MultiLineString([coords]); | ||
| case 'Polygon': return new Polygon(coords); | ||
| case 'MultiPolygon': return new MultiPolygon([coords]); | ||
| default: return null; // types not supported | ||
| } |
| if (isMVT) { | ||
| const source = new VectorTileSource({ | ||
| format: new MVT({}), | ||
| url: options.url, |
| const isMVT = options.format === 'application/vnd.mapbox-vector-tile'; | ||
| // specific case of mvt layers | ||
| if (isMVT) { | ||
| const source = new VectorTileSource({ | ||
| format: new MVT({}), | ||
| url: options.url, | ||
| maxZoom: options.maximumLevel ?? 22, | ||
| minZoom: options.minimumLevel ?? 0 | ||
| }); | ||
|
|
||
| const layer = new VectorTileLayer({ | ||
| msId: options.id, | ||
| source, | ||
| visible: options.visibility !== false, | ||
| zIndex: options.zIndex, | ||
| opacity: options.opacity, | ||
| declutter: options.declutter ?? true, | ||
| preload: options.preload ?? 0, | ||
| cacheSize: options.cacheSize ?? 256, | ||
| tilePixelRatio: options.tilePixelRatio ?? 1, | ||
| renderBuffer: options.renderBuffer ?? 100, | ||
| renderMode: options.renderMode ?? 'hybrid' // or vector | ||
| }); |
| * "PanoramaxApiURL": "https://api.panoramax.xyz/api" | ||
| * "minimumLevel": 0, | ||
| * "maximumLevel": 15 | ||
| * } | ||
| * ``` | ||
| * - `providerSettings` (optional). The settings specific for the provider. It is an object with the following properties: | ||
| * - `providerSettings.PanoramaxApiURL` (optional). The URL of the Panoramax API. Default: `https://api.panoramax.xyz/api`. | ||
| * - `providerSettings.srs` (optional). Coordinate reference system code to use for the API. Default: `EPSG:4326`. Note that the SRS used here must be supported by the Panoramax API **and** defined in `localConfig.json` file, in `projectionDefs`. This param is not used yet, panoramax api is implemented to receive coordinates only in SRS EPSG:4326 | ||
| * - `providerSettings.minimumLevel` The minimum zoom level at which the provider can provide tiles. Default value is 0 | ||
| * - `providerSettings.maximumLevel` The maximul zoom level at which the provider can provide tiles Default value is 15 according to the openstreetmap and IGN Panoramax instances | ||
| * Generally speaking, you should prefer general settings in `localConfig.json` over the plugin configuration, in order to reuse the same configuration for default viewer and all the contexts, automatically. This way you will not need to configure the `apiKey` in every context. |
| import '@photo-sphere-viewer/core/index.css'; | ||
| import '@photo-sphere-viewer/markers-plugin/index.css'; | ||
| import '@photo-sphere-viewer/virtual-tour-plugin/index.css'; | ||
| import Message from "../../../locale/Message"; |
Description
This PR introduces support for Panoramax as an additional Street View provider in MapStore2. Users can now visualize street‑level imagery using Panoramax alongside existing providers. The feature includes configuration options, i18n strings, attribution handling, and provider selection at runtime.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
Panoramax is not supportted as streetview provider
What is the new behavior?

We can now use panoramax as provider for the streetview plugin.
Breaking change
Other useful information
Panoramax OpenAPI Documentation: https://docs.panoramax.fr/api/api/openapi/
Panoramax Viewer Documentation: https://docs.panoramax.fr/web-viewer/#basic-usage