@panoramax/web-viewer 4.4.0-develop-71ab6940 → 4.4.0-develop-2df9bb94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "4.4.0-develop-71ab6940",
3
+ "version": "4.4.0-develop-2df9bb94",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
@@ -199,6 +199,11 @@ export default class MapStyleComposer extends EventTarget {
199
199
  // IGN FR Maxzoom
200
200
  if(sources.plan_ign) { sources.plan_ign.maxzoom = 18;}
201
201
 
202
+ // OpenMapTiles styles
203
+ if(sources.openmaptiles && !sources.openmaptiles.attribution.includes("OpenMapTiles")) {
204
+ sources.openmaptiles.attribution += " | © <a href='https://openmaptiles.org/'>OpenMapTiles</a>";
205
+ }
206
+
202
207
  return {
203
208
  version: 8,
204
209
  name: "Panoramax Map Style",
@@ -111,12 +111,14 @@ export default class SemanticsMapProtocol {
111
111
  }
112
112
 
113
113
  // Remove useless stuff
114
- geojson.features = geojson.features.map(f => ({
115
- type: f.type,
116
- geometry: f.geometry,
117
- id: f.id,
118
- properties: this._semanticsToBasicProps(f)
119
- }));
114
+ geojson.features = geojson.features
115
+ .filter(f => f.properties?.semantics?.length > 0 || f.properties?.annotations?.length > 0)
116
+ .map(f => ({
117
+ type: f.type,
118
+ geometry: f.geometry,
119
+ id: f.id,
120
+ properties: this._semanticsToBasicProps(f)
121
+ }));
120
122
  }
121
123
 
122
124
  // Transform GeoJSON into MVT