@corpsmap/corpsmap 3.1.1 → 3.1.4
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/lib/dev.js +57 -32
- package/lib/prod.js +57 -32
- package/package.json +1 -1
- package/src/application-bundles/config-bundle.js +5 -1
- package/src/application-bundles/create-ol-map-bundle.js +25 -6
- package/src/application-bundles/map-view-bundle.js +312 -308
- package/src/application-containers/map.js +5 -3
- package/src/application-exports/map-provider.js +6 -1
- package/src/config/default-config.js +561 -561
- package/src/core-plugins/identify/listeners/arcgis.js +2 -2
- package/src/core-plugins/identify/listeners/vector.js +2 -1
- package/src/core-plugins/identify-arcgis-rest/bundle.js +1 -1
- package/src/core-plugins/identify-vector/bundle.js +3 -2
- package/src/core-plugins/print-map/bundle.js +5 -2
- package/src/openlayers-utils/format-utilities.js +1 -2
- package/src/openlayers-utils/layer-utilities.js +7 -4
|
@@ -1,308 +1,312 @@
|
|
|
1
|
-
import { transform } from "ol/proj";
|
|
2
|
-
import { createSelector } from "redux-bundler";
|
|
3
|
-
import _ from "lodash";
|
|
4
|
-
|
|
5
|
-
const animateView = (options, view) => {
|
|
6
|
-
view.animate(options);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const zoomToLocation = (center, zoom, view) => {
|
|
10
|
-
animateView(
|
|
11
|
-
{
|
|
12
|
-
center: center,
|
|
13
|
-
zoom: zoom,
|
|
14
|
-
},
|
|
15
|
-
view
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
name: "view",
|
|
21
|
-
|
|
22
|
-
getReducer: () => {
|
|
23
|
-
const initialData = {
|
|
24
|
-
shouldReadUrlParams: false,
|
|
25
|
-
shouldSetDefaults: false,
|
|
26
|
-
center: [-98.579, 39.828],
|
|
27
|
-
zoom: 4,
|
|
28
|
-
rotation: 0,
|
|
29
|
-
position: {},
|
|
30
|
-
heading: 0,
|
|
31
|
-
pitch: 0,
|
|
32
|
-
roll: 0,
|
|
33
|
-
minZoom: 0,
|
|
34
|
-
maxZoom: 22,
|
|
35
|
-
action: null,
|
|
36
|
-
updating: false,
|
|
37
|
-
listening: false,
|
|
38
|
-
shouldUpdateZoom: false,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
case "
|
|
46
|
-
case "
|
|
47
|
-
|
|
48
|
-
case "
|
|
49
|
-
return Object.assign({}, state,
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
dispatch({
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
dispatch({ type:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
dispatch({ type: "
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
dispatch({ type: "
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
dispatch({ type: "
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
},
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
return state.view
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
1
|
+
import { transform } from "ol/proj";
|
|
2
|
+
import { createSelector } from "redux-bundler";
|
|
3
|
+
import _ from "lodash";
|
|
4
|
+
|
|
5
|
+
const animateView = (options, view) => {
|
|
6
|
+
view.animate(options);
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const zoomToLocation = (center, zoom, view) => {
|
|
10
|
+
animateView(
|
|
11
|
+
{
|
|
12
|
+
center: center,
|
|
13
|
+
zoom: zoom,
|
|
14
|
+
},
|
|
15
|
+
view
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: "view",
|
|
21
|
+
|
|
22
|
+
getReducer: () => {
|
|
23
|
+
const initialData = {
|
|
24
|
+
shouldReadUrlParams: false,
|
|
25
|
+
shouldSetDefaults: false,
|
|
26
|
+
center: [-98.579, 39.828],
|
|
27
|
+
zoom: 4,
|
|
28
|
+
rotation: 0,
|
|
29
|
+
position: {},
|
|
30
|
+
heading: 0,
|
|
31
|
+
pitch: 0,
|
|
32
|
+
roll: 0,
|
|
33
|
+
minZoom: 0,
|
|
34
|
+
maxZoom: 22,
|
|
35
|
+
action: null,
|
|
36
|
+
updating: false,
|
|
37
|
+
listening: false,
|
|
38
|
+
shouldUpdateZoom: false,
|
|
39
|
+
// horse: true,
|
|
40
|
+
// limitMapExtent: true,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return (state = initialData, { type, payload }) => {
|
|
44
|
+
switch (type) {
|
|
45
|
+
case "VIEW_SET_DEFAULTS_START":
|
|
46
|
+
case "VIEW_SET_DEFAULTS":
|
|
47
|
+
case "VIEW_SET_PARAMS_START":
|
|
48
|
+
case "VIEW_SET_PARAMS_COMPLETE":
|
|
49
|
+
return Object.assign({}, state, payload);
|
|
50
|
+
case "WINDOW_LOCATION_PARSED":
|
|
51
|
+
return Object.assign({}, state, {
|
|
52
|
+
shouldReadUrlParams: true,
|
|
53
|
+
});
|
|
54
|
+
case "MAP_INITIALIZED":
|
|
55
|
+
return Object.assign({}, state, {
|
|
56
|
+
shouldSetDefaults: true,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (type === "VIEW_START_ACTION") {
|
|
61
|
+
return Object.assign({}, state, {
|
|
62
|
+
updating: true,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (type === "VIEW_END_ACTION") {
|
|
67
|
+
return Object.assign({}, state, {
|
|
68
|
+
updating: false,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (type === "VIEW_EVENTS_REGISTERED") {
|
|
73
|
+
return Object.assign({}, state, {
|
|
74
|
+
listening: true,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (type === "VIEW_CHANGED") {
|
|
79
|
+
return Object.assign({}, state, payload);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return state;
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
doViewSetDefaults: (d) => ({ dispatch, store }) => {
|
|
87
|
+
// grab the config from our launch config, override built-in defaults
|
|
88
|
+
|
|
89
|
+
dispatch({
|
|
90
|
+
type: "VIEW_SET_DEFAULTS_START",
|
|
91
|
+
payload: { shouldSetDefaults: false },
|
|
92
|
+
});
|
|
93
|
+
const config = {
|
|
94
|
+
center:
|
|
95
|
+
d.centerX && d.centerY ? [d.centerX, d.centerY] : [-95.579, 39.828],
|
|
96
|
+
zoom: d.centerZ ? d.centerZ : 4,
|
|
97
|
+
rotation: d.rotation ? d.rotation : 0,
|
|
98
|
+
position: {},
|
|
99
|
+
heading: d.heading3d ? d.heading3d : 0,
|
|
100
|
+
pitch: 0,
|
|
101
|
+
roll: 0,
|
|
102
|
+
minZoom: d.minzoom ? d.minzoom : 0,
|
|
103
|
+
maxZoom: d.maxzoom ? d.maxzoom : 22,
|
|
104
|
+
// limitMapExtent: d.limitMapExtent ? d.limitMapExtent : false,
|
|
105
|
+
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
dispatch({ type: "VIEW_SET_DEFAULTS", payload: config });
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
doViewSetFromParams: () => ({ dispatch, store }) => {
|
|
112
|
+
dispatch({
|
|
113
|
+
type: "VIEW_SET_PARAMS_START",
|
|
114
|
+
payload: { shouldReadUrlParams: false },
|
|
115
|
+
});
|
|
116
|
+
const config = store.selectViewState();
|
|
117
|
+
const params = store.selectWindowLocationParams();
|
|
118
|
+
|
|
119
|
+
// grab config from url parameters and override everything
|
|
120
|
+
if (Number(params.x)) config.center[0] = Number(params.x);
|
|
121
|
+
if (Number(params.y)) config.center[1] = Number(params.y);
|
|
122
|
+
if (Number(params.z)) config.zoom = Number(params.z);
|
|
123
|
+
|
|
124
|
+
store.doSetView(config);
|
|
125
|
+
//dispatch({ type: 'VIEW_SET_PARAMS_COMPLETE', payload: config });
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
doZoomToExtent: (extent, callback) => ({ dispatch, store }) => {
|
|
129
|
+
dispatch({ type: "VIEW_START_ACTION" });
|
|
130
|
+
|
|
131
|
+
const map = store.selectMap();
|
|
132
|
+
const view = store.selectView();
|
|
133
|
+
view.fit(extent, {
|
|
134
|
+
size: map.getSize(),
|
|
135
|
+
duration: 500,
|
|
136
|
+
minResolution: 10,
|
|
137
|
+
callback: () => {
|
|
138
|
+
if (callback && typeof callback === "function") callback();
|
|
139
|
+
dispatch({ type: "VIEW_END_ACTION" });
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
doZoomToLayerExtent: (uid) => ({ dispatch, store }) => {
|
|
145
|
+
// @TODO get the layer from the store and figure out where to zoom to
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
doZoomToLocation: (center, zoom) => ({ dispatch, store }) => {
|
|
149
|
+
dispatch({ type: "VIEW_START_ACTION" });
|
|
150
|
+
const view = store.selectView();
|
|
151
|
+
zoomToLocation(center, zoom, view);
|
|
152
|
+
dispatch({ type: "VIEW_END_ACTION" });
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
doZoomIn: () => ({ dispatch, store }) => {
|
|
156
|
+
dispatch({ type: "VIEW_START_ACTION" });
|
|
157
|
+
const view = store.selectView();
|
|
158
|
+
const currentZoom = view.getZoom();
|
|
159
|
+
animateView(
|
|
160
|
+
{
|
|
161
|
+
zoom: currentZoom + 1,
|
|
162
|
+
},
|
|
163
|
+
view
|
|
164
|
+
);
|
|
165
|
+
dispatch({ type: "VIEW_END_ACTION" });
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
doZoomOut: () => ({ dispatch, store }) => {
|
|
169
|
+
dispatch({ type: "VIEW_START_ACTION" });
|
|
170
|
+
const view = store.selectView(); // pulling view
|
|
171
|
+
const currentZoom = view.getZoom(); // getting current view
|
|
172
|
+
animateView( // subtract 1 from current zoom
|
|
173
|
+
{
|
|
174
|
+
zoom: currentZoom - 1,
|
|
175
|
+
},
|
|
176
|
+
view
|
|
177
|
+
);
|
|
178
|
+
dispatch({ type: "VIEW_END_ACTION" });
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
doSetRotationNorth: () => ({ dispatch, store }) => {
|
|
182
|
+
dispatch({ type: "VIEW_START_ACTION" });
|
|
183
|
+
const view = store.selectView();
|
|
184
|
+
animateView(
|
|
185
|
+
{
|
|
186
|
+
rotation: 0,
|
|
187
|
+
},
|
|
188
|
+
view
|
|
189
|
+
);
|
|
190
|
+
dispatch({ type: "VIEW_END_ACTION" });
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
doUpdateView: (e) => ({ dispatch, store }) => {
|
|
194
|
+
const map = e.map;
|
|
195
|
+
const view = map.getView();
|
|
196
|
+
const zoom = view.getZoom();
|
|
197
|
+
const center = transform(
|
|
198
|
+
view.getCenter(),
|
|
199
|
+
store.selectMapProjection(),
|
|
200
|
+
"EPSG:4326"
|
|
201
|
+
);
|
|
202
|
+
const rotation = view.getRotation() * (180 / Math.PI);
|
|
203
|
+
dispatch({ type: "VIEW_CHANGED", payload: { center, zoom, rotation } });
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
doSetView: (options) => ({ dispatch, store }) => {
|
|
207
|
+
const view = store.selectView();
|
|
208
|
+
if (!view) return null;
|
|
209
|
+
animateView(
|
|
210
|
+
{
|
|
211
|
+
center: transform(
|
|
212
|
+
options.center,
|
|
213
|
+
"EPSG:4326",
|
|
214
|
+
store.selectMapProjection()
|
|
215
|
+
),
|
|
216
|
+
zoom: options.zoom,
|
|
217
|
+
rotation: options.rotation,
|
|
218
|
+
},
|
|
219
|
+
view
|
|
220
|
+
);
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
doListenToMap: () => ({ dispatch, store }) => {
|
|
224
|
+
const map = store.selectMap();
|
|
225
|
+
// now handled in the map bundle, need to dedupe these
|
|
226
|
+
//map.on('moveend', _.throttle(store.doUpdateView, 200));
|
|
227
|
+
dispatch({ type: "VIEW_EVENTS_REGISTERED" });
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
selectViewState: (state) => {
|
|
231
|
+
return state.view;
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
selectViewAction: (state) => {
|
|
235
|
+
return state.view.action;
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
selectViewCenter: createSelector(
|
|
239
|
+
"selectAppTime",
|
|
240
|
+
"selectMap",
|
|
241
|
+
"selectViewState",
|
|
242
|
+
(_, map, viewState) => {
|
|
243
|
+
if (!map) return viewState.center;
|
|
244
|
+
const view = map.getView();
|
|
245
|
+
if (!view) return viewState.center;
|
|
246
|
+
return view.getCenter();
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
|
|
250
|
+
selectMapSize: createSelector(
|
|
251
|
+
"selectMap",
|
|
252
|
+
"selectAppTime",
|
|
253
|
+
(map, appTime) => {
|
|
254
|
+
if (!map) return null;
|
|
255
|
+
return map.getSize();
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
|
|
259
|
+
selectMapImageDisplay: createSelector("selectMapSize", (size) => {
|
|
260
|
+
if (!size) return null;
|
|
261
|
+
return [size[0], size[1], 92];
|
|
262
|
+
}),
|
|
263
|
+
|
|
264
|
+
selectMapExtent: createSelector(
|
|
265
|
+
"selectAppTime",
|
|
266
|
+
"selectView",
|
|
267
|
+
"selectMapSize",
|
|
268
|
+
"selectMapProjection",
|
|
269
|
+
(_, view, size, mapProjection) => {
|
|
270
|
+
if (!view) return null;
|
|
271
|
+
const mapExtentWm = view.calculateExtent(size);
|
|
272
|
+
const ll = transform(
|
|
273
|
+
[mapExtentWm[0], mapExtentWm[1]],
|
|
274
|
+
mapProjection,
|
|
275
|
+
"EPSG:4326"
|
|
276
|
+
);
|
|
277
|
+
const ur = transform(
|
|
278
|
+
[mapExtentWm[2], mapExtentWm[3]],
|
|
279
|
+
mapProjection,
|
|
280
|
+
"EPSG:4326"
|
|
281
|
+
);
|
|
282
|
+
return [ll[0], ll[1], ur[0], ur[1]];
|
|
283
|
+
}
|
|
284
|
+
),
|
|
285
|
+
|
|
286
|
+
selectResolution: createSelector(
|
|
287
|
+
"selectView",
|
|
288
|
+
"selectAppTime",
|
|
289
|
+
(view, appTime) => {
|
|
290
|
+
if (!view) return null;
|
|
291
|
+
return view.getResolution();
|
|
292
|
+
}
|
|
293
|
+
),
|
|
294
|
+
|
|
295
|
+
reactAddListeners: (state) => {
|
|
296
|
+
if (!state.view.listening && state.map.map2d)
|
|
297
|
+
return { actionCreator: "doListenToMap" };
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
reactViewShouldReadUrlParams: (state) => {
|
|
301
|
+
if (state.view.shouldReadUrlParams)
|
|
302
|
+
return { actionCreator: "doViewSetFromParams" };
|
|
303
|
+
},
|
|
304
|
+
|
|
305
|
+
reactViewShouldSetDefaults: (state) => {
|
|
306
|
+
if (state.view.shouldSetDefaults)
|
|
307
|
+
return {
|
|
308
|
+
actionCreator: "doViewSetDefaults",
|
|
309
|
+
args: [state.config.default.map],
|
|
310
|
+
};
|
|
311
|
+
},
|
|
312
|
+
};
|
|
@@ -4,16 +4,17 @@ import { connect } from 'redux-bundler-react';
|
|
|
4
4
|
class Map extends React.Component {
|
|
5
5
|
|
|
6
6
|
componentDidMount(){
|
|
7
|
-
const { doMapInitialize, viewState } = this.props;
|
|
7
|
+
const { doMapInitialize, viewState, limitMapExtent } = this.props;
|
|
8
8
|
const { center, zoom, rotation, minZoom, maxZoom } = viewState;
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
doMapInitialize(this.mapEl, {
|
|
11
11
|
center: center,
|
|
12
12
|
zoom: zoom,
|
|
13
13
|
rotation: rotation,
|
|
14
14
|
minZoom: minZoom,
|
|
15
15
|
maxZoom: maxZoom,
|
|
16
|
-
layers:[]
|
|
16
|
+
layers:[],
|
|
17
|
+
limitMapExtent: limitMapExtent
|
|
17
18
|
});
|
|
18
19
|
// doAddMapDragDropListeners(this.mapEl);
|
|
19
20
|
}
|
|
@@ -35,6 +36,7 @@ class Map extends React.Component {
|
|
|
35
36
|
|
|
36
37
|
export default connect(
|
|
37
38
|
'doMapInitialize',
|
|
39
|
+
'selectLimitMapExtent',
|
|
38
40
|
'selectViewState',
|
|
39
41
|
'selectCursorClass',
|
|
40
42
|
'selectComponentsLeftSidebarCount',
|