@woosmap/ui 3.1.0 → 3.2.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 +1 -1
- package/src/components/Map/drawOnMap.js +46 -40
package/package.json
CHANGED
|
@@ -84,46 +84,52 @@ export const woosmapBoundsFromViewport = function woosmapBoundsFromViewport(view
|
|
|
84
84
|
);
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
export const createWoosmapMap = (node) =>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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
|
+
};
|
|
127
133
|
export class WoosmapMapBoundingBox {
|
|
128
134
|
constructor(bounds, padding) {
|
|
129
135
|
this.overlayView = new window.woosmap.map.OverlayView();
|