@woosmap/ui 3.2.0 → 3.3.0

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": "@woosmap/ui",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -84,52 +84,46 @@ export const woosmapBoundsFromViewport = function woosmapBoundsFromViewport(view
84
84
  );
85
85
  };
86
86
 
87
- export const createWoosmapMap = (node) => {
88
- try {
89
- return new window.woosmap.map.Map(node, {
90
- styles: [
91
- {
92
- featureType: 'administrative',
93
- elementType: 'all',
94
- stylers: [{ visibility: 'on' }, { saturation: -100 }, { lightness: 20 }],
95
- },
96
- {
97
- featureType: 'road',
98
- elementType: 'all',
99
- stylers: [{ visibility: 'on' }, { saturation: -100 }, { lightness: 40 }],
100
- },
101
- {
102
- featureType: 'water',
103
- elementType: 'all',
104
- stylers: [{ visibility: 'on' }, { saturation: -10 }, { lightness: 30 }],
105
- },
106
- {
107
- featureType: 'landscape.man_made',
108
- elementType: 'all',
109
- stylers: [{ visibility: 'simplified' }, { saturation: -60 }, { lightness: 10 }],
110
- },
111
- {
112
- featureType: 'landscape.natural',
113
- elementType: 'all',
114
- stylers: [{ visibility: 'simplified' }, { saturation: -60 }, { lightness: 60 }],
115
- },
116
- {
117
- featureType: 'poi',
118
- elementType: 'all',
119
- stylers: [{ visibility: 'off' }, { saturation: -100 }, { lightness: 60 }],
120
- },
121
- {
122
- featureType: 'transit',
123
- elementType: 'all',
124
- stylers: [{ visibility: 'off' }, { saturation: -100 }, { lightness: 60 }],
125
- },
126
- ],
127
- });
128
- } catch (e) {
129
- console.error(e);
130
- return null;
131
- }
132
- };
87
+ export const createWoosmapMap = (node) =>
88
+ new window.woosmap.map.Map(node, {
89
+ styles: [
90
+ {
91
+ featureType: 'administrative',
92
+ elementType: 'all',
93
+ stylers: [{ visibility: 'on' }, { saturation: -100 }, { lightness: 20 }],
94
+ },
95
+ {
96
+ featureType: 'road',
97
+ elementType: 'all',
98
+ stylers: [{ visibility: 'on' }, { saturation: -100 }, { lightness: 40 }],
99
+ },
100
+ {
101
+ featureType: 'water',
102
+ elementType: 'all',
103
+ stylers: [{ visibility: 'on' }, { saturation: -10 }, { lightness: 30 }],
104
+ },
105
+ {
106
+ featureType: 'landscape.man_made',
107
+ elementType: 'all',
108
+ stylers: [{ visibility: 'simplified' }, { saturation: -60 }, { lightness: 10 }],
109
+ },
110
+ {
111
+ featureType: 'landscape.natural',
112
+ elementType: 'all',
113
+ stylers: [{ visibility: 'simplified' }, { saturation: -60 }, { lightness: 60 }],
114
+ },
115
+ {
116
+ featureType: 'poi',
117
+ elementType: 'all',
118
+ stylers: [{ visibility: 'off' }, { saturation: -100 }, { lightness: 60 }],
119
+ },
120
+ {
121
+ featureType: 'transit',
122
+ elementType: 'all',
123
+ stylers: [{ visibility: 'off' }, { saturation: -100 }, { lightness: 60 }],
124
+ },
125
+ ],
126
+ });
133
127
  export class WoosmapMapBoundingBox {
134
128
  constructor(bounds, padding) {
135
129
  this.overlayView = new window.woosmap.map.OverlayView();