@yesilyazilim/web.spa.gis 1.0.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/index.css +568 -0
- package/index.css.map +1 -0
- package/index.d.ts +289 -0
- package/index.d.ts.map +1 -0
- package/index.js +4704 -0
- package/index.js.map +1 -0
- package/package.json +19 -0
package/index.js
ADDED
|
@@ -0,0 +1,4704 @@
|
|
|
1
|
+
require("./index.css");
|
|
2
|
+
var $8zHUo$yesilyazilimwebspa = require("@yesilyazilim/web.spa");
|
|
3
|
+
var $8zHUo$olsourceVector = require("ol/source/Vector");
|
|
4
|
+
var $8zHUo$ollayerVector = require("ol/layer/Vector");
|
|
5
|
+
var $8zHUo$olinteraction = require("ol/interaction");
|
|
6
|
+
var $8zHUo$oleventscondition = require("ol/events/condition");
|
|
7
|
+
var $8zHUo$ollayerTile = require("ol/layer/Tile");
|
|
8
|
+
var $8zHUo$olsource = require("ol/source");
|
|
9
|
+
var $8zHUo$olsourceImageTile = require("ol/source/ImageTile");
|
|
10
|
+
var $8zHUo$ollayerImage = require("ol/layer/Image");
|
|
11
|
+
var $8zHUo$tabulatortables = require("tabulator-tables");
|
|
12
|
+
var $8zHUo$olformatGeoJSON = require("ol/format/GeoJSON");
|
|
13
|
+
var $8zHUo$olgeom = require("ol/geom");
|
|
14
|
+
var $8zHUo$olproj = require("ol/proj");
|
|
15
|
+
var $8zHUo$terraformerarcgis = require("@terraformer/arcgis");
|
|
16
|
+
var $8zHUo$proj4 = require("proj4");
|
|
17
|
+
var $8zHUo$olstyle = require("ol/style");
|
|
18
|
+
var $8zHUo$olstyleCircle = require("ol/style/Circle");
|
|
19
|
+
var $8zHUo$olObservable = require("ol/Observable");
|
|
20
|
+
var $8zHUo$olrender = require("ol/render");
|
|
21
|
+
var $8zHUo$oleasing = require("ol/easing");
|
|
22
|
+
var $8zHUo$ol = require("ol");
|
|
23
|
+
var $8zHUo$olcolor = require("ol/color");
|
|
24
|
+
var $8zHUo$olextent = require("ol/extent");
|
|
25
|
+
var $8zHUo$olgeomPolygon = require("ol/geom/Polygon");
|
|
26
|
+
var $8zHUo$olgeomPoint = require("ol/geom/Point");
|
|
27
|
+
var $8zHUo$olgeomLineString = require("ol/geom/LineString");
|
|
28
|
+
var $8zHUo$coordinateparser = require("coordinate-parser");
|
|
29
|
+
var $8zHUo$olsphere = require("ol/sphere");
|
|
30
|
+
var $8zHUo$ollayer = require("ol/layer");
|
|
31
|
+
require("ol/ol.css");
|
|
32
|
+
var $8zHUo$olMap = require("ol/Map");
|
|
33
|
+
var $8zHUo$olView = require("ol/View");
|
|
34
|
+
var $8zHUo$olcontrol = require("ol/control");
|
|
35
|
+
var $8zHUo$olcontrolMousePosition = require("ol/control/MousePosition");
|
|
36
|
+
var $8zHUo$olcontrolScaleLine = require("ol/control/ScaleLine");
|
|
37
|
+
var $8zHUo$olprojUnits = require("ol/proj/Units");
|
|
38
|
+
var $8zHUo$olsourceOSM = require("ol/source/OSM");
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
function $parcel$exportWildcard(dest, source) {
|
|
42
|
+
Object.keys(source).forEach(function(key) {
|
|
43
|
+
if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
Object.defineProperty(dest, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function get() {
|
|
50
|
+
return source[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
return dest;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function $parcel$export(e, n, v, s) {
|
|
59
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function $parcel$interopDefault(a) {
|
|
63
|
+
return a && a.__esModule ? a.default : a;
|
|
64
|
+
}
|
|
65
|
+
var $e17bdfcbfec5a561$exports = {};
|
|
66
|
+
var $26125c547f0400d9$exports = {};
|
|
67
|
+
|
|
68
|
+
$parcel$export($26125c547f0400d9$exports, "BaseMapCommand", () => $26125c547f0400d9$export$86650e01b5cf02e4);
|
|
69
|
+
var $91d76f4d8e753f27$export$9be22d867fa41d68;
|
|
70
|
+
(function(BaseMapTypes) {
|
|
71
|
+
BaseMapTypes["GoogleRoad"] = "GoogleRoad";
|
|
72
|
+
BaseMapTypes["GoogleSatellite"] = "GoogleSatellite";
|
|
73
|
+
BaseMapTypes["Osm"] = "Osm";
|
|
74
|
+
BaseMapTypes["Solid"] = "Solid";
|
|
75
|
+
})($91d76f4d8e753f27$export$9be22d867fa41d68 || ($91d76f4d8e753f27$export$9be22d867fa41d68 = {}));
|
|
76
|
+
var $91d76f4d8e753f27$export$3b3923acac36255a;
|
|
77
|
+
(function(GisEvents) {
|
|
78
|
+
GisEvents["BasemapChange"] = "BasemapChange";
|
|
79
|
+
GisEvents["MapReady"] = "MapReady";
|
|
80
|
+
GisEvents["MapGotoExtentRequest"] = "MapGotoExtentRequest";
|
|
81
|
+
GisEvents["MapFlashGeomRequest"] = "MapFlashGeomRequest";
|
|
82
|
+
GisEvents["MapIdentifyRequest"] = "MapIdentifyRequest";
|
|
83
|
+
GisEvents["MapSelectionChanged"] = "MapSelectionChanged";
|
|
84
|
+
GisEvents["MapInteractionContextChanged"] = "MapInteractionContextChanged";
|
|
85
|
+
GisEvents["MapSelectionContextChanged"] = "MapSelectionContextChanged";
|
|
86
|
+
GisEvents["DisableAnimations"] = "DisableAnimations";
|
|
87
|
+
GisEvents["RemoveLayer"] = "RemoveLayer";
|
|
88
|
+
GisEvents["MapTimeChanged"] = "MapTimeChanged";
|
|
89
|
+
})($91d76f4d8e753f27$export$3b3923acac36255a || ($91d76f4d8e753f27$export$3b3923acac36255a = {}));
|
|
90
|
+
var $91d76f4d8e753f27$export$3c6428acb8ce7fb9;
|
|
91
|
+
(function(LayerDefinitionTypes) {
|
|
92
|
+
LayerDefinitionTypes["EsriMapService"] = "EsriMapService";
|
|
93
|
+
LayerDefinitionTypes["WMS"] = "WMS";
|
|
94
|
+
LayerDefinitionTypes["TileXyz"] = "TileXyz";
|
|
95
|
+
LayerDefinitionTypes["Custom"] = "Custom";
|
|
96
|
+
})($91d76f4d8e753f27$export$3c6428acb8ce7fb9 || ($91d76f4d8e753f27$export$3c6428acb8ce7fb9 = {}));
|
|
97
|
+
var $91d76f4d8e753f27$export$b29ff6cb22936cb7;
|
|
98
|
+
(function(GisCommandContainers) {
|
|
99
|
+
GisCommandContainers["ribbon"] = "ribbon";
|
|
100
|
+
GisCommandContainers["mapCtx"] = "map-ctx";
|
|
101
|
+
})($91d76f4d8e753f27$export$b29ff6cb22936cb7 || ($91d76f4d8e753f27$export$b29ff6cb22936cb7 = {}));
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
var $26125c547f0400d9$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
106
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
107
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
108
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
109
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
110
|
+
};
|
|
111
|
+
var $26125c547f0400d9$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
112
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
113
|
+
};
|
|
114
|
+
var $26125c547f0400d9$var$_a;
|
|
115
|
+
const $26125c547f0400d9$var$basemaps = [
|
|
116
|
+
{
|
|
117
|
+
key: (0, $91d76f4d8e753f27$export$9be22d867fa41d68).GoogleSatellite,
|
|
118
|
+
title: 'Google Uydu'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: (0, $91d76f4d8e753f27$export$9be22d867fa41d68).GoogleRoad,
|
|
122
|
+
title: 'Google Yol'
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
key: (0, $91d76f4d8e753f27$export$9be22d867fa41d68).Solid,
|
|
126
|
+
title: 'Gri'
|
|
127
|
+
}
|
|
128
|
+
];
|
|
129
|
+
let $26125c547f0400d9$export$86650e01b5cf02e4 = class BaseMapCommand {
|
|
130
|
+
constructor(){
|
|
131
|
+
this.enabled = true;
|
|
132
|
+
}
|
|
133
|
+
start(childKey) {
|
|
134
|
+
this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).BasemapChange, childKey);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
$26125c547f0400d9$var$__decorate([
|
|
138
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
139
|
+
$26125c547f0400d9$var$__metadata("design:type", typeof ($26125c547f0400d9$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $26125c547f0400d9$var$_a : Object)
|
|
140
|
+
], $26125c547f0400d9$export$86650e01b5cf02e4.prototype, "eventService", void 0);
|
|
141
|
+
$26125c547f0400d9$export$86650e01b5cf02e4 = $26125c547f0400d9$var$__decorate([
|
|
142
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)({
|
|
143
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Select,
|
|
144
|
+
key: 'basemaps',
|
|
145
|
+
group: 'mg-general-map',
|
|
146
|
+
title: "Altl\u0131k Harita",
|
|
147
|
+
order: 2,
|
|
148
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).ribbon,
|
|
149
|
+
selectItems: $26125c547f0400d9$var$basemaps
|
|
150
|
+
}),
|
|
151
|
+
$26125c547f0400d9$var$__metadata("design:paramtypes", [])
|
|
152
|
+
], $26125c547f0400d9$export$86650e01b5cf02e4);
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
var $60509b0aa95160f5$exports = {};
|
|
156
|
+
|
|
157
|
+
$parcel$export($60509b0aa95160f5$exports, "DefaultTool", () => $60509b0aa95160f5$export$115c55962a382acf);
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
var $a28fe88e0f106608$exports = {};
|
|
162
|
+
|
|
163
|
+
$parcel$export($a28fe88e0f106608$exports, "LayerManager", () => $a28fe88e0f106608$export$eff87c52915dd7fe);
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
var $3ecb066746a16c54$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
172
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
173
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
174
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
175
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
176
|
+
};
|
|
177
|
+
var $3ecb066746a16c54$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
178
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
179
|
+
};
|
|
180
|
+
var $3ecb066746a16c54$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
181
|
+
function adopt(value) {
|
|
182
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
183
|
+
resolve(value);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
187
|
+
function fulfilled(value) {
|
|
188
|
+
try {
|
|
189
|
+
step(generator.next(value));
|
|
190
|
+
} catch (e) {
|
|
191
|
+
reject(e);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
function rejected(value) {
|
|
195
|
+
try {
|
|
196
|
+
step(generator["throw"](value));
|
|
197
|
+
} catch (e) {
|
|
198
|
+
reject(e);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function step(result) {
|
|
202
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
203
|
+
}
|
|
204
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
var $3ecb066746a16c54$var$_a;
|
|
208
|
+
class $3ecb066746a16c54$export$23eba0cb71a4e506 {
|
|
209
|
+
get id() {
|
|
210
|
+
return this._definition.key;
|
|
211
|
+
}
|
|
212
|
+
get title() {
|
|
213
|
+
return this._definition.title;
|
|
214
|
+
}
|
|
215
|
+
get checked() {
|
|
216
|
+
var _a;
|
|
217
|
+
return (_a = this.layerObj) === null || _a === void 0 ? void 0 : _a.getVisible();
|
|
218
|
+
}
|
|
219
|
+
get order() {
|
|
220
|
+
var _a;
|
|
221
|
+
return (_a = this._layer) === null || _a === void 0 ? void 0 : _a.getZIndex();
|
|
222
|
+
}
|
|
223
|
+
get actions() {
|
|
224
|
+
return this._actions;
|
|
225
|
+
}
|
|
226
|
+
get layerObj() {
|
|
227
|
+
return this._layer;
|
|
228
|
+
}
|
|
229
|
+
get definition() {
|
|
230
|
+
return this._definition;
|
|
231
|
+
}
|
|
232
|
+
get displayClass() {
|
|
233
|
+
return this._displayClass;
|
|
234
|
+
}
|
|
235
|
+
get passive() {
|
|
236
|
+
return this._passive;
|
|
237
|
+
}
|
|
238
|
+
get hasMapLayer() {
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
set checked(value) {
|
|
242
|
+
var _a;
|
|
243
|
+
(_a = this.layerObj) === null || _a === void 0 || _a.setVisible(value);
|
|
244
|
+
}
|
|
245
|
+
set order(value) {
|
|
246
|
+
var _a;
|
|
247
|
+
(_a = this._layer) === null || _a === void 0 || _a.setZIndex(value);
|
|
248
|
+
}
|
|
249
|
+
set actions(value) {
|
|
250
|
+
this._actions = value;
|
|
251
|
+
}
|
|
252
|
+
constructor(_definition){
|
|
253
|
+
this._definition = _definition;
|
|
254
|
+
this._passive = false;
|
|
255
|
+
this._displayClass = null;
|
|
256
|
+
this._disposeController = null;
|
|
257
|
+
this._canIdentify = false;
|
|
258
|
+
this._layer = null;
|
|
259
|
+
this._currentTime = 0;
|
|
260
|
+
this.propsChanged = new (0, $8zHUo$yesilyazilimwebspa.Eventer)();
|
|
261
|
+
this.actionPropChanged = new (0, $8zHUo$yesilyazilimwebspa.Eventer)();
|
|
262
|
+
this._actions = [];
|
|
263
|
+
this.factoryType = _definition.type;
|
|
264
|
+
if (_definition.historyEnabled) this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapTimeChanged, (time)=>{
|
|
265
|
+
if (time != this._currentTime) {
|
|
266
|
+
this._currentTime = time;
|
|
267
|
+
this.onTimeChanged();
|
|
268
|
+
}
|
|
269
|
+
}, this.disposeSignal);
|
|
270
|
+
}
|
|
271
|
+
onViewExtentChanged(loc) {
|
|
272
|
+
this._lastViewLocation = loc;
|
|
273
|
+
const minZoom = this._definition.minZoom || 0;
|
|
274
|
+
const maxZoom = this._definition.maxZoom || 30;
|
|
275
|
+
this.passive = !(loc.zoom > minZoom && loc.zoom < maxZoom);
|
|
276
|
+
}
|
|
277
|
+
onAction(id) {
|
|
278
|
+
if (id == 'delete') this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).RemoveLayer, this._definition.key);
|
|
279
|
+
}
|
|
280
|
+
prepareAsync() {
|
|
281
|
+
return $3ecb066746a16c54$var$__awaiter(this, void 0, void 0, function*() {
|
|
282
|
+
if (this._definition.canRemove) this._actions.push(this._createRemoveAction());
|
|
283
|
+
this._actions.push(this._createOpacitySliderAction());
|
|
284
|
+
return Promise.resolve(true);
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
onAdd() {}
|
|
288
|
+
onRemove() {
|
|
289
|
+
if (this._disposeController) {
|
|
290
|
+
this._disposeController.abort();
|
|
291
|
+
this._disposeController = null;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
setError(message) {
|
|
295
|
+
this.hasError = true;
|
|
296
|
+
this.displayClass = 'danger';
|
|
297
|
+
const errBtn = {
|
|
298
|
+
key: 'error',
|
|
299
|
+
iconClass: 'bi bi-exclamation-circle-fill danger',
|
|
300
|
+
tootip: message
|
|
301
|
+
};
|
|
302
|
+
this._actions = [
|
|
303
|
+
errBtn
|
|
304
|
+
];
|
|
305
|
+
}
|
|
306
|
+
set displayClass(value) {
|
|
307
|
+
if (value != this._displayClass) {
|
|
308
|
+
this._displayClass = value;
|
|
309
|
+
this.propsChanged.raise({
|
|
310
|
+
key: 'displayClass',
|
|
311
|
+
value: value
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
set passive(value) {
|
|
316
|
+
if (value != this._passive) {
|
|
317
|
+
this._passive = value;
|
|
318
|
+
this.propsChanged.raise({
|
|
319
|
+
key: 'passive',
|
|
320
|
+
value: value
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
get disposeSignal() {
|
|
325
|
+
if (this._disposeController) return this._disposeController.signal;
|
|
326
|
+
this._disposeController = new AbortController();
|
|
327
|
+
return this._disposeController.signal;
|
|
328
|
+
}
|
|
329
|
+
onTimeChanged() {}
|
|
330
|
+
_createOpacitySliderAction() {
|
|
331
|
+
let value = "100";
|
|
332
|
+
if (this._layer) value = (this._layer.getOpacity() * 100).toString();
|
|
333
|
+
const opacityInput = (0, $8zHUo$yesilyazilimwebspa.ELF).build({
|
|
334
|
+
tag: "input",
|
|
335
|
+
attrs: {
|
|
336
|
+
type: "range",
|
|
337
|
+
min: "20",
|
|
338
|
+
max: "100",
|
|
339
|
+
value: value,
|
|
340
|
+
step: "20",
|
|
341
|
+
title: "Opakl\u0131k"
|
|
342
|
+
},
|
|
343
|
+
styles: {
|
|
344
|
+
width: "70px"
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
opacityInput.addEventListener("input", (ev)=>{
|
|
348
|
+
const inp = ev.target;
|
|
349
|
+
const num = parseFloat(inp.value) / 100;
|
|
350
|
+
this.layerObj.setOpacity(num);
|
|
351
|
+
});
|
|
352
|
+
return opacityInput;
|
|
353
|
+
}
|
|
354
|
+
_createRemoveAction() {
|
|
355
|
+
return {
|
|
356
|
+
key: 'delete',
|
|
357
|
+
iconClass: (0, $8zHUo$yesilyazilimwebspa.IconClass).delete,
|
|
358
|
+
tootip: 'Sil'
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
$3ecb066746a16c54$var$__decorate([
|
|
363
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
364
|
+
$3ecb066746a16c54$var$__metadata("design:type", typeof ($3ecb066746a16c54$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $3ecb066746a16c54$var$_a : Object)
|
|
365
|
+
], $3ecb066746a16c54$export$23eba0cb71a4e506.prototype, "eventService", void 0);
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
class $48c61080170b98fd$export$f8da0235b43d1302 extends (0, $3ecb066746a16c54$export$23eba0cb71a4e506) {
|
|
369
|
+
constructor(ld, _legendInfos, layer){
|
|
370
|
+
super(ld);
|
|
371
|
+
this._legendInfos = _legendInfos;
|
|
372
|
+
this._layer = layer;
|
|
373
|
+
layer.setProperties({
|
|
374
|
+
mapLayer: this,
|
|
375
|
+
name: this._definition.key,
|
|
376
|
+
canEdit: false,
|
|
377
|
+
canFlash: false,
|
|
378
|
+
canSelect: false
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
getLegendInfos() {
|
|
382
|
+
return this._legendInfos;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
var $3533cc4f9274a60f$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
389
|
+
function adopt(value) {
|
|
390
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
391
|
+
resolve(value);
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
395
|
+
function fulfilled(value) {
|
|
396
|
+
try {
|
|
397
|
+
step(generator.next(value));
|
|
398
|
+
} catch (e) {
|
|
399
|
+
reject(e);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
function rejected(value) {
|
|
403
|
+
try {
|
|
404
|
+
step(generator["throw"](value));
|
|
405
|
+
} catch (e) {
|
|
406
|
+
reject(e);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
function step(result) {
|
|
410
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
411
|
+
}
|
|
412
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
413
|
+
});
|
|
414
|
+
};
|
|
415
|
+
class $3533cc4f9274a60f$export$bc85ccec14607209 {
|
|
416
|
+
constructor(){
|
|
417
|
+
this.type = (0, $91d76f4d8e753f27$export$3c6428acb8ce7fb9).TileXyz;
|
|
418
|
+
}
|
|
419
|
+
createAsync(ld) {
|
|
420
|
+
return $3533cc4f9274a60f$var$__awaiter(this, void 0, void 0, function*() {
|
|
421
|
+
const opres = {
|
|
422
|
+
success: false
|
|
423
|
+
};
|
|
424
|
+
try {
|
|
425
|
+
opres.data = this._createFromLayerDef(ld);
|
|
426
|
+
opres.success = true;
|
|
427
|
+
} catch (err) {
|
|
428
|
+
opres.message = err;
|
|
429
|
+
}
|
|
430
|
+
return opres;
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
_createFromLayerDef(ld) {
|
|
434
|
+
const layerObj = new (0, ($parcel$interopDefault($8zHUo$ollayerTile)))({
|
|
435
|
+
visible: ld.visible,
|
|
436
|
+
opacity: 0.6,
|
|
437
|
+
source: new (0, $8zHUo$olsource.XYZ)({
|
|
438
|
+
tilePixelRatio: 1,
|
|
439
|
+
url: ld.props.urlScheme,
|
|
440
|
+
crossOrigin: 'anonymous',
|
|
441
|
+
maxZoom: ld.maxZoom || 22,
|
|
442
|
+
minZoom: ld.minZoom || 0
|
|
443
|
+
})
|
|
444
|
+
});
|
|
445
|
+
if (ld.order) layerObj.setZIndex(ld.order);
|
|
446
|
+
const lt = ld.props.legendTiles || [
|
|
447
|
+
0,
|
|
448
|
+
0,
|
|
449
|
+
0
|
|
450
|
+
];
|
|
451
|
+
let legUrl = ld.props.urlScheme.replace('{x}', lt[0].toString()).replace('{y}', lt[1].toString()).replace('{z}', lt[2].toString());
|
|
452
|
+
const img = document.createElement('img');
|
|
453
|
+
img.src = legUrl;
|
|
454
|
+
img.crossOrigin = 'anonymous';
|
|
455
|
+
const leg = {
|
|
456
|
+
layerId: ld.key,
|
|
457
|
+
title: ld.title,
|
|
458
|
+
rows: [
|
|
459
|
+
{
|
|
460
|
+
elm: img
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
};
|
|
464
|
+
return new (0, $48c61080170b98fd$export$f8da0235b43d1302)(ld, [
|
|
465
|
+
leg
|
|
466
|
+
], layerObj);
|
|
467
|
+
}
|
|
468
|
+
_createFromSolidColor(color, title) {
|
|
469
|
+
const ld = {
|
|
470
|
+
key: 'basemap',
|
|
471
|
+
order: 0,
|
|
472
|
+
title: title,
|
|
473
|
+
type: (0, $91d76f4d8e753f27$export$3c6428acb8ce7fb9).TileXyz,
|
|
474
|
+
visible: true,
|
|
475
|
+
props: null
|
|
476
|
+
};
|
|
477
|
+
const canvas = this._createCanvas(color, 256);
|
|
478
|
+
const layerObj = new (0, ($parcel$interopDefault($8zHUo$ollayerTile)))({
|
|
479
|
+
visible: ld.visible,
|
|
480
|
+
opacity: 0.6,
|
|
481
|
+
source: new (0, ($parcel$interopDefault($8zHUo$olsourceImageTile)))({
|
|
482
|
+
loader: function() {
|
|
483
|
+
return canvas;
|
|
484
|
+
}
|
|
485
|
+
})
|
|
486
|
+
});
|
|
487
|
+
layerObj.setZIndex(0);
|
|
488
|
+
const leg = {
|
|
489
|
+
layerId: ld.key,
|
|
490
|
+
title: ld.title,
|
|
491
|
+
rows: [
|
|
492
|
+
{
|
|
493
|
+
elm: this._createCanvas(color, 32)
|
|
494
|
+
}
|
|
495
|
+
]
|
|
496
|
+
};
|
|
497
|
+
return new (0, $48c61080170b98fd$export$f8da0235b43d1302)(ld, [
|
|
498
|
+
leg
|
|
499
|
+
], layerObj);
|
|
500
|
+
}
|
|
501
|
+
createBaseMapAsync(type) {
|
|
502
|
+
return $3533cc4f9274a60f$var$__awaiter(this, void 0, void 0, function*() {
|
|
503
|
+
let layer = null;
|
|
504
|
+
switch(type){
|
|
505
|
+
case (0, $91d76f4d8e753f27$export$9be22d867fa41d68).GoogleRoad:
|
|
506
|
+
layer = this._createFromLayerDef({
|
|
507
|
+
key: 'basemap',
|
|
508
|
+
order: 0,
|
|
509
|
+
title: 'Google Yol',
|
|
510
|
+
visible: true,
|
|
511
|
+
type: (0, $91d76f4d8e753f27$export$3c6428acb8ce7fb9).TileXyz,
|
|
512
|
+
maxZoom: 22,
|
|
513
|
+
minZoom: 0,
|
|
514
|
+
props: {
|
|
515
|
+
urlScheme: 'https://mt1.google.com/vt/lyrs=m@113&hl=en&&x={x}&y={y}&z={z}',
|
|
516
|
+
legendTiles: [
|
|
517
|
+
0,
|
|
518
|
+
0,
|
|
519
|
+
0
|
|
520
|
+
],
|
|
521
|
+
useProxy: false,
|
|
522
|
+
reverseY: false
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
break;
|
|
526
|
+
case (0, $91d76f4d8e753f27$export$9be22d867fa41d68).GoogleSatellite:
|
|
527
|
+
layer = this._createFromLayerDef({
|
|
528
|
+
key: 'basemap',
|
|
529
|
+
order: 0,
|
|
530
|
+
title: 'Google Uydu',
|
|
531
|
+
visible: true,
|
|
532
|
+
type: (0, $91d76f4d8e753f27$export$3c6428acb8ce7fb9).TileXyz,
|
|
533
|
+
maxZoom: 22,
|
|
534
|
+
minZoom: 0,
|
|
535
|
+
props: {
|
|
536
|
+
urlScheme: 'https://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga',
|
|
537
|
+
legendTiles: [
|
|
538
|
+
0,
|
|
539
|
+
0,
|
|
540
|
+
0
|
|
541
|
+
],
|
|
542
|
+
useProxy: false,
|
|
543
|
+
reverseY: false
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
break;
|
|
547
|
+
case (0, $91d76f4d8e753f27$export$9be22d867fa41d68).Solid:
|
|
548
|
+
layer = this._createFromSolidColor('rgb(106, 114, 130)', 'Gri');
|
|
549
|
+
break;
|
|
550
|
+
default:
|
|
551
|
+
throw Error("Invalid basemap type : " + type);
|
|
552
|
+
}
|
|
553
|
+
layer.layerObj.setZIndex(0);
|
|
554
|
+
yield layer.prepareAsync();
|
|
555
|
+
return layer;
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
_createCanvas(color, size) {
|
|
559
|
+
const canvas = document.createElement('canvas');
|
|
560
|
+
canvas.width = size;
|
|
561
|
+
canvas.height = size;
|
|
562
|
+
const ctx = canvas.getContext("2d");
|
|
563
|
+
ctx.fillStyle = color;
|
|
564
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
565
|
+
return canvas;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
function $b5c096cfa4bc04e9$export$e1d07ed94bc2b278(cell, formatterParams, onRendered) {
|
|
583
|
+
const val = cell.getValue();
|
|
584
|
+
if (!val) return '';
|
|
585
|
+
return new Date(val).toStr(true);
|
|
586
|
+
}
|
|
587
|
+
function $b5c096cfa4bc04e9$var$getDateTimeFilterEditor(cell, onRendered, success, cancel, editorParams) {
|
|
588
|
+
const ep = editorParams || {
|
|
589
|
+
type: 'date'
|
|
590
|
+
};
|
|
591
|
+
const editor = (0, $8zHUo$yesilyazilimwebspa.ELF).input(ep.type);
|
|
592
|
+
editor.addEventListener("change", function() {
|
|
593
|
+
success(editor.valueAsDate);
|
|
594
|
+
});
|
|
595
|
+
return (0, $8zHUo$yesilyazilimwebspa.ELF).div('tabulator-filter-date-container', editor);
|
|
596
|
+
}
|
|
597
|
+
function $b5c096cfa4bc04e9$var$fncDateTimeFilter(headerValue, rowValue, rowData, filterParams) {
|
|
598
|
+
if (!headerValue) return true;
|
|
599
|
+
if (!rowValue) return false;
|
|
600
|
+
var rowDt = new Date(rowValue);
|
|
601
|
+
return headerValue.toDateString() == rowDt.toDateString();
|
|
602
|
+
}
|
|
603
|
+
function $b5c096cfa4bc04e9$export$59113f23fb667b84(cell, formatterParams, onRendered) {
|
|
604
|
+
const data = cell.getValue();
|
|
605
|
+
if (data) return data.replace('T', ' ');
|
|
606
|
+
return '';
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
var $c4e1470a9bd07521$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
611
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
612
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
613
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
614
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
615
|
+
};
|
|
616
|
+
var $c4e1470a9bd07521$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
617
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
618
|
+
};
|
|
619
|
+
var $c4e1470a9bd07521$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
620
|
+
function adopt(value) {
|
|
621
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
622
|
+
resolve(value);
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
626
|
+
function fulfilled(value) {
|
|
627
|
+
try {
|
|
628
|
+
step(generator.next(value));
|
|
629
|
+
} catch (e) {
|
|
630
|
+
reject(e);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
function rejected(value) {
|
|
634
|
+
try {
|
|
635
|
+
step(generator["throw"](value));
|
|
636
|
+
} catch (e) {
|
|
637
|
+
reject(e);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
function step(result) {
|
|
641
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
642
|
+
}
|
|
643
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
644
|
+
});
|
|
645
|
+
};
|
|
646
|
+
var $c4e1470a9bd07521$var$_a;
|
|
647
|
+
let $c4e1470a9bd07521$export$1ebdff489d5addb7 = class AgsAttributeTable extends (0, $8zHUo$yesilyazilimwebspa.BasePanelElement) {
|
|
648
|
+
constructor(props){
|
|
649
|
+
super();
|
|
650
|
+
this._layerId = props.layerId;
|
|
651
|
+
this._channel = props.channel;
|
|
652
|
+
this.setBusy(true);
|
|
653
|
+
this._buildAsync().then(()=>{
|
|
654
|
+
this.setBusy(false);
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
onPanelResize(start) {
|
|
658
|
+
console.log('AgsAttributeTable onPanelResize', start);
|
|
659
|
+
this._table.element.showhide(!start);
|
|
660
|
+
(0, $8zHUo$yesilyazilimwebspa.ELF).showHideMessageDisplayAt(this, start, 'info', 'Yeniden boyutlama bekleniyor...');
|
|
661
|
+
}
|
|
662
|
+
_buildAsync() {
|
|
663
|
+
return $c4e1470a9bd07521$var$__awaiter(this, void 0, void 0, function*() {
|
|
664
|
+
const ok = yield this._getInitData();
|
|
665
|
+
if (!ok) return;
|
|
666
|
+
const opt = {
|
|
667
|
+
height: "100%",
|
|
668
|
+
layout: "fitDataFill",
|
|
669
|
+
rowHeight: 20,
|
|
670
|
+
filterMode: 'remote',
|
|
671
|
+
sortMode: 'remote',
|
|
672
|
+
ajaxRequestFunc: this._requestFuncAsync.bind(this),
|
|
673
|
+
ajaxURL: 'ignore',
|
|
674
|
+
columns: this._getColumns()
|
|
675
|
+
};
|
|
676
|
+
this._pagingEnabled = true;
|
|
677
|
+
opt.pagination = true;
|
|
678
|
+
opt.paginationCounter = "rows";
|
|
679
|
+
opt.paginationSize = 25;
|
|
680
|
+
opt.paginationSizeSelector = [
|
|
681
|
+
10,
|
|
682
|
+
25,
|
|
683
|
+
50,
|
|
684
|
+
100
|
|
685
|
+
];
|
|
686
|
+
opt.paginationMode = 'remote';
|
|
687
|
+
const div = (0, $8zHUo$yesilyazilimwebspa.ELF).div('ags-attr-table-element');
|
|
688
|
+
this.appendChild(div);
|
|
689
|
+
this._table = new (0, $8zHUo$tabulatortables.TabulatorFull)(div, opt);
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
_getInitData() {
|
|
693
|
+
return $c4e1470a9bd07521$var$__awaiter(this, void 0, void 0, function*() {
|
|
694
|
+
const ttr = yield this._channel.queryRecordCount(this._layerId);
|
|
695
|
+
if (!ttr.success) {
|
|
696
|
+
this.appendChild((0, $8zHUo$yesilyazilimwebspa.ELF).div('errorMessageContainer', (0, $8zHUo$yesilyazilimwebspa.ELF).span('Hata : ' + ttr.message)));
|
|
697
|
+
return false;
|
|
698
|
+
}
|
|
699
|
+
this._totalRowCount = ttr.data;
|
|
700
|
+
this._tableInfo = yield this._channel.getTableInfoAsync(this._layerId);
|
|
701
|
+
if (!this._tableInfo) {
|
|
702
|
+
this.appendChild((0, $8zHUo$yesilyazilimwebspa.ELF).div('errorMessageContainer', (0, $8zHUo$yesilyazilimwebspa.ELF).span("Hata : Tablo bilgisi al\u0131namad\u0131 !")));
|
|
703
|
+
return false;
|
|
704
|
+
}
|
|
705
|
+
return true;
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
_getColumns(optFieldDefs, overrideCols) {
|
|
709
|
+
const fieldDefs = this._tableInfo.fields;
|
|
710
|
+
var targetCols = [
|
|
711
|
+
{
|
|
712
|
+
title: "",
|
|
713
|
+
headerSort: false,
|
|
714
|
+
frozen: true,
|
|
715
|
+
formatter: (cell)=>{
|
|
716
|
+
const rowData = cell.getRow().getData();
|
|
717
|
+
if (rowData.shape) return (0, $8zHUo$yesilyazilimwebspa.ELF).Buttons.mini(()=>{
|
|
718
|
+
const geom = new (0, ($parcel$interopDefault($8zHUo$olformatGeoJSON)))().readGeometry(rowData.shape);
|
|
719
|
+
const ed = {
|
|
720
|
+
geom: geom
|
|
721
|
+
};
|
|
722
|
+
this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapFlashGeomRequest, ed);
|
|
723
|
+
}, 'bi bi-zoom-in', "Haritada G\xf6ster");
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
];
|
|
727
|
+
if (optFieldDefs && optFieldDefs.length > 0) targetCols.push(...optFieldDefs);
|
|
728
|
+
for(var i = 0; i < fieldDefs.length; i++){
|
|
729
|
+
const f = fieldDefs[i];
|
|
730
|
+
if (overrideCols && overrideCols.length > 0) {
|
|
731
|
+
const ovcol = overrideCols.find((oc)=>oc.field == f.name);
|
|
732
|
+
if (ovcol) {
|
|
733
|
+
targetCols.push(ovcol);
|
|
734
|
+
continue;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
const sortableFields = [
|
|
738
|
+
'esriFieldTypeOID',
|
|
739
|
+
'esriFieldTypeInteger',
|
|
740
|
+
'esriFieldTypeSingle',
|
|
741
|
+
'esriFieldTypeSmallInteger',
|
|
742
|
+
'esriFieldTypeDouble',
|
|
743
|
+
'esriFieldTypeString'
|
|
744
|
+
];
|
|
745
|
+
var col = {
|
|
746
|
+
title: f.alias || f.name,
|
|
747
|
+
field: f.name,
|
|
748
|
+
headerSort: sortableFields.includes(f.type),
|
|
749
|
+
editable: false,
|
|
750
|
+
headerFilterPlaceholder: "filtre"
|
|
751
|
+
};
|
|
752
|
+
if (f.domain && f.domain.codedValues && f.domain.codedValues.length > 0) {
|
|
753
|
+
const cvals = f.domain.codedValues;
|
|
754
|
+
col.formatter = "lookup";
|
|
755
|
+
col.minWidth = 152;
|
|
756
|
+
const fp = {
|
|
757
|
+
"": ""
|
|
758
|
+
};
|
|
759
|
+
for (const lv of cvals)fp[lv.code.toString()] = lv.name;
|
|
760
|
+
col.formatterParams = fp;
|
|
761
|
+
} else if (f.type == 'esriFieldTypeDate') col.formatter = (0, $b5c096cfa4bc04e9$export$e1d07ed94bc2b278);
|
|
762
|
+
else if (f.type == 'esriFieldTypeGeometry') col.visible = false;
|
|
763
|
+
targetCols.push(col);
|
|
764
|
+
}
|
|
765
|
+
return targetCols;
|
|
766
|
+
}
|
|
767
|
+
_requestFuncAsync(url, config, params) {
|
|
768
|
+
return $c4e1470a9bd07521$var$__awaiter(this, void 0, void 0, function*() {
|
|
769
|
+
const where = this._getWhereFilter(params);
|
|
770
|
+
const orderBy = this._getOrderByFilter(params);
|
|
771
|
+
const pageInfo = {
|
|
772
|
+
num: params.page,
|
|
773
|
+
size: params.size
|
|
774
|
+
};
|
|
775
|
+
const dr = yield this._channel.queryFeatures(this._layerId, where, orderBy, pageInfo);
|
|
776
|
+
if (dr.success) {
|
|
777
|
+
const data = dr.data.features.map((f)=>Object.assign(f.properties, {
|
|
778
|
+
shape: f.geometry
|
|
779
|
+
}));
|
|
780
|
+
if (this._pagingEnabled) {
|
|
781
|
+
const resp = {
|
|
782
|
+
last_row: this._totalRowCount,
|
|
783
|
+
last_page: Math.ceil(this._totalRowCount / params.size),
|
|
784
|
+
data: data
|
|
785
|
+
};
|
|
786
|
+
return resp;
|
|
787
|
+
} else return data;
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
_getWhereFilter(params) {
|
|
792
|
+
let where = '1=1';
|
|
793
|
+
if (params.filter && params.filter.length > 0) {
|
|
794
|
+
const flist = [];
|
|
795
|
+
for (const filter of params.filter)flist.push(this.getValForWhere(filter));
|
|
796
|
+
where = flist.join(' and ');
|
|
797
|
+
}
|
|
798
|
+
return where;
|
|
799
|
+
}
|
|
800
|
+
_getOrderByFilter(params) {
|
|
801
|
+
if (params.sort && params.sort.length > 0) {
|
|
802
|
+
const flist = [];
|
|
803
|
+
for (const s of params.sort)flist.push(s.field + ' ' + s.dir);
|
|
804
|
+
return flist.join(', ');
|
|
805
|
+
}
|
|
806
|
+
return null;
|
|
807
|
+
}
|
|
808
|
+
getValForWhere(f) {
|
|
809
|
+
const nval = (0, $8zHUo$yesilyazilimwebspa.System).isString(f.value) ? "'" + f.value + "'" : f.value.toString();
|
|
810
|
+
return f.field + f.type + nval;
|
|
811
|
+
}
|
|
812
|
+
resizeLazy() {
|
|
813
|
+
clearTimeout(this._resizeListenHandle);
|
|
814
|
+
this._resizeListenHandle = setTimeout(()=>{
|
|
815
|
+
this._table.element.style.height = this.clientHeight + 'px';
|
|
816
|
+
}, 300);
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
$c4e1470a9bd07521$var$__decorate([
|
|
820
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
821
|
+
$c4e1470a9bd07521$var$__metadata("design:type", typeof ($c4e1470a9bd07521$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $c4e1470a9bd07521$var$_a : Object)
|
|
822
|
+
], $c4e1470a9bd07521$export$1ebdff489d5addb7.prototype, "eventService", void 0);
|
|
823
|
+
$c4e1470a9bd07521$export$1ebdff489d5addb7 = $c4e1470a9bd07521$var$__decorate([
|
|
824
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
825
|
+
elementName: "ags-attr-table"
|
|
826
|
+
}),
|
|
827
|
+
$c4e1470a9bd07521$var$__metadata("design:paramtypes", [
|
|
828
|
+
Object
|
|
829
|
+
])
|
|
830
|
+
], $c4e1470a9bd07521$export$1ebdff489d5addb7);
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
class $10571313f00c012e$export$4691a8a9ff232a6b {
|
|
840
|
+
static getBasicTypeOfVectorSource(source) {
|
|
841
|
+
if (source.isEmpty()) return null;
|
|
842
|
+
const fcoll = source.getFeaturesCollection();
|
|
843
|
+
let geom = null;
|
|
844
|
+
const size = fcoll.getLength();
|
|
845
|
+
let i = 0;
|
|
846
|
+
do {
|
|
847
|
+
const feature = fcoll.item(i++);
|
|
848
|
+
geom = feature.getGeometry();
|
|
849
|
+
}while (!geom || i < size);
|
|
850
|
+
if (!geom) return null;
|
|
851
|
+
if (geom instanceof (0, $8zHUo$olgeom.Point) || geom instanceof (0, $8zHUo$olgeom.MultiPoint)) return 'Point';
|
|
852
|
+
else if (geom instanceof (0, $8zHUo$olgeom.LineString) || geom instanceof (0, $8zHUo$olgeom.MultiLineString)) return 'LineString';
|
|
853
|
+
else if (geom instanceof (0, $8zHUo$olgeom.Polygon) || geom instanceof (0, $8zHUo$olgeom.MultiPolygon)) return 'Polygon';
|
|
854
|
+
return null;
|
|
855
|
+
}
|
|
856
|
+
static formatCoordWgs(coord) {
|
|
857
|
+
return coord[0].toFixed(6) + 'D ' + coord[1].toFixed(6) + 'K';
|
|
858
|
+
}
|
|
859
|
+
static toWGSCoords(coords) {
|
|
860
|
+
return (0, $8zHUo$olproj.toLonLat)(coords);
|
|
861
|
+
}
|
|
862
|
+
static fromWGSCoords(coords) {
|
|
863
|
+
return (0, $8zHUo$olproj.fromLonLat)(coords);
|
|
864
|
+
}
|
|
865
|
+
static toGeojsonStr(geom) {
|
|
866
|
+
if (!geom) return null;
|
|
867
|
+
const gjs = new (0, ($parcel$interopDefault($8zHUo$olformatGeoJSON)))();
|
|
868
|
+
return gjs.writeGeometry(geom);
|
|
869
|
+
}
|
|
870
|
+
static fromGeojsonStr(geojsonStr) {
|
|
871
|
+
if (!geojsonStr) return null;
|
|
872
|
+
const gjs = new (0, ($parcel$interopDefault($8zHUo$olformatGeoJSON)))();
|
|
873
|
+
return gjs.readGeometry(geojsonStr);
|
|
874
|
+
}
|
|
875
|
+
static projectToWgs84(coords, wkid) {
|
|
876
|
+
const p1 = 'EPSG:4326';
|
|
877
|
+
const p2 = 'EPSG:' + wkid.toString();
|
|
878
|
+
return (0, $8zHUo$olproj.transform)(coords, p2, p1);
|
|
879
|
+
}
|
|
880
|
+
static esriExtentAsWGS84(srcEnv) {
|
|
881
|
+
if (!srcEnv) return null;
|
|
882
|
+
const sr = srcEnv.spatialReference;
|
|
883
|
+
let from = '';
|
|
884
|
+
if (sr.wkid) {
|
|
885
|
+
let wkid = sr.wkid;
|
|
886
|
+
if (wkid == 102100) wkid = 3857;
|
|
887
|
+
from = 'EPSG:' + wkid.toString();
|
|
888
|
+
} else from = sr.wkt;
|
|
889
|
+
const to = (0, ($parcel$interopDefault($8zHUo$proj4))).WGS84;
|
|
890
|
+
const [xmin, ymin] = (0, ($parcel$interopDefault($8zHUo$proj4)))(from, to, [
|
|
891
|
+
srcEnv.xmin,
|
|
892
|
+
srcEnv.ymin
|
|
893
|
+
]);
|
|
894
|
+
const [xmax, ymax] = (0, ($parcel$interopDefault($8zHUo$proj4)))(from, to, [
|
|
895
|
+
srcEnv.xmax,
|
|
896
|
+
srcEnv.ymax
|
|
897
|
+
]);
|
|
898
|
+
return [
|
|
899
|
+
xmin,
|
|
900
|
+
ymin,
|
|
901
|
+
xmax,
|
|
902
|
+
ymax
|
|
903
|
+
];
|
|
904
|
+
}
|
|
905
|
+
static fromEsriJsonToGeojson(ej) {
|
|
906
|
+
return (0, $8zHUo$terraformerarcgis.arcgisToGeoJSON)(ej);
|
|
907
|
+
}
|
|
908
|
+
static fromGeojson(geojson) {
|
|
909
|
+
const gjs = new (0, ($parcel$interopDefault($8zHUo$olformatGeoJSON)))();
|
|
910
|
+
return gjs.readGeometry(geojson);
|
|
911
|
+
}
|
|
912
|
+
static fromEsriJson(ej) {
|
|
913
|
+
const geojson = (0, $8zHUo$terraformerarcgis.arcgisToGeoJSON)(ej);
|
|
914
|
+
return $10571313f00c012e$export$4691a8a9ff232a6b.fromGeojson(geojson);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
var $f2c349c195388e99$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
921
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
922
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
923
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
924
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
925
|
+
};
|
|
926
|
+
var $f2c349c195388e99$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
927
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
928
|
+
};
|
|
929
|
+
var $f2c349c195388e99$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
930
|
+
function adopt(value) {
|
|
931
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
932
|
+
resolve(value);
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
936
|
+
function fulfilled(value) {
|
|
937
|
+
try {
|
|
938
|
+
step(generator.next(value));
|
|
939
|
+
} catch (e) {
|
|
940
|
+
reject(e);
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
function rejected(value) {
|
|
944
|
+
try {
|
|
945
|
+
step(generator["throw"](value));
|
|
946
|
+
} catch (e) {
|
|
947
|
+
reject(e);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
function step(result) {
|
|
951
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
952
|
+
}
|
|
953
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
954
|
+
});
|
|
955
|
+
};
|
|
956
|
+
var $f2c349c195388e99$var$_a, $f2c349c195388e99$var$_b;
|
|
957
|
+
class $f2c349c195388e99$var$AgsMapServiceLayer extends (0, $3ecb066746a16c54$export$23eba0cb71a4e506) {
|
|
958
|
+
constructor(definition, channel, layer){
|
|
959
|
+
super(definition);
|
|
960
|
+
this.onAction = (id)=>{
|
|
961
|
+
super.onAction(id);
|
|
962
|
+
if (id === 'zoom-to-layer') {
|
|
963
|
+
const ea = {
|
|
964
|
+
extent: this._layer.getExtent()
|
|
965
|
+
};
|
|
966
|
+
this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapGotoExtentRequest, ea);
|
|
967
|
+
}
|
|
968
|
+
};
|
|
969
|
+
this.onIdentifyRequested = (prm)=>{
|
|
970
|
+
const res = {
|
|
971
|
+
type: 'async',
|
|
972
|
+
status: false,
|
|
973
|
+
sourceLayer: this,
|
|
974
|
+
result: null
|
|
975
|
+
};
|
|
976
|
+
if (!this.isAnyVisible) return res;
|
|
977
|
+
res.result = this._doIdentifyAsync(prm);
|
|
978
|
+
res.status = true;
|
|
979
|
+
return res;
|
|
980
|
+
};
|
|
981
|
+
this._layer = layer;
|
|
982
|
+
this._channel = channel;
|
|
983
|
+
this.children = new (0, $8zHUo$yesilyazilimwebspa.List)();
|
|
984
|
+
this._legendInfos = this._createLegendInfos();
|
|
985
|
+
this._canIdentify = true;
|
|
986
|
+
this._createActions();
|
|
987
|
+
this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapIdentifyRequest, this.onIdentifyRequested);
|
|
988
|
+
layer.setProperties({
|
|
989
|
+
mapLayer: this,
|
|
990
|
+
name: this._definition.key,
|
|
991
|
+
canEdit: false,
|
|
992
|
+
canFlash: true,
|
|
993
|
+
canSelect: true
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
initialize() {
|
|
997
|
+
this._allSubLayers = this._getAllSubLayers();
|
|
998
|
+
this._calcVisSubLayerIds();
|
|
999
|
+
}
|
|
1000
|
+
getLegendInfos() {
|
|
1001
|
+
return this._legendInfos;
|
|
1002
|
+
}
|
|
1003
|
+
getServiceInfo() {
|
|
1004
|
+
return this._channel.serviceInfo;
|
|
1005
|
+
}
|
|
1006
|
+
get channel() {
|
|
1007
|
+
return this._channel;
|
|
1008
|
+
}
|
|
1009
|
+
onSubLayerVisibleChanged() {
|
|
1010
|
+
this._calcVisSubLayerIds();
|
|
1011
|
+
this._updateLayerProps();
|
|
1012
|
+
this.layerObj.getSource().refresh();
|
|
1013
|
+
}
|
|
1014
|
+
_doIdentifyAsync(prm) {
|
|
1015
|
+
return $f2c349c195388e99$var$__awaiter(this, void 0, void 0, function*() {
|
|
1016
|
+
const opRes = {
|
|
1017
|
+
success: false
|
|
1018
|
+
};
|
|
1019
|
+
try {
|
|
1020
|
+
const idfRes = yield this._channel.identify({
|
|
1021
|
+
coords: prm.coords,
|
|
1022
|
+
imageDisplay: prm.imageDisplay,
|
|
1023
|
+
mapExtent: prm.mapExtent,
|
|
1024
|
+
layerIds: this._visibleSubLayerIds,
|
|
1025
|
+
tolerance: prm.tolerance,
|
|
1026
|
+
returnFieldName: true,
|
|
1027
|
+
returnUnformattedValues: false
|
|
1028
|
+
});
|
|
1029
|
+
if (idfRes.success && idfRes.data) {
|
|
1030
|
+
opRes.data = idfRes.data.map((r)=>{
|
|
1031
|
+
var _a;
|
|
1032
|
+
const f = {
|
|
1033
|
+
type: 'Feature',
|
|
1034
|
+
geometry: (0, $10571313f00c012e$export$4691a8a9ff232a6b).fromEsriJsonToGeojson(r.geometry),
|
|
1035
|
+
properties: r.attributes
|
|
1036
|
+
};
|
|
1037
|
+
return {
|
|
1038
|
+
layerKey: r.layerId.toString(),
|
|
1039
|
+
layerTitle: ((_a = this._allSubLayers.find((sl)=>sl.id === r.layerId.toString())) === null || _a === void 0 ? void 0 : _a.title) || r.layerName,
|
|
1040
|
+
feature: f
|
|
1041
|
+
};
|
|
1042
|
+
});
|
|
1043
|
+
opRes.success = true;
|
|
1044
|
+
} else opRes.message = idfRes.message;
|
|
1045
|
+
} catch (err) {
|
|
1046
|
+
console.warn('Error in identify', err);
|
|
1047
|
+
opRes.message = "Identify i\u015Flemi s\u0131ras\u0131nda hata !";
|
|
1048
|
+
}
|
|
1049
|
+
return opRes;
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
_updateLayerProps() {
|
|
1053
|
+
var params = {};
|
|
1054
|
+
if (this._visibleSubLayerIds.length > 0) params['LAYERS'] = 'show:' + this._visibleSubLayerIds.join(',');
|
|
1055
|
+
else params['LAYERS'] = 'show:-1';
|
|
1056
|
+
this.layerObj.getSource().updateParams(params);
|
|
1057
|
+
}
|
|
1058
|
+
_getAllSubLayers() {
|
|
1059
|
+
const getSls = (list)=>{
|
|
1060
|
+
if (!(list && list.length > 0)) return null;
|
|
1061
|
+
const arr = [];
|
|
1062
|
+
for (const item of list){
|
|
1063
|
+
arr.push(item);
|
|
1064
|
+
const subArr = getSls(item.children);
|
|
1065
|
+
if (subArr && subArr.length > 0) arr.push(...subArr);
|
|
1066
|
+
}
|
|
1067
|
+
return arr;
|
|
1068
|
+
};
|
|
1069
|
+
return getSls(this.children);
|
|
1070
|
+
}
|
|
1071
|
+
_calcVisSubLayerIds() {
|
|
1072
|
+
const stack = [
|
|
1073
|
+
...this.children.toArray()
|
|
1074
|
+
];
|
|
1075
|
+
const arr = [];
|
|
1076
|
+
while(stack.length > 0){
|
|
1077
|
+
var cur = stack.pop();
|
|
1078
|
+
if (cur.checked) {
|
|
1079
|
+
if (cur.children) stack.push(...cur.children);
|
|
1080
|
+
else arr.push(cur.serviceId);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
this._visibleSubLayerIds = arr;
|
|
1084
|
+
}
|
|
1085
|
+
_createLegendInfos() {
|
|
1086
|
+
if (!this._channel.ok) return [];
|
|
1087
|
+
const arr = [];
|
|
1088
|
+
for (const lyr of this._channel.legendInfo.layers){
|
|
1089
|
+
const li = {
|
|
1090
|
+
layerId: this._definition.key + '-' + lyr.layerId.toString(),
|
|
1091
|
+
title: lyr.layerName,
|
|
1092
|
+
rows: []
|
|
1093
|
+
};
|
|
1094
|
+
if (lyr.legend && lyr.legend.length > 0) for (const lli of lyr.legend){
|
|
1095
|
+
const img = document.createElement('img');
|
|
1096
|
+
img.src = 'data:' + lli.contentType + ';base64,' + lli.imageData;
|
|
1097
|
+
li.rows.push({
|
|
1098
|
+
elm: img,
|
|
1099
|
+
label: lli.label
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
arr.push(li);
|
|
1103
|
+
}
|
|
1104
|
+
return arr;
|
|
1105
|
+
}
|
|
1106
|
+
_createActions() {
|
|
1107
|
+
const actions = [];
|
|
1108
|
+
if (this._layer.getExtent()) {
|
|
1109
|
+
const zoomToLayerAction = {
|
|
1110
|
+
key: 'zoom-to-layer',
|
|
1111
|
+
tootip: "T\xfcm\xfcne Yakla\u015F",
|
|
1112
|
+
iconClass: 'bi bi-globe-europe-africa'
|
|
1113
|
+
};
|
|
1114
|
+
actions.push(zoomToLayerAction);
|
|
1115
|
+
}
|
|
1116
|
+
this._actions = actions;
|
|
1117
|
+
}
|
|
1118
|
+
get isAnyVisible() {
|
|
1119
|
+
if (!this.checked) return false;
|
|
1120
|
+
for (const sl of this.children){
|
|
1121
|
+
if (sl.isAnyVisible) return true;
|
|
1122
|
+
}
|
|
1123
|
+
return false;
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
$f2c349c195388e99$var$__decorate([
|
|
1127
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
1128
|
+
$f2c349c195388e99$var$__metadata("design:type", typeof ($f2c349c195388e99$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.Application) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.Application)) === "function" ? $f2c349c195388e99$var$_a : Object)
|
|
1129
|
+
], $f2c349c195388e99$var$AgsMapServiceLayer.prototype, "application", void 0);
|
|
1130
|
+
$f2c349c195388e99$var$__decorate([
|
|
1131
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
1132
|
+
$f2c349c195388e99$var$__metadata("design:type", typeof ($f2c349c195388e99$var$_b = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $f2c349c195388e99$var$_b : Object)
|
|
1133
|
+
], $f2c349c195388e99$var$AgsMapServiceLayer.prototype, "eventService", void 0);
|
|
1134
|
+
class $f2c349c195388e99$export$e14231eb55c9f02a extends $f2c349c195388e99$var$AgsMapServiceLayer {
|
|
1135
|
+
}
|
|
1136
|
+
class $f2c349c195388e99$export$a13bc2cb6f3c80e9 extends $f2c349c195388e99$var$AgsMapServiceLayer {
|
|
1137
|
+
}
|
|
1138
|
+
class $f2c349c195388e99$export$d78c09768a4f8c18 {
|
|
1139
|
+
get hasMapLayer() {
|
|
1140
|
+
return false;
|
|
1141
|
+
}
|
|
1142
|
+
getLegendInfos() {
|
|
1143
|
+
return null;
|
|
1144
|
+
}
|
|
1145
|
+
constructor(_serviceLayer, _layerInfo, _capabilities){
|
|
1146
|
+
this._serviceLayer = _serviceLayer;
|
|
1147
|
+
this._layerInfo = _layerInfo;
|
|
1148
|
+
this._capabilities = _capabilities;
|
|
1149
|
+
this.hasLegend = false;
|
|
1150
|
+
this.title = _layerInfo.name;
|
|
1151
|
+
this.id = _serviceLayer.id + '-' + _layerInfo.id.toString();
|
|
1152
|
+
this.serviceId = _layerInfo.id;
|
|
1153
|
+
this._checked = _layerInfo.defaultVisibility;
|
|
1154
|
+
this._createActions();
|
|
1155
|
+
this._findTocIcon();
|
|
1156
|
+
}
|
|
1157
|
+
get serviceLayer() {
|
|
1158
|
+
return this._serviceLayer;
|
|
1159
|
+
}
|
|
1160
|
+
get capabilities() {
|
|
1161
|
+
return this._capabilities;
|
|
1162
|
+
}
|
|
1163
|
+
get checked() {
|
|
1164
|
+
return this._checked;
|
|
1165
|
+
}
|
|
1166
|
+
set checked(value) {
|
|
1167
|
+
if (value !== this._checked) {
|
|
1168
|
+
this._checked = value;
|
|
1169
|
+
this._serviceLayer.onSubLayerVisibleChanged();
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
onAction(id) {
|
|
1173
|
+
if (id === 'attr-table') this.serviceLayer.application.openPanel({
|
|
1174
|
+
closable: true,
|
|
1175
|
+
draggable: true,
|
|
1176
|
+
header: 'Tablo - ' + (this._layerInfo.name || ''),
|
|
1177
|
+
name: 'at-' + this.id,
|
|
1178
|
+
content: new (0, $c4e1470a9bd07521$export$1ebdff489d5addb7)({
|
|
1179
|
+
channel: this.serviceLayer.channel,
|
|
1180
|
+
layerId: this.serviceId
|
|
1181
|
+
})
|
|
1182
|
+
}, (0, $8zHUo$yesilyazilimwebspa.PanelPos).Bottom);
|
|
1183
|
+
}
|
|
1184
|
+
get isAnyVisible() {
|
|
1185
|
+
if (this.children && this.children.length > 0) for (const sl of this.children){
|
|
1186
|
+
if (sl.isAnyVisible) return true;
|
|
1187
|
+
}
|
|
1188
|
+
return this._checked;
|
|
1189
|
+
}
|
|
1190
|
+
_createActions() {
|
|
1191
|
+
const actions = [];
|
|
1192
|
+
if (this._capabilities.hasAttributeTable) {
|
|
1193
|
+
const attrTblAction = {
|
|
1194
|
+
key: 'attr-table',
|
|
1195
|
+
tootip: "\xd6znitelik Tablosunu A\xe7",
|
|
1196
|
+
iconClass: 'bi bi-table'
|
|
1197
|
+
};
|
|
1198
|
+
actions.push(attrTblAction);
|
|
1199
|
+
}
|
|
1200
|
+
this.actions = actions;
|
|
1201
|
+
}
|
|
1202
|
+
_findTocIcon() {
|
|
1203
|
+
var _a;
|
|
1204
|
+
const leg = (_a = this._serviceLayer.channel.legendInfo.layers.find((l)=>l.layerId == this._layerInfo.id)) === null || _a === void 0 ? void 0 : _a.legend;
|
|
1205
|
+
if (leg && leg.length == 1) {
|
|
1206
|
+
const lli = leg[0];
|
|
1207
|
+
const img = document.createElement('img');
|
|
1208
|
+
img.src = 'data:' + lli.contentType + ';base64,' + lli.imageData;
|
|
1209
|
+
this.icon = img;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
|
|
1221
|
+
var $374e53c8a82195ab$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
1222
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1223
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1224
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1225
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1226
|
+
};
|
|
1227
|
+
var $374e53c8a82195ab$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
1228
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1229
|
+
};
|
|
1230
|
+
var $374e53c8a82195ab$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
1231
|
+
function adopt(value) {
|
|
1232
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
1233
|
+
resolve(value);
|
|
1234
|
+
});
|
|
1235
|
+
}
|
|
1236
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
1237
|
+
function fulfilled(value) {
|
|
1238
|
+
try {
|
|
1239
|
+
step(generator.next(value));
|
|
1240
|
+
} catch (e) {
|
|
1241
|
+
reject(e);
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
function rejected(value) {
|
|
1245
|
+
try {
|
|
1246
|
+
step(generator["throw"](value));
|
|
1247
|
+
} catch (e) {
|
|
1248
|
+
reject(e);
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
function step(result) {
|
|
1252
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
1253
|
+
}
|
|
1254
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1255
|
+
});
|
|
1256
|
+
};
|
|
1257
|
+
var $374e53c8a82195ab$var$_a;
|
|
1258
|
+
class $374e53c8a82195ab$export$42a959c978dc7858 {
|
|
1259
|
+
constructor(_prop){
|
|
1260
|
+
this._prop = _prop;
|
|
1261
|
+
this._serviceUrl = _prop.url.endsWith('/') ? _prop.url : _prop.url + '/';
|
|
1262
|
+
this._connected = false;
|
|
1263
|
+
this._proxyUrl = new URL('/proxy', this.storeService.appProperties.apiEndPoint).toString() + '?';
|
|
1264
|
+
}
|
|
1265
|
+
get ok() {
|
|
1266
|
+
return this._connected;
|
|
1267
|
+
}
|
|
1268
|
+
get serviceInfo() {
|
|
1269
|
+
return this._serviceInfo;
|
|
1270
|
+
}
|
|
1271
|
+
get legendInfo() {
|
|
1272
|
+
return this._legendInfo;
|
|
1273
|
+
}
|
|
1274
|
+
connectAsync() {
|
|
1275
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1276
|
+
const res = {
|
|
1277
|
+
success: false
|
|
1278
|
+
};
|
|
1279
|
+
this._serviceInfo = yield this._fetchServiceInfo();
|
|
1280
|
+
if (this._serviceInfo) {
|
|
1281
|
+
this._legendInfo = yield this._fetchLegendInfo();
|
|
1282
|
+
if (this._legendInfo) {
|
|
1283
|
+
res.success = true;
|
|
1284
|
+
this._connected = true;
|
|
1285
|
+
} else res.message = "Lejant bilgileri al\u0131namadi";
|
|
1286
|
+
} else res.message = "Servis bilgileri al\u0131namad\u0131 !";
|
|
1287
|
+
return res;
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
getTableInfoAsync(layerId) {
|
|
1291
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1292
|
+
if (!this._tableInfos) {
|
|
1293
|
+
const tires = yield this._fetchTableInfos();
|
|
1294
|
+
if ((tires === null || tires === void 0 ? void 0 : tires.layers) && tires.layers.length > 0) {
|
|
1295
|
+
const map = new Map();
|
|
1296
|
+
for (const li of tires.layers)map.set(li.id, li);
|
|
1297
|
+
this._tableInfos = map;
|
|
1298
|
+
} else return null;
|
|
1299
|
+
}
|
|
1300
|
+
return Promise.resolve(this._tableInfos.get(layerId));
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
queryRecordCount(layerId, filter = '1=1') {
|
|
1304
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1305
|
+
const p = {
|
|
1306
|
+
success: false
|
|
1307
|
+
};
|
|
1308
|
+
const prms = new URLSearchParams({
|
|
1309
|
+
where: filter,
|
|
1310
|
+
returnCountOnly: 'true',
|
|
1311
|
+
f: 'pjson'
|
|
1312
|
+
});
|
|
1313
|
+
const url = this.getUrl(layerId.toString() + '/query?' + prms.toString());
|
|
1314
|
+
try {
|
|
1315
|
+
const res = yield fetch(url);
|
|
1316
|
+
if (res.ok) {
|
|
1317
|
+
const data = yield res.json();
|
|
1318
|
+
if (!data.error) {
|
|
1319
|
+
p.data = data.count;
|
|
1320
|
+
p.success = true;
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
} catch (err) {
|
|
1324
|
+
console.warn('Error in getRecordCount', {
|
|
1325
|
+
layerId: layerId,
|
|
1326
|
+
err: err,
|
|
1327
|
+
filter: filter
|
|
1328
|
+
});
|
|
1329
|
+
p.message = err;
|
|
1330
|
+
}
|
|
1331
|
+
return p;
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1334
|
+
queryFeatures(layerId, filter = '1=1', orderBy = null, page = null) {
|
|
1335
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1336
|
+
const p = {
|
|
1337
|
+
success: false
|
|
1338
|
+
};
|
|
1339
|
+
const tblInfo = yield this.getTableInfoAsync(layerId);
|
|
1340
|
+
const oidfield = tblInfo.fields.find((f)=>f.type == 'esriFieldTypeOID');
|
|
1341
|
+
const po = {
|
|
1342
|
+
f: 'geojson',
|
|
1343
|
+
outFields: '*',
|
|
1344
|
+
where: filter,
|
|
1345
|
+
outSR: '4326',
|
|
1346
|
+
returnGeometry: 'true'
|
|
1347
|
+
};
|
|
1348
|
+
if ((page === null || page === void 0 ? void 0 : page.num) && page.size) {
|
|
1349
|
+
po.resultRecordCount = page.size.toString();
|
|
1350
|
+
po.resultOffset = (page.size * (page.num - 1)).toString();
|
|
1351
|
+
}
|
|
1352
|
+
if (orderBy || oidfield) po.orderByFields = orderBy || oidfield.name;
|
|
1353
|
+
const prms = new URLSearchParams(po).toString();
|
|
1354
|
+
const url = this.getUrl(layerId.toString() + '/query?' + prms);
|
|
1355
|
+
try {
|
|
1356
|
+
const res = yield fetch(url);
|
|
1357
|
+
if (res.ok) {
|
|
1358
|
+
const data = yield res.json();
|
|
1359
|
+
if (!data.error) {
|
|
1360
|
+
p.data = data;
|
|
1361
|
+
p.success = true;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
} catch (err) {
|
|
1365
|
+
console.warn('Error in queryFeatures', {
|
|
1366
|
+
layerId: layerId,
|
|
1367
|
+
err: err,
|
|
1368
|
+
filter: filter
|
|
1369
|
+
});
|
|
1370
|
+
p.message = err;
|
|
1371
|
+
}
|
|
1372
|
+
return p;
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1375
|
+
identify(params) {
|
|
1376
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1377
|
+
const spo = {
|
|
1378
|
+
f: 'json',
|
|
1379
|
+
geometryType: params.coords.length == 4 ? 'esriGeometryEnvelope' : 'esriGeometryPoint',
|
|
1380
|
+
geometry: params.coords.join(', '),
|
|
1381
|
+
layers: 'all:' + params.layerIds.join(','),
|
|
1382
|
+
sr: '4326',
|
|
1383
|
+
tolerance: params.tolerance.toString(),
|
|
1384
|
+
imageDisplay: [
|
|
1385
|
+
params.imageDisplay.w,
|
|
1386
|
+
params.imageDisplay.h,
|
|
1387
|
+
params.imageDisplay.dpi
|
|
1388
|
+
].join(','),
|
|
1389
|
+
mapExtent: params.mapExtent.join(','),
|
|
1390
|
+
returnGeometry: 'true',
|
|
1391
|
+
returnFieldName: (params.returnFieldName || false).toString(),
|
|
1392
|
+
returnUnformattedValues: (params.returnUnformattedValues || false).toString()
|
|
1393
|
+
};
|
|
1394
|
+
const sp = new URLSearchParams(spo);
|
|
1395
|
+
const url = this.getUrl('identify?') + sp.toString();
|
|
1396
|
+
const opres = {
|
|
1397
|
+
success: false
|
|
1398
|
+
};
|
|
1399
|
+
try {
|
|
1400
|
+
let res = yield fetch(url);
|
|
1401
|
+
if (!res.ok) {
|
|
1402
|
+
console.warn('Error response returned while getting Identify');
|
|
1403
|
+
opres.message = "Servis mesaji hatas\u0131!";
|
|
1404
|
+
} else {
|
|
1405
|
+
const srvData = yield res.json();
|
|
1406
|
+
if (srvData.error) {
|
|
1407
|
+
console.warn('Error response for Identify', srvData.error);
|
|
1408
|
+
opres.message = "Servis sonucu hata al\u0131nd\u0131!";
|
|
1409
|
+
} else {
|
|
1410
|
+
opres.data = srvData.results;
|
|
1411
|
+
opres.success = true;
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
} catch (err) {
|
|
1415
|
+
console.warn('Error while getting Identify', err);
|
|
1416
|
+
opres.message = "Konum bilgisi alinirken hata olu\u015Ftu!";
|
|
1417
|
+
}
|
|
1418
|
+
return opres;
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
getImageData(url) {
|
|
1422
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1423
|
+
return new Promise((resolve, reject)=>{
|
|
1424
|
+
const client = new XMLHttpRequest();
|
|
1425
|
+
client.responseType = 'blob';
|
|
1426
|
+
const purl = this._proxyUrl + encodeURIComponent(url);
|
|
1427
|
+
client.open('GET', purl);
|
|
1428
|
+
client.setRequestHeader("Authorization", (0, $8zHUo$yesilyazilimwebspa.TokenManager).headerValue);
|
|
1429
|
+
client.onload = function() {
|
|
1430
|
+
const ct = client.getResponseHeader('content-type') || '';
|
|
1431
|
+
if (ct.toLocaleLowerCase().startsWith('image')) resolve(URL.createObjectURL(client.response));
|
|
1432
|
+
else resolve(null);
|
|
1433
|
+
};
|
|
1434
|
+
client.send();
|
|
1435
|
+
});
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
getUrl(suffix = '') {
|
|
1439
|
+
const url = this._serviceUrl + (suffix.startsWith('/') ? suffix.substring(1) : suffix);
|
|
1440
|
+
if (this._prop.useProxy) {
|
|
1441
|
+
const u = this._proxyUrl + encodeURIComponent(url);
|
|
1442
|
+
return u.toString();
|
|
1443
|
+
}
|
|
1444
|
+
return url;
|
|
1445
|
+
}
|
|
1446
|
+
getUrlClean(suffix = '') {
|
|
1447
|
+
const url = this._serviceUrl + (suffix.startsWith('/') ? suffix.substring(1) : suffix);
|
|
1448
|
+
return url;
|
|
1449
|
+
}
|
|
1450
|
+
_fetchServiceInfo() {
|
|
1451
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1452
|
+
try {
|
|
1453
|
+
const url = this.getUrl('?f=pjson');
|
|
1454
|
+
return yield this._fetchCached(url);
|
|
1455
|
+
} catch (err) {
|
|
1456
|
+
console.warn('Error while getting MapService Info', err);
|
|
1457
|
+
return null;
|
|
1458
|
+
}
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1461
|
+
_fetchLegendInfo() {
|
|
1462
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1463
|
+
try {
|
|
1464
|
+
const url = this.getUrl('legend?f=pjson');
|
|
1465
|
+
return yield this._fetchCached(url);
|
|
1466
|
+
} catch (err) {
|
|
1467
|
+
console.warn('Error while getting MapService Legend Info', err);
|
|
1468
|
+
}
|
|
1469
|
+
return null;
|
|
1470
|
+
});
|
|
1471
|
+
}
|
|
1472
|
+
_fetchTableInfos() {
|
|
1473
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1474
|
+
try {
|
|
1475
|
+
const url = this.getUrl('layers?f=pjson');
|
|
1476
|
+
return yield this._fetchCached(url);
|
|
1477
|
+
} catch (err) {
|
|
1478
|
+
console.warn('Error while getting MapService Table Info', err);
|
|
1479
|
+
return null;
|
|
1480
|
+
}
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
_fetchCached(url) {
|
|
1484
|
+
return $374e53c8a82195ab$var$__awaiter(this, void 0, void 0, function*() {
|
|
1485
|
+
const cachekey = 'lyr_' + encodeURIComponent(url);
|
|
1486
|
+
const cached = localStorage.getItem(cachekey);
|
|
1487
|
+
if (cached) return Promise.resolve(JSON.parse(cached));
|
|
1488
|
+
let res = yield fetch(url, {
|
|
1489
|
+
cache: 'no-cache'
|
|
1490
|
+
});
|
|
1491
|
+
if (!res.ok) return null;
|
|
1492
|
+
const obj = yield res.json();
|
|
1493
|
+
if (obj.error) return null;
|
|
1494
|
+
localStorage.setItem(cachekey, JSON.stringify(obj));
|
|
1495
|
+
return obj;
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
$374e53c8a82195ab$var$__decorate([
|
|
1500
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
1501
|
+
$374e53c8a82195ab$var$__metadata("design:type", typeof ($374e53c8a82195ab$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.StoreService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.StoreService)) === "function" ? $374e53c8a82195ab$var$_a : Object)
|
|
1502
|
+
], $374e53c8a82195ab$export$42a959c978dc7858.prototype, "storeService", void 0);
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
var $ebdb133fb916235d$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
1506
|
+
function adopt(value) {
|
|
1507
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
1508
|
+
resolve(value);
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
1512
|
+
function fulfilled(value) {
|
|
1513
|
+
try {
|
|
1514
|
+
step(generator.next(value));
|
|
1515
|
+
} catch (e) {
|
|
1516
|
+
reject(e);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
function rejected(value) {
|
|
1520
|
+
try {
|
|
1521
|
+
step(generator["throw"](value));
|
|
1522
|
+
} catch (e) {
|
|
1523
|
+
reject(e);
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
function step(result) {
|
|
1527
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
1528
|
+
}
|
|
1529
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1530
|
+
});
|
|
1531
|
+
};
|
|
1532
|
+
class $ebdb133fb916235d$export$70cc7c4c8953dde9 {
|
|
1533
|
+
constructor(){
|
|
1534
|
+
this.type = (0, $91d76f4d8e753f27$export$3c6428acb8ce7fb9).EsriMapService;
|
|
1535
|
+
}
|
|
1536
|
+
createAsync(ld) {
|
|
1537
|
+
return $ebdb133fb916235d$var$__awaiter(this, void 0, void 0, function*() {
|
|
1538
|
+
const opres = {
|
|
1539
|
+
success: false
|
|
1540
|
+
};
|
|
1541
|
+
try {
|
|
1542
|
+
let errMessage = null;
|
|
1543
|
+
const opt = {
|
|
1544
|
+
visible: !!ld.visible,
|
|
1545
|
+
properties: {}
|
|
1546
|
+
};
|
|
1547
|
+
const channel = new (0, $374e53c8a82195ab$export$42a959c978dc7858)(ld.props);
|
|
1548
|
+
const r1 = yield channel.connectAsync();
|
|
1549
|
+
if (!r1.success) errMessage = r1.message;
|
|
1550
|
+
else {
|
|
1551
|
+
const fullExtent = channel.serviceInfo.fullExtent;
|
|
1552
|
+
if (fullExtent) {
|
|
1553
|
+
const ext = (0, $10571313f00c012e$export$4691a8a9ff232a6b).esriExtentAsWGS84(fullExtent);
|
|
1554
|
+
if (ext) opt.extent = ext;
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
let layer;
|
|
1558
|
+
const layerUrl = channel.getUrlClean();
|
|
1559
|
+
if (ld.props.tiled) {
|
|
1560
|
+
const loadFunction = (tile, url)=>$ebdb133fb916235d$var$__awaiter(this, void 0, void 0, function*() {
|
|
1561
|
+
const obj = yield channel.getImageData(url);
|
|
1562
|
+
if (obj) tile.getImage().src = obj;
|
|
1563
|
+
});
|
|
1564
|
+
const source = new (0, $8zHUo$olsource.TileArcGISRest)({
|
|
1565
|
+
url: layerUrl,
|
|
1566
|
+
tileLoadFunction: ld.props.useProxy ? loadFunction : null
|
|
1567
|
+
});
|
|
1568
|
+
const opt1 = Object.assign(opt, {
|
|
1569
|
+
source: source
|
|
1570
|
+
});
|
|
1571
|
+
const lyrObj = channel.ok ? new (0, ($parcel$interopDefault($8zHUo$ollayerTile)))(opt1) : null;
|
|
1572
|
+
layer = new (0, $f2c349c195388e99$export$a13bc2cb6f3c80e9)(ld, channel, lyrObj);
|
|
1573
|
+
} else {
|
|
1574
|
+
const loadFunction = (img, url)=>$ebdb133fb916235d$var$__awaiter(this, void 0, void 0, function*() {
|
|
1575
|
+
const obj = yield channel.getImageData(url);
|
|
1576
|
+
if (obj) img.getImage().src = obj;
|
|
1577
|
+
});
|
|
1578
|
+
const source = new (0, $8zHUo$olsource.ImageArcGISRest)({
|
|
1579
|
+
url: layerUrl,
|
|
1580
|
+
imageLoadFunction: ld.props.useProxy ? loadFunction : null
|
|
1581
|
+
});
|
|
1582
|
+
const opt2 = Object.assign(opt, {
|
|
1583
|
+
source: source
|
|
1584
|
+
});
|
|
1585
|
+
const lyrObj = channel.ok ? new (0, ($parcel$interopDefault($8zHUo$ollayerImage)))(opt2) : null;
|
|
1586
|
+
layer = new (0, $f2c349c195388e99$export$e14231eb55c9f02a)(ld, channel, lyrObj);
|
|
1587
|
+
}
|
|
1588
|
+
if (errMessage) layer.setError(errMessage);
|
|
1589
|
+
else {
|
|
1590
|
+
this._buildSubLayers(channel.serviceInfo, layer);
|
|
1591
|
+
layer.initialize();
|
|
1592
|
+
}
|
|
1593
|
+
opres.data = layer;
|
|
1594
|
+
opres.success = true;
|
|
1595
|
+
} catch (err) {
|
|
1596
|
+
opres.message = err;
|
|
1597
|
+
}
|
|
1598
|
+
return opres;
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
_buildSubLayers(srvInfo, layer) {
|
|
1602
|
+
const slMap = new Map();
|
|
1603
|
+
const capas = srvInfo.capabilities.split(',');
|
|
1604
|
+
const canQuery = capas.includes('Query');
|
|
1605
|
+
const maxRecords = srvInfo.maxRecordCount;
|
|
1606
|
+
for (const slInfo of srvInfo.layers){
|
|
1607
|
+
const slCaps = {
|
|
1608
|
+
hasAttributeTable: canQuery && !slInfo.subLayerIds,
|
|
1609
|
+
maxRecords: maxRecords
|
|
1610
|
+
};
|
|
1611
|
+
const sl = new (0, $f2c349c195388e99$export$d78c09768a4f8c18)(layer, slInfo, slCaps);
|
|
1612
|
+
slMap.set(slInfo.id, sl);
|
|
1613
|
+
if (slInfo.parentLayerId >= 0) {
|
|
1614
|
+
const pl = slMap.get(slInfo.parentLayerId);
|
|
1615
|
+
if (pl) {
|
|
1616
|
+
if (!pl.children) pl.children = new (0, $8zHUo$yesilyazilimwebspa.List)();
|
|
1617
|
+
pl.children.add(sl);
|
|
1618
|
+
}
|
|
1619
|
+
} else layer.children.add(sl);
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
|
|
1625
|
+
var $4542e2c018b508ca$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
1626
|
+
function adopt(value) {
|
|
1627
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
1628
|
+
resolve(value);
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
1632
|
+
function fulfilled(value) {
|
|
1633
|
+
try {
|
|
1634
|
+
step(generator.next(value));
|
|
1635
|
+
} catch (e) {
|
|
1636
|
+
reject(e);
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
function rejected(value) {
|
|
1640
|
+
try {
|
|
1641
|
+
step(generator["throw"](value));
|
|
1642
|
+
} catch (e) {
|
|
1643
|
+
reject(e);
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
function step(result) {
|
|
1647
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
1648
|
+
}
|
|
1649
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1650
|
+
});
|
|
1651
|
+
};
|
|
1652
|
+
class $4542e2c018b508ca$export$5612f11f554f467 {
|
|
1653
|
+
constructor(customLayerFactories){
|
|
1654
|
+
this._map = new Map();
|
|
1655
|
+
this._register(new (0, $ebdb133fb916235d$export$70cc7c4c8953dde9)());
|
|
1656
|
+
for (const lf of customLayerFactories)this._register(lf);
|
|
1657
|
+
}
|
|
1658
|
+
createAsync(ld) {
|
|
1659
|
+
return $4542e2c018b508ca$var$__awaiter(this, void 0, void 0, function*() {
|
|
1660
|
+
const lf = this._map.get(ld.type);
|
|
1661
|
+
if (!lf) return Promise.resolve({
|
|
1662
|
+
success: false,
|
|
1663
|
+
message: 'LayerFactory type not registered > ' + ld.type
|
|
1664
|
+
});
|
|
1665
|
+
const res = yield lf.createAsync(ld);
|
|
1666
|
+
if (res.success && res.data) {
|
|
1667
|
+
if (yield res.data.prepareAsync()) return res;
|
|
1668
|
+
return {
|
|
1669
|
+
success: false,
|
|
1670
|
+
message: 'Layer Prepare error > ' + ld.key
|
|
1671
|
+
};
|
|
1672
|
+
}
|
|
1673
|
+
return res;
|
|
1674
|
+
});
|
|
1675
|
+
}
|
|
1676
|
+
_register(lf) {
|
|
1677
|
+
this._map.set(lf.type, lf);
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
|
|
1691
|
+
|
|
1692
|
+
var $e2e9872d2858bcde$exports = {};
|
|
1693
|
+
|
|
1694
|
+
$parcel$export($e2e9872d2858bcde$exports, "MapManager", () => $e2e9872d2858bcde$export$c521bb0b406df9a3);
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
const $9cc1f3e534208f0b$var$setAlpha = function(color, alpha) {
|
|
1710
|
+
if (color.length == 4) return [
|
|
1711
|
+
color[0],
|
|
1712
|
+
color[1],
|
|
1713
|
+
color[2],
|
|
1714
|
+
alpha
|
|
1715
|
+
];
|
|
1716
|
+
else return color.concat(alpha);
|
|
1717
|
+
};
|
|
1718
|
+
class $9cc1f3e534208f0b$export$e61ecabd2d29d9db {
|
|
1719
|
+
static createSimplePoint(color, radius = 5) {
|
|
1720
|
+
return new (0, $8zHUo$olstyle.Style)({
|
|
1721
|
+
image: new (0, $8zHUo$olstyle.Circle)({
|
|
1722
|
+
radius: radius,
|
|
1723
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
1724
|
+
color: color
|
|
1725
|
+
})
|
|
1726
|
+
})
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
static createSimpleLine(color, width = 2) {
|
|
1730
|
+
return new (0, $8zHUo$olstyle.Style)({
|
|
1731
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
1732
|
+
color: color,
|
|
1733
|
+
width: width
|
|
1734
|
+
})
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
1737
|
+
static createSimplePolygon(color, strokeWidth = 2, fillOpacity = 0.1) {
|
|
1738
|
+
if (fillOpacity == 0) return new (0, $8zHUo$olstyle.Style)({
|
|
1739
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
1740
|
+
width: strokeWidth,
|
|
1741
|
+
color: color
|
|
1742
|
+
})
|
|
1743
|
+
});
|
|
1744
|
+
const fc = (0, $8zHUo$olcolor.fromString)(color);
|
|
1745
|
+
if (fc.length === 3) fc.push(fillOpacity);
|
|
1746
|
+
else fc[3] = fillOpacity;
|
|
1747
|
+
return new (0, $8zHUo$olstyle.Style)({
|
|
1748
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
1749
|
+
width: strokeWidth,
|
|
1750
|
+
color: color,
|
|
1751
|
+
lineJoin: 'miter'
|
|
1752
|
+
}),
|
|
1753
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
1754
|
+
color: fc
|
|
1755
|
+
})
|
|
1756
|
+
});
|
|
1757
|
+
}
|
|
1758
|
+
static createStyleFromDef(def) {
|
|
1759
|
+
if (def.type == 'simple') switch(def.geomType){
|
|
1760
|
+
case 'Point':
|
|
1761
|
+
return $9cc1f3e534208f0b$var$createSimplePointStyle(def);
|
|
1762
|
+
case 'LineString':
|
|
1763
|
+
return $9cc1f3e534208f0b$var$createSimpleLineStyle(def);
|
|
1764
|
+
case 'Polygon':
|
|
1765
|
+
return $9cc1f3e534208f0b$var$createSimplePolygonStyle(def);
|
|
1766
|
+
default:
|
|
1767
|
+
break;
|
|
1768
|
+
}
|
|
1769
|
+
else if (def.type == 'unique') switch(def.geomType){
|
|
1770
|
+
case 'Point':
|
|
1771
|
+
return $9cc1f3e534208f0b$var$createUVPointStyle(def);
|
|
1772
|
+
case 'LineString':
|
|
1773
|
+
return $9cc1f3e534208f0b$var$createUVLineStyle(def);
|
|
1774
|
+
case 'Polygon':
|
|
1775
|
+
return $9cc1f3e534208f0b$var$createUVPolygonStyle(def);
|
|
1776
|
+
default:
|
|
1777
|
+
break;
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
static createFlashedStyles() {
|
|
1781
|
+
const color = $9cc1f3e534208f0b$export$e61ecabd2d29d9db.FlashColor;
|
|
1782
|
+
const map = new Map();
|
|
1783
|
+
map.set('Point', $9cc1f3e534208f0b$export$e61ecabd2d29d9db.createGlowedPoint(color));
|
|
1784
|
+
map.set('LineString', $9cc1f3e534208f0b$export$e61ecabd2d29d9db.createGlowedLine(color));
|
|
1785
|
+
map.set('Polygon', $9cc1f3e534208f0b$export$e61ecabd2d29d9db.createGlowedPolygon(color));
|
|
1786
|
+
return map;
|
|
1787
|
+
}
|
|
1788
|
+
static createHoverStyles() {
|
|
1789
|
+
const circleSize = 6;
|
|
1790
|
+
const lineSize = 4;
|
|
1791
|
+
const color = 'rgb(124, 207, 0)';
|
|
1792
|
+
const map = new Map();
|
|
1793
|
+
map.set('Point', $9cc1f3e534208f0b$export$e61ecabd2d29d9db.createSimplePoint(color, circleSize));
|
|
1794
|
+
map.set('LineString', $9cc1f3e534208f0b$export$e61ecabd2d29d9db.createSimpleLine(color, lineSize));
|
|
1795
|
+
map.set('Polygon', $9cc1f3e534208f0b$export$e61ecabd2d29d9db.createSimplePolygon(color, lineSize, 0.2));
|
|
1796
|
+
return map;
|
|
1797
|
+
}
|
|
1798
|
+
static createSelectionStyles() {
|
|
1799
|
+
const circleSize = 6;
|
|
1800
|
+
const lineSize = 4;
|
|
1801
|
+
const map = new Map();
|
|
1802
|
+
map.set('Point', $9cc1f3e534208f0b$export$e61ecabd2d29d9db.createSimplePoint($9cc1f3e534208f0b$export$e61ecabd2d29d9db.SelectionColor, circleSize));
|
|
1803
|
+
map.set('LineString', $9cc1f3e534208f0b$export$e61ecabd2d29d9db.createSimpleLine($9cc1f3e534208f0b$export$e61ecabd2d29d9db.SelectionColor, lineSize));
|
|
1804
|
+
map.set('Polygon', $9cc1f3e534208f0b$export$e61ecabd2d29d9db.createSimplePolygon($9cc1f3e534208f0b$export$e61ecabd2d29d9db.SelectionColor, lineSize, 0.2));
|
|
1805
|
+
return map;
|
|
1806
|
+
}
|
|
1807
|
+
static getSelectionSymbol() {
|
|
1808
|
+
const fc = (0, $8zHUo$olcolor.fromString)($9cc1f3e534208f0b$export$e61ecabd2d29d9db.SelectionColor);
|
|
1809
|
+
if (fc.length === 3) fc.push(0.5);
|
|
1810
|
+
else fc[3] = 0.5;
|
|
1811
|
+
return new (0, $8zHUo$olstyle.Style)({
|
|
1812
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
1813
|
+
color: $9cc1f3e534208f0b$export$e61ecabd2d29d9db.SelectionColor,
|
|
1814
|
+
width: 8
|
|
1815
|
+
}),
|
|
1816
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
1817
|
+
color: fc
|
|
1818
|
+
}),
|
|
1819
|
+
image: new (0, $8zHUo$olstyle.Circle)({
|
|
1820
|
+
radius: 12,
|
|
1821
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
1822
|
+
color: $9cc1f3e534208f0b$export$e61ecabd2d29d9db.SelectionColor
|
|
1823
|
+
})
|
|
1824
|
+
})
|
|
1825
|
+
});
|
|
1826
|
+
}
|
|
1827
|
+
static createCanvas(style, type) {
|
|
1828
|
+
const canvas = document.createElement('canvas');
|
|
1829
|
+
switch(type){
|
|
1830
|
+
case 'Point':
|
|
1831
|
+
{
|
|
1832
|
+
const width = 30;
|
|
1833
|
+
const height = 30;
|
|
1834
|
+
const vectorContext = (0, $8zHUo$olrender.toContext)(canvas.getContext('2d'), {
|
|
1835
|
+
size: [
|
|
1836
|
+
width,
|
|
1837
|
+
height
|
|
1838
|
+
]
|
|
1839
|
+
});
|
|
1840
|
+
vectorContext.setStyle(style);
|
|
1841
|
+
vectorContext.drawGeometry(new (0, ($parcel$interopDefault($8zHUo$olgeomPoint)))([
|
|
1842
|
+
width / 2,
|
|
1843
|
+
height / 2
|
|
1844
|
+
]));
|
|
1845
|
+
}
|
|
1846
|
+
break;
|
|
1847
|
+
case 'LineString':
|
|
1848
|
+
{
|
|
1849
|
+
const width = 30;
|
|
1850
|
+
const height = 30;
|
|
1851
|
+
const vectorContext = (0, $8zHUo$olrender.toContext)(canvas.getContext('2d'), {
|
|
1852
|
+
size: [
|
|
1853
|
+
width,
|
|
1854
|
+
height
|
|
1855
|
+
]
|
|
1856
|
+
});
|
|
1857
|
+
vectorContext.setStyle(style);
|
|
1858
|
+
vectorContext.drawGeometry(new (0, ($parcel$interopDefault($8zHUo$olgeomLineString)))([
|
|
1859
|
+
[
|
|
1860
|
+
0,
|
|
1861
|
+
height / 2
|
|
1862
|
+
],
|
|
1863
|
+
[
|
|
1864
|
+
width,
|
|
1865
|
+
height / 2
|
|
1866
|
+
]
|
|
1867
|
+
]));
|
|
1868
|
+
}
|
|
1869
|
+
break;
|
|
1870
|
+
case 'Polygon':
|
|
1871
|
+
{
|
|
1872
|
+
const width = 30;
|
|
1873
|
+
const height = 30;
|
|
1874
|
+
const vectorContext = (0, $8zHUo$olrender.toContext)(canvas.getContext('2d'), {
|
|
1875
|
+
size: [
|
|
1876
|
+
width,
|
|
1877
|
+
height
|
|
1878
|
+
]
|
|
1879
|
+
});
|
|
1880
|
+
vectorContext.setStyle(style);
|
|
1881
|
+
const ext = $8zHUo$olextent.boundingExtent([
|
|
1882
|
+
[
|
|
1883
|
+
3,
|
|
1884
|
+
3
|
|
1885
|
+
],
|
|
1886
|
+
[
|
|
1887
|
+
width - 3,
|
|
1888
|
+
height - 3
|
|
1889
|
+
]
|
|
1890
|
+
]);
|
|
1891
|
+
vectorContext.drawGeometry((0, $8zHUo$olgeomPolygon.fromExtent)(ext));
|
|
1892
|
+
}
|
|
1893
|
+
break;
|
|
1894
|
+
default:
|
|
1895
|
+
break;
|
|
1896
|
+
}
|
|
1897
|
+
return canvas;
|
|
1898
|
+
}
|
|
1899
|
+
static createCanvasFromFeature(style, feature, width = 100, height = 100) {
|
|
1900
|
+
const canvas = document.createElement('canvas');
|
|
1901
|
+
const vectorContext = (0, $8zHUo$olrender.toContext)(canvas.getContext('2d'), {
|
|
1902
|
+
size: [
|
|
1903
|
+
width,
|
|
1904
|
+
height
|
|
1905
|
+
]
|
|
1906
|
+
});
|
|
1907
|
+
vectorContext.setStyle(style);
|
|
1908
|
+
vectorContext.drawFeature(feature, style);
|
|
1909
|
+
return canvas;
|
|
1910
|
+
}
|
|
1911
|
+
static createGlowedLine(color, steps = 7) {
|
|
1912
|
+
const styles = [];
|
|
1913
|
+
let c = (0, $8zHUo$olcolor.fromString)(color);
|
|
1914
|
+
if (c.length > 3) c = [
|
|
1915
|
+
c[0],
|
|
1916
|
+
c[1],
|
|
1917
|
+
c[2]
|
|
1918
|
+
];
|
|
1919
|
+
for(let i = 0; i < steps; i++)styles.push(new (0, $8zHUo$olstyle.Style)({
|
|
1920
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
1921
|
+
color: c.concat([
|
|
1922
|
+
1 / (steps - i)
|
|
1923
|
+
]),
|
|
1924
|
+
width: (steps - i) * 2 - 1
|
|
1925
|
+
})
|
|
1926
|
+
}));
|
|
1927
|
+
return styles;
|
|
1928
|
+
}
|
|
1929
|
+
static createGlowedPoint(color, steps = 7) {
|
|
1930
|
+
const styles = [];
|
|
1931
|
+
let c = (0, $8zHUo$olcolor.fromString)(color);
|
|
1932
|
+
if (c.length > 3) c = [
|
|
1933
|
+
c[0],
|
|
1934
|
+
c[1],
|
|
1935
|
+
c[2]
|
|
1936
|
+
];
|
|
1937
|
+
for(let i = 0; i < steps; i++)styles.push(new (0, $8zHUo$olstyle.Style)({
|
|
1938
|
+
image: new (0, $8zHUo$olstyle.Circle)({
|
|
1939
|
+
radius: (steps - i) * 2 - 1,
|
|
1940
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
1941
|
+
color: c.concat([
|
|
1942
|
+
1 / (steps - i)
|
|
1943
|
+
])
|
|
1944
|
+
})
|
|
1945
|
+
})
|
|
1946
|
+
}));
|
|
1947
|
+
return styles;
|
|
1948
|
+
}
|
|
1949
|
+
static createGlowedPolygon(color, steps = 7) {
|
|
1950
|
+
const styles = [];
|
|
1951
|
+
let c = (0, $8zHUo$olcolor.fromString)(color);
|
|
1952
|
+
if (c.length > 3) c = [
|
|
1953
|
+
c[0],
|
|
1954
|
+
c[1],
|
|
1955
|
+
c[2]
|
|
1956
|
+
];
|
|
1957
|
+
styles.push(new (0, $8zHUo$olstyle.Style)({
|
|
1958
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
1959
|
+
color: c.concat([
|
|
1960
|
+
0.2
|
|
1961
|
+
])
|
|
1962
|
+
})
|
|
1963
|
+
}));
|
|
1964
|
+
for(let i = 1; i < steps; i++)styles.push(new (0, $8zHUo$olstyle.Style)({
|
|
1965
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
1966
|
+
color: c.concat([
|
|
1967
|
+
1 / (steps - i)
|
|
1968
|
+
]),
|
|
1969
|
+
width: (steps - i) * 2 - 1
|
|
1970
|
+
})
|
|
1971
|
+
}));
|
|
1972
|
+
return styles;
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
$9cc1f3e534208f0b$export$e61ecabd2d29d9db.DefaultSymbolNum = -9999;
|
|
1976
|
+
$9cc1f3e534208f0b$export$e61ecabd2d29d9db.SelectionColor = 'rgb(83, 234, 253)';
|
|
1977
|
+
$9cc1f3e534208f0b$export$e61ecabd2d29d9db.FlashColor = 'rgb(83, 234, 253)';
|
|
1978
|
+
function $9cc1f3e534208f0b$var$createText(li) {
|
|
1979
|
+
const color = (0, $8zHUo$olcolor.fromString)(li.textColor);
|
|
1980
|
+
const textStyle = new (0, $8zHUo$olstyle.Text)({
|
|
1981
|
+
font: `${li.textSize}px Roboto,sans-serif`,
|
|
1982
|
+
overflow: !!li.overflow,
|
|
1983
|
+
offsetY: li.offsetY | 0,
|
|
1984
|
+
offsetX: li.offsetX | 0,
|
|
1985
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
1986
|
+
color: color
|
|
1987
|
+
}),
|
|
1988
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
1989
|
+
color: '#fff',
|
|
1990
|
+
width: 4
|
|
1991
|
+
})
|
|
1992
|
+
});
|
|
1993
|
+
return textStyle;
|
|
1994
|
+
}
|
|
1995
|
+
function $9cc1f3e534208f0b$var$createSimplePointStyle(def) {
|
|
1996
|
+
const stroke = def.stroke ? new (0, $8zHUo$olstyle.Stroke)({
|
|
1997
|
+
color: def.stroke.color,
|
|
1998
|
+
width: def.stroke.size
|
|
1999
|
+
}) : null;
|
|
2000
|
+
const s = new (0, $8zHUo$olstyle.Style)({
|
|
2001
|
+
stroke: stroke
|
|
2002
|
+
});
|
|
2003
|
+
if (def.pointProps) {
|
|
2004
|
+
const fill = new (0, $8zHUo$olstyle.Fill)({
|
|
2005
|
+
color: def.color
|
|
2006
|
+
});
|
|
2007
|
+
switch(def.pointProps.shape){
|
|
2008
|
+
case 'circle':
|
|
2009
|
+
s.setImage(new (0, $8zHUo$olstyle.Circle)({
|
|
2010
|
+
radius: def.size,
|
|
2011
|
+
fill: fill,
|
|
2012
|
+
stroke: stroke
|
|
2013
|
+
}));
|
|
2014
|
+
break;
|
|
2015
|
+
case 'triangle':
|
|
2016
|
+
s.setImage(new (0, $8zHUo$olstyle.RegularShape)({
|
|
2017
|
+
points: 3,
|
|
2018
|
+
radius: def.size,
|
|
2019
|
+
fill: fill,
|
|
2020
|
+
stroke: stroke
|
|
2021
|
+
}));
|
|
2022
|
+
break;
|
|
2023
|
+
case 'square':
|
|
2024
|
+
s.setImage(new (0, $8zHUo$olstyle.RegularShape)({
|
|
2025
|
+
points: 4,
|
|
2026
|
+
radius: def.size,
|
|
2027
|
+
fill: fill,
|
|
2028
|
+
angle: Math.PI / 4,
|
|
2029
|
+
stroke: stroke
|
|
2030
|
+
}));
|
|
2031
|
+
break;
|
|
2032
|
+
case 'pentagon':
|
|
2033
|
+
s.setImage(new (0, $8zHUo$olstyle.RegularShape)({
|
|
2034
|
+
points: 5,
|
|
2035
|
+
radius: def.size,
|
|
2036
|
+
fill: fill,
|
|
2037
|
+
stroke: stroke
|
|
2038
|
+
}));
|
|
2039
|
+
break;
|
|
2040
|
+
case 'star':
|
|
2041
|
+
s.setImage(new (0, $8zHUo$olstyle.RegularShape)({
|
|
2042
|
+
points: 5,
|
|
2043
|
+
radius: def.size,
|
|
2044
|
+
radius2: def.size / 2,
|
|
2045
|
+
fill: fill,
|
|
2046
|
+
stroke: stroke
|
|
2047
|
+
}));
|
|
2048
|
+
break;
|
|
2049
|
+
case 'image':
|
|
2050
|
+
s.setImage(new (0, $8zHUo$olstyle.Icon)({
|
|
2051
|
+
anchor: def.pointProps.anchor,
|
|
2052
|
+
anchorXUnits: 'fraction',
|
|
2053
|
+
anchorYUnits: 'fraction',
|
|
2054
|
+
src: def.pointProps.src,
|
|
2055
|
+
height: def.pointProps.height,
|
|
2056
|
+
width: def.pointProps.width,
|
|
2057
|
+
offset: def.pointProps.offset
|
|
2058
|
+
}));
|
|
2059
|
+
break;
|
|
2060
|
+
default:
|
|
2061
|
+
break;
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
if (def.labelDef) s.setText($9cc1f3e534208f0b$var$createText(def.labelDef));
|
|
2065
|
+
return s;
|
|
2066
|
+
}
|
|
2067
|
+
function $9cc1f3e534208f0b$var$createSimpleLineStyle(def) {
|
|
2068
|
+
return new (0, $8zHUo$olstyle.Style)({
|
|
2069
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
2070
|
+
width: def.size,
|
|
2071
|
+
color: def.color
|
|
2072
|
+
})
|
|
2073
|
+
});
|
|
2074
|
+
}
|
|
2075
|
+
function $9cc1f3e534208f0b$var$createSimplePolygonStyle(def) {
|
|
2076
|
+
let strokeColor = (0, $8zHUo$olcolor.fromString)(def.color);
|
|
2077
|
+
let fillColor = (0, $8zHUo$olcolor.fromString)(def.color);
|
|
2078
|
+
let strokeSize = 3;
|
|
2079
|
+
if (def.stroke) {
|
|
2080
|
+
strokeColor = (0, $8zHUo$olcolor.fromString)(def.stroke.color);
|
|
2081
|
+
strokeSize = def.stroke.size;
|
|
2082
|
+
} else fillColor = $9cc1f3e534208f0b$var$setAlpha(fillColor, 0.1);
|
|
2083
|
+
const s = new (0, $8zHUo$olstyle.Style)({
|
|
2084
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
2085
|
+
width: strokeSize,
|
|
2086
|
+
color: strokeColor
|
|
2087
|
+
}),
|
|
2088
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
2089
|
+
color: fillColor
|
|
2090
|
+
})
|
|
2091
|
+
});
|
|
2092
|
+
if (def.labelDef) s.setText($9cc1f3e534208f0b$var$createText(def.labelDef));
|
|
2093
|
+
return s;
|
|
2094
|
+
}
|
|
2095
|
+
function $9cc1f3e534208f0b$var$createUVPointStyle(def) {
|
|
2096
|
+
const map = new Map();
|
|
2097
|
+
for (const uv of def.values)map.set(uv.st, $9cc1f3e534208f0b$var$createSimplePointStyle(uv.symbol));
|
|
2098
|
+
return map;
|
|
2099
|
+
}
|
|
2100
|
+
function $9cc1f3e534208f0b$var$createUVLineStyle(def) {
|
|
2101
|
+
const map = new Map();
|
|
2102
|
+
for (const uv of def.values)map.set(uv.st, $9cc1f3e534208f0b$var$createSimpleLineStyle(uv.symbol));
|
|
2103
|
+
return map;
|
|
2104
|
+
}
|
|
2105
|
+
function $9cc1f3e534208f0b$var$createUVPolygonStyle(def) {
|
|
2106
|
+
const map = new Map();
|
|
2107
|
+
for (const uv of def.values)map.set(uv.st, $9cc1f3e534208f0b$var$createSimplePolygonStyle(uv.symbol));
|
|
2108
|
+
return map;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
|
|
2112
|
+
function $9e9fe0098715b2dd$export$901d0a0c97b4d88a(layer) {
|
|
2113
|
+
return layer.getProperties();
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
var $69345a20bc0f2569$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
2120
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2121
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2122
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2123
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2124
|
+
};
|
|
2125
|
+
var $69345a20bc0f2569$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
2126
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2127
|
+
};
|
|
2128
|
+
let $69345a20bc0f2569$export$a67c77aa289f97c1 = class FeatureContextMenuComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
2129
|
+
constructor(_loc, items, action, isGlass){
|
|
2130
|
+
super();
|
|
2131
|
+
this._loc = _loc;
|
|
2132
|
+
this.action = action;
|
|
2133
|
+
this.isGlass = isGlass;
|
|
2134
|
+
this._closeHandler = 0;
|
|
2135
|
+
const arr = this._groupItems(items);
|
|
2136
|
+
for(let i = 0; i < arr.length; i++){
|
|
2137
|
+
const kvp = arr[i];
|
|
2138
|
+
this.appendChild((0, $8zHUo$yesilyazilimwebspa.ELF).span(kvp.title, 'GroupTitle'));
|
|
2139
|
+
for (const item of kvp.items)this.appendChild(new $69345a20bc0f2569$var$ContextMenuItemComponent(this, item));
|
|
2140
|
+
if (i < arr.length - 1) this.appendChild((0, $8zHUo$yesilyazilimwebspa.ELF).div('Seperator'));
|
|
2141
|
+
}
|
|
2142
|
+
if (isGlass) this.classList.add("glass");
|
|
2143
|
+
}
|
|
2144
|
+
setActive(key, value) {}
|
|
2145
|
+
setDisabled(key, value) {}
|
|
2146
|
+
onConnected() {
|
|
2147
|
+
this.style.top = this._loc.y + 'px';
|
|
2148
|
+
this.style.left = this._loc.x + 'px';
|
|
2149
|
+
this.addEventListener('mouseleave', ()=>{
|
|
2150
|
+
this._closeHandler = setTimeout(()=>{
|
|
2151
|
+
this._closeHandler = 0;
|
|
2152
|
+
this.remove();
|
|
2153
|
+
}, 200);
|
|
2154
|
+
});
|
|
2155
|
+
this.addEventListener('mouseenter', ()=>{
|
|
2156
|
+
if (this._closeHandler) {
|
|
2157
|
+
clearTimeout(this._closeHandler);
|
|
2158
|
+
this._closeHandler = 0;
|
|
2159
|
+
}
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
onItemMouseEnter(child) {
|
|
2163
|
+
this.action('enter', child.item);
|
|
2164
|
+
}
|
|
2165
|
+
onItemMouseLeave(child) {
|
|
2166
|
+
this.action('leave', child.item);
|
|
2167
|
+
}
|
|
2168
|
+
onItemMouseClick(child) {
|
|
2169
|
+
this.action('leave', child.item);
|
|
2170
|
+
this.action('click', child.item);
|
|
2171
|
+
this.remove();
|
|
2172
|
+
}
|
|
2173
|
+
_groupItems(items) {
|
|
2174
|
+
const map = new Map();
|
|
2175
|
+
for (const item of items){
|
|
2176
|
+
const gkey = item.group || '';
|
|
2177
|
+
let garr = map.get(gkey);
|
|
2178
|
+
if (!garr) {
|
|
2179
|
+
garr = [];
|
|
2180
|
+
map.set(gkey, garr);
|
|
2181
|
+
}
|
|
2182
|
+
garr.push(item);
|
|
2183
|
+
}
|
|
2184
|
+
const arr = [];
|
|
2185
|
+
map.forEach((v, k)=>{
|
|
2186
|
+
arr.push({
|
|
2187
|
+
title: k,
|
|
2188
|
+
items: v
|
|
2189
|
+
});
|
|
2190
|
+
});
|
|
2191
|
+
return arr;
|
|
2192
|
+
}
|
|
2193
|
+
};
|
|
2194
|
+
$69345a20bc0f2569$export$a67c77aa289f97c1 = $69345a20bc0f2569$var$__decorate([
|
|
2195
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
2196
|
+
elementName: 'map-feat-cm'
|
|
2197
|
+
}),
|
|
2198
|
+
$69345a20bc0f2569$var$__metadata("design:paramtypes", [
|
|
2199
|
+
Object,
|
|
2200
|
+
Array,
|
|
2201
|
+
Object,
|
|
2202
|
+
Boolean
|
|
2203
|
+
])
|
|
2204
|
+
], $69345a20bc0f2569$export$a67c77aa289f97c1);
|
|
2205
|
+
let $69345a20bc0f2569$var$ContextMenuItemComponent = class ContextMenuItemComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
2206
|
+
constructor(menu, item){
|
|
2207
|
+
super();
|
|
2208
|
+
this.menu = menu;
|
|
2209
|
+
this.item = item;
|
|
2210
|
+
this.addEventListener('mouseenter', ()=>{
|
|
2211
|
+
this.menu.onItemMouseEnter(this);
|
|
2212
|
+
});
|
|
2213
|
+
this.addEventListener('mouseleave', ()=>{
|
|
2214
|
+
this.menu.onItemMouseLeave(this);
|
|
2215
|
+
});
|
|
2216
|
+
this.addEventListener('click', ()=>{
|
|
2217
|
+
this.menu.onItemMouseClick(this);
|
|
2218
|
+
});
|
|
2219
|
+
if (item.iconClass) {
|
|
2220
|
+
const iconElm = (0, $8zHUo$yesilyazilimwebspa.ELF).icon("cm-icon " + item.iconClass);
|
|
2221
|
+
this.appendChild(iconElm);
|
|
2222
|
+
}
|
|
2223
|
+
this.appendChild((0, $8zHUo$yesilyazilimwebspa.ELF).label(item.title, "cm-title"));
|
|
2224
|
+
}
|
|
2225
|
+
};
|
|
2226
|
+
$69345a20bc0f2569$var$ContextMenuItemComponent = $69345a20bc0f2569$var$__decorate([
|
|
2227
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
2228
|
+
elementName: 'map-feat-cm-item'
|
|
2229
|
+
}),
|
|
2230
|
+
$69345a20bc0f2569$var$__metadata("design:paramtypes", [
|
|
2231
|
+
$69345a20bc0f2569$export$a67c77aa289f97c1,
|
|
2232
|
+
Object
|
|
2233
|
+
])
|
|
2234
|
+
], $69345a20bc0f2569$var$ContextMenuItemComponent);
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
|
|
2238
|
+
var $e2e9872d2858bcde$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
2239
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2240
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2241
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2242
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2243
|
+
};
|
|
2244
|
+
var $e2e9872d2858bcde$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
2245
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2246
|
+
};
|
|
2247
|
+
var $e2e9872d2858bcde$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
2248
|
+
function adopt(value) {
|
|
2249
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
2250
|
+
resolve(value);
|
|
2251
|
+
});
|
|
2252
|
+
}
|
|
2253
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
2254
|
+
function fulfilled(value) {
|
|
2255
|
+
try {
|
|
2256
|
+
step(generator.next(value));
|
|
2257
|
+
} catch (e) {
|
|
2258
|
+
reject(e);
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
function rejected(value) {
|
|
2262
|
+
try {
|
|
2263
|
+
step(generator["throw"](value));
|
|
2264
|
+
} catch (e) {
|
|
2265
|
+
reject(e);
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
function step(result) {
|
|
2269
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
2270
|
+
}
|
|
2271
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2272
|
+
});
|
|
2273
|
+
};
|
|
2274
|
+
var $e2e9872d2858bcde$var$_a, $e2e9872d2858bcde$var$_b;
|
|
2275
|
+
const $e2e9872d2858bcde$var$LO_SELECTION = 10000;
|
|
2276
|
+
const $e2e9872d2858bcde$var$LO_FLASH = 10020;
|
|
2277
|
+
let $e2e9872d2858bcde$export$c521bb0b406df9a3 = class MapManager {
|
|
2278
|
+
constructor(){
|
|
2279
|
+
this._activeDraw = null;
|
|
2280
|
+
this._selectionDict = new Map();
|
|
2281
|
+
this._animations = new Map();
|
|
2282
|
+
this._animationHandler = 0;
|
|
2283
|
+
this.commandDisplayer = new $e2e9872d2858bcde$var$CmxCommandDisplayer();
|
|
2284
|
+
this._onGotoExtendRequested = (ed)=>{
|
|
2285
|
+
return new Promise((resolve, reject)=>{
|
|
2286
|
+
this._view.fit(ed.extent, {
|
|
2287
|
+
maxZoom: 20,
|
|
2288
|
+
duration: 300,
|
|
2289
|
+
callback: (isOk)=>{
|
|
2290
|
+
resolve(isOk);
|
|
2291
|
+
}
|
|
2292
|
+
});
|
|
2293
|
+
});
|
|
2294
|
+
};
|
|
2295
|
+
this._onFlashGeomRequested = (ed)=>{
|
|
2296
|
+
return this.flash(ed);
|
|
2297
|
+
};
|
|
2298
|
+
this._completed = true;
|
|
2299
|
+
this._animator = ()=>{
|
|
2300
|
+
if (this._animationHandler == 0) return;
|
|
2301
|
+
if (!this._completed) return;
|
|
2302
|
+
this._completed = false;
|
|
2303
|
+
const zoom = this.zoom;
|
|
2304
|
+
for (const animation of this._animations.values())if (zoom >= animation.minZoom && animation.layer.checked && !animation.layer.passive) {
|
|
2305
|
+
animation.animateFunction();
|
|
2306
|
+
animation.layer.layerObj.changed();
|
|
2307
|
+
}
|
|
2308
|
+
this._completed = true;
|
|
2309
|
+
};
|
|
2310
|
+
}
|
|
2311
|
+
init(map, view, popupDiv) {
|
|
2312
|
+
if (this._map) return;
|
|
2313
|
+
this._map = map;
|
|
2314
|
+
this._view = view;
|
|
2315
|
+
this._popupDiv = popupDiv;
|
|
2316
|
+
this._initPopup();
|
|
2317
|
+
this._selectionLayer = new (0, ($parcel$interopDefault($8zHUo$ollayerVector)))({
|
|
2318
|
+
source: new (0, ($parcel$interopDefault($8zHUo$olsourceVector)))(),
|
|
2319
|
+
style: (0, $9cc1f3e534208f0b$export$e61ecabd2d29d9db).getSelectionSymbol(),
|
|
2320
|
+
zIndex: $e2e9872d2858bcde$var$LO_SELECTION,
|
|
2321
|
+
map: this._map
|
|
2322
|
+
});
|
|
2323
|
+
this._flashLayer = new (0, ($parcel$interopDefault($8zHUo$ollayerVector)))({
|
|
2324
|
+
source: new (0, ($parcel$interopDefault($8zHUo$olsourceVector)))(),
|
|
2325
|
+
style: this._getFlashSymbol(),
|
|
2326
|
+
zIndex: $e2e9872d2858bcde$var$LO_FLASH,
|
|
2327
|
+
map: this._map
|
|
2328
|
+
});
|
|
2329
|
+
this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapGotoExtentRequest, this._onGotoExtendRequested);
|
|
2330
|
+
this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapFlashGeomRequest, this._onFlashGeomRequested);
|
|
2331
|
+
}
|
|
2332
|
+
get map() {
|
|
2333
|
+
return this._map;
|
|
2334
|
+
}
|
|
2335
|
+
get view() {
|
|
2336
|
+
return this._view;
|
|
2337
|
+
}
|
|
2338
|
+
get zoom() {
|
|
2339
|
+
return Math.trunc(this._view.getZoom());
|
|
2340
|
+
}
|
|
2341
|
+
startDraw(draw) {
|
|
2342
|
+
this.cancelDraw();
|
|
2343
|
+
this._activeDraw = draw;
|
|
2344
|
+
this._map.addInteraction(this._activeDraw);
|
|
2345
|
+
}
|
|
2346
|
+
cancelDraw() {
|
|
2347
|
+
if (this._activeDraw) {
|
|
2348
|
+
if (this._activeDraw.getActive()) this._activeDraw.abortDrawing();
|
|
2349
|
+
this._map.removeInteraction(this._activeDraw);
|
|
2350
|
+
}
|
|
2351
|
+
this._activeDraw = null;
|
|
2352
|
+
}
|
|
2353
|
+
setSelectedFeatures(dict) {
|
|
2354
|
+
this._selectionLayer.getSource().clear();
|
|
2355
|
+
for (const layer of this._selectionDict.keys())if (layer.setFeaturesSelected) layer.setFeaturesSelected([]);
|
|
2356
|
+
this._selectionDict.clear();
|
|
2357
|
+
if (!(dict && dict.size > 0)) return;
|
|
2358
|
+
const cloneFeat = (layer, feat)=>{
|
|
2359
|
+
const copy = new (0, $8zHUo$ol.Feature)(feat.getGeometry());
|
|
2360
|
+
return copy;
|
|
2361
|
+
};
|
|
2362
|
+
const selLayerFeats = [];
|
|
2363
|
+
for (const layer of dict.keys()){
|
|
2364
|
+
const features = dict.get(layer);
|
|
2365
|
+
if (layer.setFeaturesSelected) layer.setFeaturesSelected(features);
|
|
2366
|
+
else {
|
|
2367
|
+
const feats = features.map((_)=>cloneFeat(layer, _));
|
|
2368
|
+
selLayerFeats.push(...feats);
|
|
2369
|
+
}
|
|
2370
|
+
this._selectionDict.set(layer, features);
|
|
2371
|
+
}
|
|
2372
|
+
debugger;
|
|
2373
|
+
this._selectionLayer.getSource().addFeatures(selLayerFeats);
|
|
2374
|
+
}
|
|
2375
|
+
showPopup(at, content) {
|
|
2376
|
+
if (!(at && content)) {
|
|
2377
|
+
this._popup.setPosition(undefined);
|
|
2378
|
+
return;
|
|
2379
|
+
}
|
|
2380
|
+
const contentDiv = this._popupDiv.querySelector('.popup-content');
|
|
2381
|
+
if (contentDiv) {
|
|
2382
|
+
contentDiv.innerHTML = '';
|
|
2383
|
+
contentDiv.appendChild(content);
|
|
2384
|
+
}
|
|
2385
|
+
this._popup.setPosition(at);
|
|
2386
|
+
}
|
|
2387
|
+
startAnimate(key, animation) {
|
|
2388
|
+
this._animations.set(key, animation);
|
|
2389
|
+
this._beginAnimate();
|
|
2390
|
+
}
|
|
2391
|
+
endAnimate(key) {
|
|
2392
|
+
if (this._animations.delete(key) && this._animations.size == 0) this._endAnimate();
|
|
2393
|
+
}
|
|
2394
|
+
hasAnimate(key) {
|
|
2395
|
+
return this._animations.has(key);
|
|
2396
|
+
}
|
|
2397
|
+
stopAnimations() {
|
|
2398
|
+
this._endAnimate();
|
|
2399
|
+
this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).DisableAnimations, null);
|
|
2400
|
+
return new Promise((resolve)=>{
|
|
2401
|
+
setTimeout(()=>{
|
|
2402
|
+
requestAnimationFrame(()=>{
|
|
2403
|
+
resolve();
|
|
2404
|
+
});
|
|
2405
|
+
}, 50);
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
resumeAnimation() {
|
|
2409
|
+
this._beginAnimate();
|
|
2410
|
+
}
|
|
2411
|
+
changeCursor(cursor = '') {
|
|
2412
|
+
this.map.getTargetElement().style.cursor = cursor;
|
|
2413
|
+
}
|
|
2414
|
+
getOneFeatureAt(pixel, opt) {
|
|
2415
|
+
return $e2e9872d2858bcde$var$__awaiter(this, void 0, void 0, function*() {
|
|
2416
|
+
const contents = [];
|
|
2417
|
+
const forEachFeatureCallback = (feature, layer)=>{
|
|
2418
|
+
var _a;
|
|
2419
|
+
if (opt.featureFilter) {
|
|
2420
|
+
if (!opt.featureFilter(feature)) return;
|
|
2421
|
+
}
|
|
2422
|
+
const mapLayer = (_a = (0, $9e9fe0098715b2dd$export$901d0a0c97b4d88a)(layer)) === null || _a === void 0 ? void 0 : _a.mapLayer;
|
|
2423
|
+
if (!(layer && (mapLayer === null || mapLayer === void 0 ? void 0 : mapLayer.getFeatureTitle))) return;
|
|
2424
|
+
const title = mapLayer.getFeatureTitle(feature);
|
|
2425
|
+
if (title && contents.findIndex((old)=>old.layer === layer && old.feature.getId() === feature.getId()) < 0) contents.push({
|
|
2426
|
+
feature: feature,
|
|
2427
|
+
layer: layer,
|
|
2428
|
+
mapLayer: mapLayer,
|
|
2429
|
+
title: title,
|
|
2430
|
+
iconClass: 'bi bi-caret-right-fill'
|
|
2431
|
+
});
|
|
2432
|
+
};
|
|
2433
|
+
this.map.forEachFeatureAtPixel(pixel, forEachFeatureCallback, opt);
|
|
2434
|
+
if (contents && contents.length > 0) {
|
|
2435
|
+
if (contents.length === 1) return Promise.resolve(contents[0]);
|
|
2436
|
+
else return new Promise((resolve)=>{
|
|
2437
|
+
const cmdAction = function(action, item) {
|
|
2438
|
+
var _a, _b;
|
|
2439
|
+
if (action == 'enter') {
|
|
2440
|
+
const maplayer = (_a = (0, $9e9fe0098715b2dd$export$901d0a0c97b4d88a)(item.layer)) === null || _a === void 0 ? void 0 : _a.mapLayer;
|
|
2441
|
+
if (maplayer === null || maplayer === void 0 ? void 0 : maplayer.flashFeatures) maplayer.flashFeatures(item.feature);
|
|
2442
|
+
} else if (action == 'leave') {
|
|
2443
|
+
const maplayer = (_b = (0, $9e9fe0098715b2dd$export$901d0a0c97b4d88a)(item.layer)) === null || _b === void 0 ? void 0 : _b.mapLayer;
|
|
2444
|
+
if (maplayer === null || maplayer === void 0 ? void 0 : maplayer.flashFeatures) maplayer.flashFeatures(null);
|
|
2445
|
+
} else if (action == 'click') resolve(item);
|
|
2446
|
+
};
|
|
2447
|
+
this.showContextMenuAt(opt.menux, opt.menuy, contents, cmdAction, true);
|
|
2448
|
+
});
|
|
2449
|
+
}
|
|
2450
|
+
return Promise.resolve(null);
|
|
2451
|
+
});
|
|
2452
|
+
}
|
|
2453
|
+
showContextMenuAt(pageX, pageY, items, itemAction, isGlass) {
|
|
2454
|
+
return $e2e9872d2858bcde$var$__awaiter(this, void 0, void 0, function*() {
|
|
2455
|
+
const te = this.map.getTargetElement();
|
|
2456
|
+
const rect = te.getBoundingClientRect();
|
|
2457
|
+
const loc = {
|
|
2458
|
+
x: pageX - rect.x,
|
|
2459
|
+
y: pageY - rect.y
|
|
2460
|
+
};
|
|
2461
|
+
const cm = new (0, $69345a20bc0f2569$export$a67c77aa289f97c1)(loc, items, itemAction, isGlass);
|
|
2462
|
+
this.commandDisplayer.setCmx(cm);
|
|
2463
|
+
te.appendChild(cm);
|
|
2464
|
+
});
|
|
2465
|
+
}
|
|
2466
|
+
goto(coordinate) {
|
|
2467
|
+
this._view.fit(new (0, $8zHUo$olgeom.Point)(coordinate), {
|
|
2468
|
+
maxZoom: 20,
|
|
2469
|
+
duration: 300
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
gotoFly(location) {
|
|
2473
|
+
const view = this._view;
|
|
2474
|
+
const duration = 2000;
|
|
2475
|
+
const zoom = view.getZoom();
|
|
2476
|
+
let parts = 2;
|
|
2477
|
+
let called = false;
|
|
2478
|
+
return new Promise((resolve)=>{
|
|
2479
|
+
function callback(complete) {
|
|
2480
|
+
--parts;
|
|
2481
|
+
if (called) return;
|
|
2482
|
+
if (parts === 0 || !complete) {
|
|
2483
|
+
called = true;
|
|
2484
|
+
resolve(complete);
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
view.animate({
|
|
2488
|
+
center: location,
|
|
2489
|
+
duration: duration
|
|
2490
|
+
}, callback);
|
|
2491
|
+
view.animate({
|
|
2492
|
+
zoom: zoom - 1,
|
|
2493
|
+
duration: duration / 2
|
|
2494
|
+
}, {
|
|
2495
|
+
zoom: zoom,
|
|
2496
|
+
duration: duration / 2
|
|
2497
|
+
}, callback);
|
|
2498
|
+
});
|
|
2499
|
+
}
|
|
2500
|
+
flash(ed) {
|
|
2501
|
+
return new Promise((resolve, reject)=>{
|
|
2502
|
+
const src = this._flashLayer.getSource();
|
|
2503
|
+
if (!ed.keepExist) src.clear();
|
|
2504
|
+
if (ed.geom) {
|
|
2505
|
+
const feat = new (0, $8zHUo$ol.Feature)(ed.geom);
|
|
2506
|
+
src.addFeature(feat);
|
|
2507
|
+
if (!ed.skipZoom) this._view.fit(ed.geom.getExtent(), {
|
|
2508
|
+
maxZoom: 25,
|
|
2509
|
+
duration: 200
|
|
2510
|
+
});
|
|
2511
|
+
let cnt = 0;
|
|
2512
|
+
const timerKey = setInterval(()=>{
|
|
2513
|
+
if (cnt > 3) clearInterval(timerKey);
|
|
2514
|
+
if (cnt % 2 == 0) src.removeFeature(feat);
|
|
2515
|
+
else src.addFeature(feat);
|
|
2516
|
+
cnt++;
|
|
2517
|
+
}, 300);
|
|
2518
|
+
}
|
|
2519
|
+
});
|
|
2520
|
+
}
|
|
2521
|
+
flashGeom(geom) {
|
|
2522
|
+
this.flash({
|
|
2523
|
+
geom: geom
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2526
|
+
flashGeojson(gjs) {
|
|
2527
|
+
if (!gjs) return;
|
|
2528
|
+
const geom = (0, $10571313f00c012e$export$4691a8a9ff232a6b).fromGeojson(gjs);
|
|
2529
|
+
if (!geom) return;
|
|
2530
|
+
this.flash({
|
|
2531
|
+
geom: geom
|
|
2532
|
+
});
|
|
2533
|
+
}
|
|
2534
|
+
_initPopup() {
|
|
2535
|
+
this._popup = new (0, $8zHUo$ol.Overlay)({
|
|
2536
|
+
element: this._popupDiv,
|
|
2537
|
+
autoPan: {
|
|
2538
|
+
animation: {
|
|
2539
|
+
duration: 250
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
});
|
|
2543
|
+
this._map.addOverlay(this._popup);
|
|
2544
|
+
const closer = this._popupDiv.querySelector('.ol-popup-closer');
|
|
2545
|
+
closer === null || closer === void 0 || closer.addEventListener('click', ()=>{
|
|
2546
|
+
this._popup.setPosition(undefined);
|
|
2547
|
+
closer.blur();
|
|
2548
|
+
return false;
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
_getFlashSymbol() {
|
|
2552
|
+
const fs = (0, $9cc1f3e534208f0b$export$e61ecabd2d29d9db).createFlashedStyles();
|
|
2553
|
+
const arr = [];
|
|
2554
|
+
const cnt = fs.get('Point').length;
|
|
2555
|
+
const ps = fs.get('Point');
|
|
2556
|
+
const ls = fs.get('LineString');
|
|
2557
|
+
const gs = fs.get('Polygon');
|
|
2558
|
+
for(let i = 0; i < cnt; i++){
|
|
2559
|
+
const ts = new (0, $8zHUo$olstyle.Style)({
|
|
2560
|
+
stroke: ls[i].getStroke(),
|
|
2561
|
+
fill: gs[i].getFill(),
|
|
2562
|
+
image: ps[i].getImage()
|
|
2563
|
+
});
|
|
2564
|
+
arr.push(ts);
|
|
2565
|
+
}
|
|
2566
|
+
return arr;
|
|
2567
|
+
}
|
|
2568
|
+
_beginAnimate() {
|
|
2569
|
+
if (this._animationHandler > 0 || this._animations.size == 0) return;
|
|
2570
|
+
this._animationHandler = setInterval(this._animator, 30);
|
|
2571
|
+
}
|
|
2572
|
+
_endAnimate() {
|
|
2573
|
+
if (this._animationHandler > 0) clearInterval(this._animationHandler);
|
|
2574
|
+
this._animationHandler = 0;
|
|
2575
|
+
}
|
|
2576
|
+
};
|
|
2577
|
+
$e2e9872d2858bcde$var$__decorate([
|
|
2578
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
2579
|
+
$e2e9872d2858bcde$var$__metadata("design:type", typeof ($e2e9872d2858bcde$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $e2e9872d2858bcde$var$_a : Object)
|
|
2580
|
+
], $e2e9872d2858bcde$export$c521bb0b406df9a3.prototype, "eventService", void 0);
|
|
2581
|
+
$e2e9872d2858bcde$var$__decorate([
|
|
2582
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
2583
|
+
$e2e9872d2858bcde$var$__metadata("design:type", typeof ($e2e9872d2858bcde$var$_b = typeof (0, $8zHUo$yesilyazilimwebspa.CommandService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.CommandService)) === "function" ? $e2e9872d2858bcde$var$_b : Object)
|
|
2584
|
+
], $e2e9872d2858bcde$export$c521bb0b406df9a3.prototype, "commandService", void 0);
|
|
2585
|
+
$e2e9872d2858bcde$export$c521bb0b406df9a3 = $e2e9872d2858bcde$var$__decorate([
|
|
2586
|
+
(0, $8zHUo$yesilyazilimwebspa.Service)()
|
|
2587
|
+
], $e2e9872d2858bcde$export$c521bb0b406df9a3);
|
|
2588
|
+
class $e2e9872d2858bcde$var$CmxCommandDisplayer {
|
|
2589
|
+
setCmx(comp) {
|
|
2590
|
+
this._comp = comp;
|
|
2591
|
+
}
|
|
2592
|
+
setActive(key, value) {
|
|
2593
|
+
var _a;
|
|
2594
|
+
(_a = this._comp) === null || _a === void 0 || _a.setActive(key, value);
|
|
2595
|
+
}
|
|
2596
|
+
setDisabled(key, value) {
|
|
2597
|
+
var _a;
|
|
2598
|
+
(_a = this._comp) === null || _a === void 0 || _a.setDisabled(key, value);
|
|
2599
|
+
}
|
|
2600
|
+
isExist() {
|
|
2601
|
+
var _a;
|
|
2602
|
+
return ((_a = this._comp) === null || _a === void 0 ? void 0 : _a.isExist()) || false;
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
|
|
2607
|
+
var $a93fef52f234fd9d$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
2608
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2609
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2610
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2611
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2612
|
+
};
|
|
2613
|
+
var $a93fef52f234fd9d$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
2614
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2615
|
+
};
|
|
2616
|
+
var $a93fef52f234fd9d$var$_a;
|
|
2617
|
+
const $a93fef52f234fd9d$var$MapIconData = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFNUlEQVR4nNWZW2wUVRjHj5cYozExJuqLRt80MfFJY2Ji9MFHhOzMnEUFhEAEJFFIDAQM2qReQrxA0M6cGUqhLJfaQoUEFWgad3fOdAulthRautpCKbS0Xcr2st1u5/qZMw0kptJ06k5n95ec9/nlXL7v+w9Ceaa9Bj+kEv62KvHwv5fI16GgiBE+3FixwjQmemC85zCMdO70vK5rn0Nc5B1N5l8JTESTcXSwvdoGZwogfQQgfdDzaqtZZ2gE1wYmESVLno9LvGPlBgByl+clke74nh0rO6pwLwYmoopcacfJz3RgjJ2ch0gEmg+t0qkk7AlMoqYGP0BlYTBzsxHATM1rN4ZavwGV8Hp0d+iZwERUiV9E5aU22DmAbKNnCWc4Amf3L9epxO1AQUJlfLKvpdICxwQY+dmzSP+5UqBEmEiU4ycCk6gvf+dpVeIsc6IXYKrLs4SVqoTE3vd0VeS2oCCJS9zW1tpNOoADMH7Ks0gv3Q5UwbealUWPBCYBgO7TCO4dux4FsEY8SxgDFaDtCRtqGf8hChJK+LcowY5jZQCy5z2LdNdvcaiCe6Ilbz4YtEjVtbPEBLABRmo8Sej95UAJttSykBCoRHTXksdVidf1sb8B9B7Pu5E8tcmiMm5jxzNQEVUMfdx0eL3h7kam3pPEZC9hxc+mEvc2Chqq4MvpK6cB7AxA+pAnkfYTG0xNDseCdkAxMfSqKgrgmKMAkxc8SYx3/+i26WoZ/1rQHkglfHl37AfTrR2jtZ5E2o6uDbZNv8OZ75Y/qhIhm0tfAjD65tOmgyqGNrD7MZfV7FehpBK/+uyBVYbbV2ViHkQi0FK12tO4G5d4xRcJV0TB51Odxx23000f9vzszqXan6tcoVOCz/hWKNnkxi6qracAcu15l7BvVcKfVWt0Vl/YEUZ+EZe4ncm6L6enwNETeZVwbkfcZ5kquI911L5JsKiHEjyaTTUDmIN5342uuk9tKgtjmoRfQH4SF7mliYplJjg6wISWV4lebbvDxty4yL+O/EaTw9GBi1U2OAbASFXeJFIXdrjtSkzkuQWMevoBppJ5kxhN7nI74JjIbUQLFfUk9i2zx/soDLTshhsNX8y+EiXgZJtnjYUmrorQoIRNKgk7F0SCoRKuUtuzVJvLUgmfuZYg9vSMcvSes0jjvvd1TRJqoaTkflRoqLvxk5QIppG5cs8ZxRraD+cPrdI1GTdG9698GBUicZHb1lKz0ZgOIk7PrBXDEbh4bL1BFdwdaPQzG+yIUFnoZ/cIrPR/7EYEkr9vsijBw+zxQIWKejdtnATInpshcjW2zVGJMFUQc8hsaBKu62+NWNN15t9p40DzV27KHpNCi1Eh01DGPcc+1JqcWWfcGYTwtipxH6FCJy5xOzp+2z7jl0Km+yfQZGyqhCtFhU47ayZlPJIdYs3k0F2J3HUFEhXvGpokVAce+cyFOBGWNVasNN27MUFdCXOwApoOfKBrCqZMFBUDlOCmocu1DjhsYjwC9vABaK1eY2gy/ouFeKgYoGX8S9MT4zBA7pJbKzp//cSkMk7FxSXPomKBEl7p+uPb6Uo+ehy66zezWpFVRf5lVCxoexc/phJ+cirdAWDcgJtNpcB++BREDOoFlk01HVxrgGPB+LVjd2rFClRsUAUnWfZr5W4ClcMWlfBWVGzEJP6NOBEc9t+w6eA6XZXxXlSMqLJQnaz/2mr7ZbPha5DmJw1S6Ck2PGlyGKiMW30N0vwenlgu63uQ5vvwpOC+BQnSkI+w4SkucZMLEqR54B93ht9yYcxvPgAAAABJRU5ErkJggg==";
|
|
2618
|
+
const $a93fef52f234fd9d$var$Ld = {
|
|
2619
|
+
key: 'flashLayer',
|
|
2620
|
+
order: 500,
|
|
2621
|
+
props: {
|
|
2622
|
+
factoryKey: 'flashLayer'
|
|
2623
|
+
},
|
|
2624
|
+
title: 'FlashLayer',
|
|
2625
|
+
type: (0, $91d76f4d8e753f27$export$3c6428acb8ce7fb9).Custom,
|
|
2626
|
+
visible: true,
|
|
2627
|
+
canRemove: false
|
|
2628
|
+
};
|
|
2629
|
+
class $a93fef52f234fd9d$export$deefba2ead809686 extends (0, $3ecb066746a16c54$export$23eba0cb71a4e506) {
|
|
2630
|
+
onAdd() {}
|
|
2631
|
+
constructor(){
|
|
2632
|
+
super($a93fef52f234fd9d$var$Ld);
|
|
2633
|
+
this._visMap = new Map();
|
|
2634
|
+
this._source = new (0, $8zHUo$olsource.Vector)({
|
|
2635
|
+
wrapX: false
|
|
2636
|
+
});
|
|
2637
|
+
this._layer = new (0, ($parcel$interopDefault($8zHUo$ollayerVector)))({
|
|
2638
|
+
properties: {
|
|
2639
|
+
mapLayer: this,
|
|
2640
|
+
name: this._definition.key,
|
|
2641
|
+
canEdit: false,
|
|
2642
|
+
canFlash: true,
|
|
2643
|
+
canSelect: false
|
|
2644
|
+
},
|
|
2645
|
+
source: this._source,
|
|
2646
|
+
style: new (0, $8zHUo$olstyle.Style)({
|
|
2647
|
+
image: new (0, $8zHUo$olstyle.Icon)({
|
|
2648
|
+
src: $a93fef52f234fd9d$var$MapIconData,
|
|
2649
|
+
height: 30,
|
|
2650
|
+
width: 30
|
|
2651
|
+
})
|
|
2652
|
+
})
|
|
2653
|
+
});
|
|
2654
|
+
}
|
|
2655
|
+
getLegendInfos() {
|
|
2656
|
+
return [];
|
|
2657
|
+
}
|
|
2658
|
+
flash(feature) {
|
|
2659
|
+
const map = this.mapManager.map;
|
|
2660
|
+
const source = this._source;
|
|
2661
|
+
const start = Date.now();
|
|
2662
|
+
const flashGeom = feature.getGeometry().clone();
|
|
2663
|
+
const listenerKey = map.getAllLayers()[0].on('postrender', animate);
|
|
2664
|
+
function animate(event) {
|
|
2665
|
+
const frameState = event.frameState;
|
|
2666
|
+
const elapsed = frameState.time - start;
|
|
2667
|
+
if (elapsed >= 3000) {
|
|
2668
|
+
(0, $8zHUo$olObservable.unByKey)(listenerKey);
|
|
2669
|
+
source.removeFeature(feature);
|
|
2670
|
+
return;
|
|
2671
|
+
}
|
|
2672
|
+
const vectorContext = (0, $8zHUo$olrender.getVectorContext)(event);
|
|
2673
|
+
const elapsedRatio = elapsed / 3000;
|
|
2674
|
+
const radius = (0, $8zHUo$oleasing.easeOut)(elapsedRatio) * 25 + 5;
|
|
2675
|
+
const opacity = (0, $8zHUo$oleasing.easeOut)(1 - elapsedRatio);
|
|
2676
|
+
const style = new (0, $8zHUo$olstyle.Style)({
|
|
2677
|
+
image: new (0, ($parcel$interopDefault($8zHUo$olstyleCircle)))({
|
|
2678
|
+
radius: radius,
|
|
2679
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
2680
|
+
color: 'rgba(255, 185, 0, ' + opacity + ')',
|
|
2681
|
+
width: 0.25 + opacity
|
|
2682
|
+
})
|
|
2683
|
+
})
|
|
2684
|
+
});
|
|
2685
|
+
vectorContext.setStyle(style);
|
|
2686
|
+
vectorContext.drawGeometry(flashGeom);
|
|
2687
|
+
map.render();
|
|
2688
|
+
}
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
$a93fef52f234fd9d$var$__decorate([
|
|
2692
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
2693
|
+
$a93fef52f234fd9d$var$__metadata("design:type", typeof ($a93fef52f234fd9d$var$_a = typeof (0, $e2e9872d2858bcde$export$c521bb0b406df9a3) !== "undefined" && (0, $e2e9872d2858bcde$export$c521bb0b406df9a3)) === "function" ? $a93fef52f234fd9d$var$_a : Object)
|
|
2694
|
+
], $a93fef52f234fd9d$export$deefba2ead809686.prototype, "mapManager", void 0);
|
|
2695
|
+
|
|
2696
|
+
|
|
2697
|
+
var $a28fe88e0f106608$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
2698
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2699
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2700
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2701
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2702
|
+
};
|
|
2703
|
+
var $a28fe88e0f106608$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
2704
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2705
|
+
};
|
|
2706
|
+
var $a28fe88e0f106608$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
2707
|
+
function adopt(value) {
|
|
2708
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
2709
|
+
resolve(value);
|
|
2710
|
+
});
|
|
2711
|
+
}
|
|
2712
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
2713
|
+
function fulfilled(value) {
|
|
2714
|
+
try {
|
|
2715
|
+
step(generator.next(value));
|
|
2716
|
+
} catch (e) {
|
|
2717
|
+
reject(e);
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
function rejected(value) {
|
|
2721
|
+
try {
|
|
2722
|
+
step(generator["throw"](value));
|
|
2723
|
+
} catch (e) {
|
|
2724
|
+
reject(e);
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
function step(result) {
|
|
2728
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
2729
|
+
}
|
|
2730
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2731
|
+
});
|
|
2732
|
+
};
|
|
2733
|
+
var $a28fe88e0f106608$var$_a;
|
|
2734
|
+
let $a28fe88e0f106608$export$eff87c52915dd7fe = class LayerManager {
|
|
2735
|
+
constructor(){
|
|
2736
|
+
this.layerList = new (0, $8zHUo$yesilyazilimwebspa.IndexedList)();
|
|
2737
|
+
this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).BasemapChange, this._onBasemapChangeRequested.bind(this));
|
|
2738
|
+
this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).RemoveLayer, (key)=>this.removeLayer(key));
|
|
2739
|
+
}
|
|
2740
|
+
init(settings) {
|
|
2741
|
+
return $a28fe88e0f106608$var$__awaiter(this, void 0, void 0, function*() {
|
|
2742
|
+
this.basemapLayer = yield this._createBaseMapLayer(settings.baseMap);
|
|
2743
|
+
this.layerList.add(this.basemapLayer);
|
|
2744
|
+
if (!settings.layerLoader) return;
|
|
2745
|
+
const lyrRes = yield settings.layerLoader();
|
|
2746
|
+
if (!lyrRes.success) {
|
|
2747
|
+
console.error('Layer load error > ' + lyrRes.message);
|
|
2748
|
+
return;
|
|
2749
|
+
}
|
|
2750
|
+
const lds = lyrRes.data;
|
|
2751
|
+
if (!lds) return;
|
|
2752
|
+
const layerFactories = [];
|
|
2753
|
+
if (settings.customLayerFactory) layerFactories.push(settings.customLayerFactory);
|
|
2754
|
+
const creator = new (0, $4542e2c018b508ca$export$5612f11f554f467)(layerFactories);
|
|
2755
|
+
lds.sort((a, b)=>a.order - b.order);
|
|
2756
|
+
for (const ld of lds){
|
|
2757
|
+
const res = yield creator.createAsync(ld);
|
|
2758
|
+
if (res.success && res.data) this.addLayer(res.data);
|
|
2759
|
+
}
|
|
2760
|
+
this.addLayer(new (0, $a93fef52f234fd9d$export$deefba2ead809686)());
|
|
2761
|
+
});
|
|
2762
|
+
}
|
|
2763
|
+
findLayer(key) {
|
|
2764
|
+
return this.layerList.find((ml)=>ml.id == key);
|
|
2765
|
+
}
|
|
2766
|
+
onExtentChanged(loc) {
|
|
2767
|
+
this._lastLoc = loc;
|
|
2768
|
+
this.layerList.forEach((ml)=>ml.onViewExtentChanged(loc));
|
|
2769
|
+
}
|
|
2770
|
+
getSelectableLayers() {
|
|
2771
|
+
return this.layerList.filter((ml)=>{
|
|
2772
|
+
var _a;
|
|
2773
|
+
return !!((_a = ml.layerObj.getProperties()) === null || _a === void 0 ? void 0 : _a.canSelect);
|
|
2774
|
+
});
|
|
2775
|
+
}
|
|
2776
|
+
addLayer(lyr) {
|
|
2777
|
+
this.removeLayer(lyr.id);
|
|
2778
|
+
this.layerList.add(lyr);
|
|
2779
|
+
lyr.onViewExtentChanged(this._lastLoc);
|
|
2780
|
+
lyr.onAdd();
|
|
2781
|
+
}
|
|
2782
|
+
removeLayer(key) {
|
|
2783
|
+
const id = this.layerList.findId((ml)=>ml.id == key);
|
|
2784
|
+
if (id > 0) {
|
|
2785
|
+
const layer = this.layerList.getValueById(id);
|
|
2786
|
+
this.layerList.removeById(id);
|
|
2787
|
+
layer.onRemove();
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
_createBaseMapLayer(type) {
|
|
2791
|
+
return $a28fe88e0f106608$var$__awaiter(this, void 0, void 0, function*() {
|
|
2792
|
+
return yield new (0, $3533cc4f9274a60f$export$bc85ccec14607209)().createBaseMapAsync(type);
|
|
2793
|
+
});
|
|
2794
|
+
}
|
|
2795
|
+
_onBasemapChangeRequested(type) {
|
|
2796
|
+
return $a28fe88e0f106608$var$__awaiter(this, void 0, void 0, function*() {
|
|
2797
|
+
const layer = yield this._createBaseMapLayer(type);
|
|
2798
|
+
this.layerList.setById(1, layer);
|
|
2799
|
+
this.basemapLayer = layer;
|
|
2800
|
+
});
|
|
2801
|
+
}
|
|
2802
|
+
};
|
|
2803
|
+
$a28fe88e0f106608$var$__decorate([
|
|
2804
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
2805
|
+
$a28fe88e0f106608$var$__metadata("design:type", typeof ($a28fe88e0f106608$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $a28fe88e0f106608$var$_a : Object)
|
|
2806
|
+
], $a28fe88e0f106608$export$eff87c52915dd7fe.prototype, "eventService", void 0);
|
|
2807
|
+
$a28fe88e0f106608$export$eff87c52915dd7fe = $a28fe88e0f106608$var$__decorate([
|
|
2808
|
+
(0, $8zHUo$yesilyazilimwebspa.Service)(),
|
|
2809
|
+
$a28fe88e0f106608$var$__metadata("design:paramtypes", [])
|
|
2810
|
+
], $a28fe88e0f106608$export$eff87c52915dd7fe);
|
|
2811
|
+
|
|
2812
|
+
|
|
2813
|
+
|
|
2814
|
+
|
|
2815
|
+
|
|
2816
|
+
|
|
2817
|
+
|
|
2818
|
+
|
|
2819
|
+
var $60509b0aa95160f5$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
2820
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2821
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2822
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2823
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2824
|
+
};
|
|
2825
|
+
var $60509b0aa95160f5$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
2826
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2827
|
+
};
|
|
2828
|
+
var $60509b0aa95160f5$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
2829
|
+
function adopt(value) {
|
|
2830
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
2831
|
+
resolve(value);
|
|
2832
|
+
});
|
|
2833
|
+
}
|
|
2834
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
2835
|
+
function fulfilled(value) {
|
|
2836
|
+
try {
|
|
2837
|
+
step(generator.next(value));
|
|
2838
|
+
} catch (e) {
|
|
2839
|
+
reject(e);
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
function rejected(value) {
|
|
2843
|
+
try {
|
|
2844
|
+
step(generator["throw"](value));
|
|
2845
|
+
} catch (e) {
|
|
2846
|
+
reject(e);
|
|
2847
|
+
}
|
|
2848
|
+
}
|
|
2849
|
+
function step(result) {
|
|
2850
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
2851
|
+
}
|
|
2852
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2853
|
+
});
|
|
2854
|
+
};
|
|
2855
|
+
var $60509b0aa95160f5$var$_a, $60509b0aa95160f5$var$_b, $60509b0aa95160f5$var$_c, $60509b0aa95160f5$var$_d;
|
|
2856
|
+
let $60509b0aa95160f5$export$115c55962a382acf = class DefaultTool {
|
|
2857
|
+
constructor(){
|
|
2858
|
+
this._onMapSingleClick = (evt)=>$60509b0aa95160f5$var$__awaiter(this, void 0, void 0, function*() {
|
|
2859
|
+
var _a, _b;
|
|
2860
|
+
evt.preventDefault();
|
|
2861
|
+
this._lastClickCoord = evt.coordinate;
|
|
2862
|
+
this.mapManager.showPopup(null, null);
|
|
2863
|
+
if (this._SelectionContext.makeSelected) this.mapManager.setSelectedFeatures(null);
|
|
2864
|
+
const item = yield this.mapManager.getOneFeatureAt(evt.pixel, {
|
|
2865
|
+
menux: evt.originalEvent.pageX,
|
|
2866
|
+
menuy: evt.originalEvent.pageY,
|
|
2867
|
+
hitTolerance: 4,
|
|
2868
|
+
layerFilter: (_a = this._SelectionContext) === null || _a === void 0 ? void 0 : _a.layerFilter,
|
|
2869
|
+
featureFilter: (_b = this._SelectionContext) === null || _b === void 0 ? void 0 : _b.featureFilter
|
|
2870
|
+
});
|
|
2871
|
+
if (item && this._SelectionContext.makeSelected) {
|
|
2872
|
+
const dict = new Map();
|
|
2873
|
+
dict.set(item.mapLayer, [
|
|
2874
|
+
item.feature
|
|
2875
|
+
]);
|
|
2876
|
+
this.mapManager.setSelectedFeatures(dict);
|
|
2877
|
+
}
|
|
2878
|
+
this._SelectionContext.completeWork([
|
|
2879
|
+
item
|
|
2880
|
+
]);
|
|
2881
|
+
});
|
|
2882
|
+
this._onMapRightClick = (ev)=>$60509b0aa95160f5$var$__awaiter(this, void 0, void 0, function*() {
|
|
2883
|
+
var _c;
|
|
2884
|
+
ev.preventDefault();
|
|
2885
|
+
if (!this._SelectionContext.contextMenuContainer) return;
|
|
2886
|
+
this.mapManager.showPopup(null, null);
|
|
2887
|
+
const layerFilter = (lyr)=>{
|
|
2888
|
+
var _a;
|
|
2889
|
+
const lm = (_a = (0, $9e9fe0098715b2dd$export$901d0a0c97b4d88a)(lyr)) === null || _a === void 0 ? void 0 : _a.mapLayer;
|
|
2890
|
+
return lm && lyr.getVisible();
|
|
2891
|
+
};
|
|
2892
|
+
const pixel = this.mapManager.map.getEventPixel(ev);
|
|
2893
|
+
const coord = this.mapManager.map.getEventCoordinate(ev);
|
|
2894
|
+
const item = yield this.mapManager.getOneFeatureAt(pixel, {
|
|
2895
|
+
menux: ev.pageX,
|
|
2896
|
+
menuy: ev.pageY,
|
|
2897
|
+
hitTolerance: 4,
|
|
2898
|
+
layerFilter: layerFilter
|
|
2899
|
+
});
|
|
2900
|
+
const sa = {
|
|
2901
|
+
coord: coord,
|
|
2902
|
+
pixel: pixel,
|
|
2903
|
+
ci: item,
|
|
2904
|
+
context: this._InteractionContext
|
|
2905
|
+
};
|
|
2906
|
+
const commandInfos = [];
|
|
2907
|
+
const cmdProps = this.commandService.getCommandsFor(this._SelectionContext.contextMenuContainer, this.mapManager.commandDisplayer);
|
|
2908
|
+
for (const cmdProp of cmdProps)if ((_c = cmdProp.canExecuteFor) === null || _c === void 0 ? void 0 : _c.call(cmdProp, sa)) commandInfos.push(cmdProp);
|
|
2909
|
+
if (commandInfos.length == 0) return;
|
|
2910
|
+
this.mapManager.showContextMenuAt(ev.pageX, ev.pageY, commandInfos, (action, mcp)=>{
|
|
2911
|
+
if (action === 'click') this.commandService.startCommand(mcp.key, null, sa);
|
|
2912
|
+
}, false);
|
|
2913
|
+
});
|
|
2914
|
+
this._onIntContextChanged = (context)=>{
|
|
2915
|
+
this._InteractionContext = context;
|
|
2916
|
+
};
|
|
2917
|
+
this.enabled = true;
|
|
2918
|
+
this.active = false;
|
|
2919
|
+
this._drawSource = new (0, ($parcel$interopDefault($8zHUo$olsourceVector)))({
|
|
2920
|
+
wrapX: false
|
|
2921
|
+
});
|
|
2922
|
+
this._drawLayer = new (0, ($parcel$interopDefault($8zHUo$ollayerVector)))({
|
|
2923
|
+
source: this._drawSource,
|
|
2924
|
+
zIndex: 99999
|
|
2925
|
+
});
|
|
2926
|
+
}
|
|
2927
|
+
cancel() {
|
|
2928
|
+
this.eventService.forgot((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapInteractionContextChanged, this._onIntContextChanged);
|
|
2929
|
+
this.mapManager.map.getViewport().removeEventListener('contextmenu', this._onMapRightClick);
|
|
2930
|
+
this.mapManager.map.un('click', this._onMapSingleClick);
|
|
2931
|
+
this.active = false;
|
|
2932
|
+
return true;
|
|
2933
|
+
}
|
|
2934
|
+
start(childKey, context) {
|
|
2935
|
+
this._SelectionContext = context || this._getDefaultSelectionContext();
|
|
2936
|
+
if (this._SelectionContext.mode == 'single') {
|
|
2937
|
+
this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapInteractionContextChanged, this._onIntContextChanged);
|
|
2938
|
+
this.mapManager.map.on('click', this._onMapSingleClick);
|
|
2939
|
+
this.mapManager.map.getViewport().addEventListener('contextmenu', this._onMapRightClick);
|
|
2940
|
+
} else {
|
|
2941
|
+
if (!this._drawLayer.getMapInternal()) this.mapManager.map.addLayer(this._drawLayer);
|
|
2942
|
+
this._drawInteraction = new (0, $8zHUo$olinteraction.Draw)({
|
|
2943
|
+
type: 'Polygon',
|
|
2944
|
+
freehand: true,
|
|
2945
|
+
freehandCondition: (0, $8zHUo$oleventscondition.shiftKeyOnly),
|
|
2946
|
+
source: this._drawSource
|
|
2947
|
+
});
|
|
2948
|
+
this._drawInteraction.once('drawend', (ev)=>{});
|
|
2949
|
+
}
|
|
2950
|
+
this.active = true;
|
|
2951
|
+
}
|
|
2952
|
+
_displayFeaturePopup(item, coords) {
|
|
2953
|
+
return $60509b0aa95160f5$var$__awaiter(this, void 0, void 0, function*() {
|
|
2954
|
+
if (item === null || item === void 0 ? void 0 : item.mapLayer) {
|
|
2955
|
+
const items = yield item.mapLayer.generatePopupItemsAsync(item.feature);
|
|
2956
|
+
if (!(items && items.length > 0)) return;
|
|
2957
|
+
const content = items[0];
|
|
2958
|
+
this.mapManager.showPopup(coords, content.element);
|
|
2959
|
+
}
|
|
2960
|
+
});
|
|
2961
|
+
}
|
|
2962
|
+
_getDefaultSelectionContext() {
|
|
2963
|
+
return {
|
|
2964
|
+
mode: 'single',
|
|
2965
|
+
contextMenuContainer: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).mapCtx,
|
|
2966
|
+
makeSelected: true,
|
|
2967
|
+
layerFilter: (lyr)=>{
|
|
2968
|
+
var _a;
|
|
2969
|
+
const lm = (_a = (0, $9e9fe0098715b2dd$export$901d0a0c97b4d88a)(lyr)) === null || _a === void 0 ? void 0 : _a.mapLayer;
|
|
2970
|
+
return lm && lyr.getVisible();
|
|
2971
|
+
},
|
|
2972
|
+
completeWork: (items)=>{
|
|
2973
|
+
if ((items === null || items === void 0 ? void 0 : items.length) > 0) {
|
|
2974
|
+
const item = items[0];
|
|
2975
|
+
this._displayFeaturePopup(item, this._lastClickCoord);
|
|
2976
|
+
}
|
|
2977
|
+
}
|
|
2978
|
+
};
|
|
2979
|
+
}
|
|
2980
|
+
};
|
|
2981
|
+
$60509b0aa95160f5$var$__decorate([
|
|
2982
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
2983
|
+
$60509b0aa95160f5$var$__metadata("design:type", typeof ($60509b0aa95160f5$var$_a = typeof (0, $e2e9872d2858bcde$export$c521bb0b406df9a3) !== "undefined" && (0, $e2e9872d2858bcde$export$c521bb0b406df9a3)) === "function" ? $60509b0aa95160f5$var$_a : Object)
|
|
2984
|
+
], $60509b0aa95160f5$export$115c55962a382acf.prototype, "mapManager", void 0);
|
|
2985
|
+
$60509b0aa95160f5$var$__decorate([
|
|
2986
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
2987
|
+
$60509b0aa95160f5$var$__metadata("design:type", typeof ($60509b0aa95160f5$var$_b = typeof (0, $a28fe88e0f106608$export$eff87c52915dd7fe) !== "undefined" && (0, $a28fe88e0f106608$export$eff87c52915dd7fe)) === "function" ? $60509b0aa95160f5$var$_b : Object)
|
|
2988
|
+
], $60509b0aa95160f5$export$115c55962a382acf.prototype, "layerManager", void 0);
|
|
2989
|
+
$60509b0aa95160f5$var$__decorate([
|
|
2990
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
2991
|
+
$60509b0aa95160f5$var$__metadata("design:type", typeof ($60509b0aa95160f5$var$_c = typeof (0, $8zHUo$yesilyazilimwebspa.CommandService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.CommandService)) === "function" ? $60509b0aa95160f5$var$_c : Object)
|
|
2992
|
+
], $60509b0aa95160f5$export$115c55962a382acf.prototype, "commandService", void 0);
|
|
2993
|
+
$60509b0aa95160f5$var$__decorate([
|
|
2994
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
2995
|
+
$60509b0aa95160f5$var$__metadata("design:type", typeof ($60509b0aa95160f5$var$_d = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $60509b0aa95160f5$var$_d : Object)
|
|
2996
|
+
], $60509b0aa95160f5$export$115c55962a382acf.prototype, "eventService", void 0);
|
|
2997
|
+
$60509b0aa95160f5$export$115c55962a382acf = $60509b0aa95160f5$var$__decorate([
|
|
2998
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)({
|
|
2999
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Tool,
|
|
3000
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).ribbon,
|
|
3001
|
+
key: 'pan',
|
|
3002
|
+
group: 'mg-general-map',
|
|
3003
|
+
title: "Kayd\u0131r",
|
|
3004
|
+
iconClass: 'bi bi-cursor-fill',
|
|
3005
|
+
order: 1
|
|
3006
|
+
}),
|
|
3007
|
+
$60509b0aa95160f5$var$__metadata("design:paramtypes", [])
|
|
3008
|
+
], $60509b0aa95160f5$export$115c55962a382acf);
|
|
3009
|
+
|
|
3010
|
+
|
|
3011
|
+
var $c0b07e14125bcef7$exports = {};
|
|
3012
|
+
|
|
3013
|
+
$parcel$export($c0b07e14125bcef7$exports, "FullscreenCommand", () => $c0b07e14125bcef7$export$c33d244c1e1ee309);
|
|
3014
|
+
|
|
3015
|
+
|
|
3016
|
+
var $c0b07e14125bcef7$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
3017
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3018
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3019
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3020
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3021
|
+
};
|
|
3022
|
+
var $c0b07e14125bcef7$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
3023
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3024
|
+
};
|
|
3025
|
+
let $c0b07e14125bcef7$export$c33d244c1e1ee309 = class FullscreenCommand {
|
|
3026
|
+
constructor(){
|
|
3027
|
+
this.enabled = true;
|
|
3028
|
+
this.active = false;
|
|
3029
|
+
}
|
|
3030
|
+
start(childKey) {
|
|
3031
|
+
if (window.fullScreen || window.innerWidth == screen.width && window.innerHeight == screen.height) {
|
|
3032
|
+
this._closeFullscreen();
|
|
3033
|
+
this.active = false;
|
|
3034
|
+
} else {
|
|
3035
|
+
this._openFullscreen();
|
|
3036
|
+
this.active = true;
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
_openFullscreen() {
|
|
3040
|
+
const elem = document.documentElement;
|
|
3041
|
+
if (elem.requestFullscreen) elem.requestFullscreen();
|
|
3042
|
+
else if (elem.mozRequestFullScreen) elem.mozRequestFullScreen();
|
|
3043
|
+
else if (elem.webkitRequestFullscreen) elem.webkitRequestFullscreen();
|
|
3044
|
+
else if (elem.msRequestFullscreen) elem.msRequestFullscreen();
|
|
3045
|
+
}
|
|
3046
|
+
_closeFullscreen() {
|
|
3047
|
+
let elem = document;
|
|
3048
|
+
if (elem.exitFullscreen) elem.exitFullscreen();
|
|
3049
|
+
else if (elem.mozCancelFullScreen) elem.mozCancelFullScreen();
|
|
3050
|
+
else if (elem.webkitExitFullscreen) elem.webkitExitFullscreen();
|
|
3051
|
+
else if (elem.msExitFullscreen) elem.msExitFullscreen();
|
|
3052
|
+
}
|
|
3053
|
+
};
|
|
3054
|
+
$c0b07e14125bcef7$export$c33d244c1e1ee309 = $c0b07e14125bcef7$var$__decorate([
|
|
3055
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)({
|
|
3056
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Command,
|
|
3057
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).ribbon,
|
|
3058
|
+
key: 'view-fullscreen',
|
|
3059
|
+
group: 'mg-general-map',
|
|
3060
|
+
order: 3,
|
|
3061
|
+
title: 'Tam Ekran',
|
|
3062
|
+
iconClass: 'bi bi-arrows-fullscreen'
|
|
3063
|
+
}),
|
|
3064
|
+
$c0b07e14125bcef7$var$__metadata("design:paramtypes", [])
|
|
3065
|
+
], $c0b07e14125bcef7$export$c33d244c1e1ee309);
|
|
3066
|
+
|
|
3067
|
+
|
|
3068
|
+
var $6abe3e0619c616f6$exports = {};
|
|
3069
|
+
|
|
3070
|
+
$parcel$export($6abe3e0619c616f6$exports, "GotoCommand", () => $6abe3e0619c616f6$export$5cda5c9e8254aca);
|
|
3071
|
+
|
|
3072
|
+
|
|
3073
|
+
|
|
3074
|
+
|
|
3075
|
+
|
|
3076
|
+
var $6abe3e0619c616f6$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
3077
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3078
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3079
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3080
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3081
|
+
};
|
|
3082
|
+
var $6abe3e0619c616f6$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
3083
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3084
|
+
};
|
|
3085
|
+
var $6abe3e0619c616f6$var$_a, $6abe3e0619c616f6$var$_b;
|
|
3086
|
+
let $6abe3e0619c616f6$export$5cda5c9e8254aca = class GotoCommand {
|
|
3087
|
+
constructor(){
|
|
3088
|
+
this.enabled = true;
|
|
3089
|
+
this.active = false;
|
|
3090
|
+
}
|
|
3091
|
+
start(childKey) {
|
|
3092
|
+
if (!this.active) {
|
|
3093
|
+
(0, $8zHUo$yesilyazilimwebspa.DialogWindow).ShowAsync("Git", new $6abe3e0619c616f6$var$GoToComponent()).then(()=>{
|
|
3094
|
+
this.active = false;
|
|
3095
|
+
});
|
|
3096
|
+
this.active = true;
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
};
|
|
3100
|
+
$6abe3e0619c616f6$export$5cda5c9e8254aca = $6abe3e0619c616f6$var$__decorate([
|
|
3101
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)({
|
|
3102
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Command,
|
|
3103
|
+
key: 'goto-cmd',
|
|
3104
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).ribbon,
|
|
3105
|
+
group: 'mg-general-map',
|
|
3106
|
+
title: 'Git',
|
|
3107
|
+
order: 3,
|
|
3108
|
+
iconClass: 'bi bi-geo-alt'
|
|
3109
|
+
}),
|
|
3110
|
+
$6abe3e0619c616f6$var$__metadata("design:paramtypes", [])
|
|
3111
|
+
], $6abe3e0619c616f6$export$5cda5c9e8254aca);
|
|
3112
|
+
let $6abe3e0619c616f6$var$GoToComponent = class GoToComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
3113
|
+
constructor(){
|
|
3114
|
+
super();
|
|
3115
|
+
}
|
|
3116
|
+
onConnected() {
|
|
3117
|
+
const inp = (0, $8zHUo$yesilyazilimwebspa.ELF).input("text");
|
|
3118
|
+
const lx = (0, $8zHUo$yesilyazilimwebspa.ELF).label('Koordinat - Enlem (Y), Boylam (X)');
|
|
3119
|
+
const btn = (0, $8zHUo$yesilyazilimwebspa.ELF).button('Git', 'Koordinata Git', null, null, ()=>{
|
|
3120
|
+
const txt = inp.value;
|
|
3121
|
+
if (txt) try {
|
|
3122
|
+
const cp = new (0, ($parcel$interopDefault($8zHUo$coordinateparser)))(txt);
|
|
3123
|
+
const coords = [
|
|
3124
|
+
cp.getLongitude(),
|
|
3125
|
+
cp.getLatitude()
|
|
3126
|
+
];
|
|
3127
|
+
const dur = 1000;
|
|
3128
|
+
this.mapManager.view.animate({
|
|
3129
|
+
center: coords,
|
|
3130
|
+
duration: dur
|
|
3131
|
+
});
|
|
3132
|
+
setTimeout(()=>{
|
|
3133
|
+
const ea = {
|
|
3134
|
+
geom: new (0, $8zHUo$olgeom.Point)(coords)
|
|
3135
|
+
};
|
|
3136
|
+
this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapFlashGeomRequest, ea);
|
|
3137
|
+
}, dur);
|
|
3138
|
+
} catch (error) {}
|
|
3139
|
+
});
|
|
3140
|
+
btn.ariaPlaceholder = 'Enlem (Y) Boylam (X)';
|
|
3141
|
+
const divWgs = (0, $8zHUo$yesilyazilimwebspa.ELF).div("flex-v gap-1", lx, inp, btn);
|
|
3142
|
+
this.appendChild(divWgs);
|
|
3143
|
+
}
|
|
3144
|
+
};
|
|
3145
|
+
$6abe3e0619c616f6$var$__decorate([
|
|
3146
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3147
|
+
$6abe3e0619c616f6$var$__metadata("design:type", typeof ($6abe3e0619c616f6$var$_a = typeof (0, $e2e9872d2858bcde$export$c521bb0b406df9a3) !== "undefined" && (0, $e2e9872d2858bcde$export$c521bb0b406df9a3)) === "function" ? $6abe3e0619c616f6$var$_a : Object)
|
|
3148
|
+
], $6abe3e0619c616f6$var$GoToComponent.prototype, "mapManager", void 0);
|
|
3149
|
+
$6abe3e0619c616f6$var$__decorate([
|
|
3150
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3151
|
+
$6abe3e0619c616f6$var$__metadata("design:type", typeof ($6abe3e0619c616f6$var$_b = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $6abe3e0619c616f6$var$_b : Object)
|
|
3152
|
+
], $6abe3e0619c616f6$var$GoToComponent.prototype, "eventService", void 0);
|
|
3153
|
+
$6abe3e0619c616f6$var$GoToComponent = $6abe3e0619c616f6$var$__decorate([
|
|
3154
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
3155
|
+
elementName: 'map-goto-comp'
|
|
3156
|
+
}),
|
|
3157
|
+
$6abe3e0619c616f6$var$__metadata("design:paramtypes", [])
|
|
3158
|
+
], $6abe3e0619c616f6$var$GoToComponent);
|
|
3159
|
+
|
|
3160
|
+
|
|
3161
|
+
var $c7f05d18b5daffca$exports = {};
|
|
3162
|
+
|
|
3163
|
+
$parcel$export($c7f05d18b5daffca$exports, "IdentifyTool", () => $c7f05d18b5daffca$export$bdd5c75cfa82dbf);
|
|
3164
|
+
$parcel$export($c7f05d18b5daffca$exports, "IdentifyToolCtx", () => $c7f05d18b5daffca$export$b336bd716f5acf7e);
|
|
3165
|
+
|
|
3166
|
+
|
|
3167
|
+
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
|
|
3171
|
+
var $7b8af19dcca7df3f$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
3172
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3173
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3174
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3175
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3176
|
+
};
|
|
3177
|
+
var $7b8af19dcca7df3f$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
3178
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3179
|
+
};
|
|
3180
|
+
var $7b8af19dcca7df3f$var$_a, $7b8af19dcca7df3f$var$_b;
|
|
3181
|
+
let $7b8af19dcca7df3f$export$41385a1a627cf919 = class IdentifyResultsComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
3182
|
+
constructor(props){
|
|
3183
|
+
super();
|
|
3184
|
+
this.props = props;
|
|
3185
|
+
this._onHeaderZoomClicked = ()=>{
|
|
3186
|
+
var ed = {
|
|
3187
|
+
geom: new (0, $8zHUo$olgeom.Point)(this.props.coord)
|
|
3188
|
+
};
|
|
3189
|
+
this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapFlashGeomRequest, ed);
|
|
3190
|
+
};
|
|
3191
|
+
this._header = this._createHeader();
|
|
3192
|
+
this._body = (0, $8zHUo$yesilyazilimwebspa.ELF).div('body');
|
|
3193
|
+
this.appendChildren(this._header, this._body);
|
|
3194
|
+
}
|
|
3195
|
+
addIdentifyResult(idRes) {
|
|
3196
|
+
if (idRes.status) {
|
|
3197
|
+
const factoryKey = idRes.sourceLayer.factoryType;
|
|
3198
|
+
const serviceKey = idRes.sourceLayer.id;
|
|
3199
|
+
Promise.resolve(idRes.result).then((opRes)=>{
|
|
3200
|
+
if (!(opRes.success && opRes.data)) ;
|
|
3201
|
+
else for (const item of opRes.data){
|
|
3202
|
+
const elm = this._getAccordContentFor(factoryKey, serviceKey, item);
|
|
3203
|
+
const acc = new (0, $8zHUo$yesilyazilimwebspa.Accordion)({
|
|
3204
|
+
header: item.layerTitle,
|
|
3205
|
+
content: elm
|
|
3206
|
+
});
|
|
3207
|
+
this._body.appendChild(acc);
|
|
3208
|
+
}
|
|
3209
|
+
});
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
_createHeader() {
|
|
3213
|
+
const btn = (0, $8zHUo$yesilyazilimwebspa.ELF).Buttons.mini(this._onHeaderZoomClicked, 'bi bi-zoom-in', "Haritada G\xf6ster");
|
|
3214
|
+
const coordSp = (0, $8zHUo$yesilyazilimwebspa.ELF).span((0, $10571313f00c012e$export$4691a8a9ff232a6b).formatCoordWgs(this.props.coord));
|
|
3215
|
+
return (0, $8zHUo$yesilyazilimwebspa.ELF).div('header', btn, coordSp);
|
|
3216
|
+
}
|
|
3217
|
+
_getAccordContentFor(factoryType, serviceKey, item) {
|
|
3218
|
+
const div = (0, $8zHUo$yesilyazilimwebspa.ELF).div('IdentifyContent');
|
|
3219
|
+
(0, $8zHUo$yesilyazilimwebspa.ELF).showHideSpinnerAt(div, true, "Form Haz\u0131rlan\u0131yor...");
|
|
3220
|
+
this.formService.createFormAsync(item.feature, factoryType, serviceKey, item.layerKey, 'identify').then((opres)=>{
|
|
3221
|
+
(0, $8zHUo$yesilyazilimwebspa.ELF).showHideSpinnerAt(div, false);
|
|
3222
|
+
if (opres.success) div.appendChild(opres.data);
|
|
3223
|
+
else (0, $8zHUo$yesilyazilimwebspa.ELF).showHideMessageDisplayAt(div, true, 'error', opres.message);
|
|
3224
|
+
});
|
|
3225
|
+
return div;
|
|
3226
|
+
}
|
|
3227
|
+
};
|
|
3228
|
+
$7b8af19dcca7df3f$var$__decorate([
|
|
3229
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3230
|
+
$7b8af19dcca7df3f$var$__metadata("design:type", typeof ($7b8af19dcca7df3f$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $7b8af19dcca7df3f$var$_a : Object)
|
|
3231
|
+
], $7b8af19dcca7df3f$export$41385a1a627cf919.prototype, "eventService", void 0);
|
|
3232
|
+
$7b8af19dcca7df3f$var$__decorate([
|
|
3233
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3234
|
+
$7b8af19dcca7df3f$var$__metadata("design:type", typeof ($7b8af19dcca7df3f$var$_b = typeof (0, $8zHUo$yesilyazilimwebspa.FormService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.FormService)) === "function" ? $7b8af19dcca7df3f$var$_b : Object)
|
|
3235
|
+
], $7b8af19dcca7df3f$export$41385a1a627cf919.prototype, "formService", void 0);
|
|
3236
|
+
$7b8af19dcca7df3f$export$41385a1a627cf919 = $7b8af19dcca7df3f$var$__decorate([
|
|
3237
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
3238
|
+
elementName: 'map-identify-results'
|
|
3239
|
+
}),
|
|
3240
|
+
$7b8af19dcca7df3f$var$__metadata("design:paramtypes", [
|
|
3241
|
+
Object
|
|
3242
|
+
])
|
|
3243
|
+
], $7b8af19dcca7df3f$export$41385a1a627cf919);
|
|
3244
|
+
|
|
3245
|
+
|
|
3246
|
+
|
|
3247
|
+
|
|
3248
|
+
var $c7f05d18b5daffca$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
3249
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3250
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3251
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3252
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3253
|
+
};
|
|
3254
|
+
var $c7f05d18b5daffca$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
3255
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3256
|
+
};
|
|
3257
|
+
var $c7f05d18b5daffca$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
3258
|
+
function adopt(value) {
|
|
3259
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
3260
|
+
resolve(value);
|
|
3261
|
+
});
|
|
3262
|
+
}
|
|
3263
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
3264
|
+
function fulfilled(value) {
|
|
3265
|
+
try {
|
|
3266
|
+
step(generator.next(value));
|
|
3267
|
+
} catch (e) {
|
|
3268
|
+
reject(e);
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
function rejected(value) {
|
|
3272
|
+
try {
|
|
3273
|
+
step(generator["throw"](value));
|
|
3274
|
+
} catch (e) {
|
|
3275
|
+
reject(e);
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
function step(result) {
|
|
3279
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
3280
|
+
}
|
|
3281
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3282
|
+
});
|
|
3283
|
+
};
|
|
3284
|
+
var $c7f05d18b5daffca$var$_a, $c7f05d18b5daffca$var$_b, $c7f05d18b5daffca$var$_c, $c7f05d18b5daffca$var$_d, $c7f05d18b5daffca$var$_e;
|
|
3285
|
+
let $c7f05d18b5daffca$export$bdd5c75cfa82dbf = class IdentifyTool {
|
|
3286
|
+
constructor(){
|
|
3287
|
+
this._onMapSingleClick = (evt)=>$c7f05d18b5daffca$var$__awaiter(this, void 0, void 0, function*() {
|
|
3288
|
+
evt.preventDefault();
|
|
3289
|
+
const sa = {
|
|
3290
|
+
coord: evt.coordinate,
|
|
3291
|
+
pixel: evt.pixel
|
|
3292
|
+
};
|
|
3293
|
+
this.commandService.startCommand('map-identify-ctx', null, sa);
|
|
3294
|
+
});
|
|
3295
|
+
this.enabled = true;
|
|
3296
|
+
}
|
|
3297
|
+
cancel() {
|
|
3298
|
+
this.mapManager.map.un('singleclick', this._onMapSingleClick);
|
|
3299
|
+
this.active = false;
|
|
3300
|
+
return true;
|
|
3301
|
+
}
|
|
3302
|
+
start(childKey) {
|
|
3303
|
+
this.mapManager.map.on('singleclick', this._onMapSingleClick);
|
|
3304
|
+
this.active = true;
|
|
3305
|
+
}
|
|
3306
|
+
};
|
|
3307
|
+
$c7f05d18b5daffca$var$__decorate([
|
|
3308
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3309
|
+
$c7f05d18b5daffca$var$__metadata("design:type", typeof ($c7f05d18b5daffca$var$_a = typeof (0, $e2e9872d2858bcde$export$c521bb0b406df9a3) !== "undefined" && (0, $e2e9872d2858bcde$export$c521bb0b406df9a3)) === "function" ? $c7f05d18b5daffca$var$_a : Object)
|
|
3310
|
+
], $c7f05d18b5daffca$export$bdd5c75cfa82dbf.prototype, "mapManager", void 0);
|
|
3311
|
+
$c7f05d18b5daffca$var$__decorate([
|
|
3312
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3313
|
+
$c7f05d18b5daffca$var$__metadata("design:type", typeof ($c7f05d18b5daffca$var$_b = typeof (0, $8zHUo$yesilyazilimwebspa.CommandService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.CommandService)) === "function" ? $c7f05d18b5daffca$var$_b : Object)
|
|
3314
|
+
], $c7f05d18b5daffca$export$bdd5c75cfa82dbf.prototype, "commandService", void 0);
|
|
3315
|
+
$c7f05d18b5daffca$export$bdd5c75cfa82dbf = $c7f05d18b5daffca$var$__decorate([
|
|
3316
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)({
|
|
3317
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Tool,
|
|
3318
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).ribbon,
|
|
3319
|
+
key: 'map-identify',
|
|
3320
|
+
group: 'mg-general-query',
|
|
3321
|
+
order: 1,
|
|
3322
|
+
title: 'Bilgi Al',
|
|
3323
|
+
iconClass: 'icon--identify fg-info'
|
|
3324
|
+
}),
|
|
3325
|
+
$c7f05d18b5daffca$var$__metadata("design:paramtypes", [])
|
|
3326
|
+
], $c7f05d18b5daffca$export$bdd5c75cfa82dbf);
|
|
3327
|
+
const $c7f05d18b5daffca$var$cmxProps = {
|
|
3328
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Command,
|
|
3329
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).mapCtx,
|
|
3330
|
+
key: 'map-identify-ctx',
|
|
3331
|
+
group: '',
|
|
3332
|
+
order: 1,
|
|
3333
|
+
title: 'Bilgi Al',
|
|
3334
|
+
iconClass: 'icon--identify fg-info',
|
|
3335
|
+
canExecuteFor: (sa)=>{
|
|
3336
|
+
return !sa.ci;
|
|
3337
|
+
}
|
|
3338
|
+
};
|
|
3339
|
+
let $c7f05d18b5daffca$export$b336bd716f5acf7e = class IdentifyToolCtx {
|
|
3340
|
+
constructor(){
|
|
3341
|
+
this.enabled = true;
|
|
3342
|
+
}
|
|
3343
|
+
start(childKey, sa) {
|
|
3344
|
+
const vse = this.mapManager.view.getViewStateAndExtent();
|
|
3345
|
+
const rect = this.mapManager.map.getTargetElement().getBoundingClientRect();
|
|
3346
|
+
const inp = {
|
|
3347
|
+
coords: sa.coord,
|
|
3348
|
+
imageDisplay: {
|
|
3349
|
+
w: rect.width,
|
|
3350
|
+
h: rect.height,
|
|
3351
|
+
dpi: 96
|
|
3352
|
+
},
|
|
3353
|
+
mapExtent: vse.extent,
|
|
3354
|
+
screenPoint: sa.pixel,
|
|
3355
|
+
tolerance: 5
|
|
3356
|
+
};
|
|
3357
|
+
this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapIdentifyRequest, inp).then((results)=>{
|
|
3358
|
+
this._displayResultsAsync(inp, results);
|
|
3359
|
+
});
|
|
3360
|
+
}
|
|
3361
|
+
_displayResultsAsync(inp, results) {
|
|
3362
|
+
return $c7f05d18b5daffca$var$__awaiter(this, void 0, void 0, function*() {
|
|
3363
|
+
const comp = new (0, $7b8af19dcca7df3f$export$41385a1a627cf919)({
|
|
3364
|
+
coord: inp.coords
|
|
3365
|
+
});
|
|
3366
|
+
this.application.openPanel({
|
|
3367
|
+
closable: true,
|
|
3368
|
+
header: 'Bilgi Al',
|
|
3369
|
+
name: 'identify-results',
|
|
3370
|
+
draggable: true,
|
|
3371
|
+
content: comp
|
|
3372
|
+
}, (0, $8zHUo$yesilyazilimwebspa.PanelPos).Right);
|
|
3373
|
+
for (const result of results)comp.addIdentifyResult(result);
|
|
3374
|
+
});
|
|
3375
|
+
}
|
|
3376
|
+
};
|
|
3377
|
+
$c7f05d18b5daffca$var$__decorate([
|
|
3378
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3379
|
+
$c7f05d18b5daffca$var$__metadata("design:type", typeof ($c7f05d18b5daffca$var$_c = typeof (0, $e2e9872d2858bcde$export$c521bb0b406df9a3) !== "undefined" && (0, $e2e9872d2858bcde$export$c521bb0b406df9a3)) === "function" ? $c7f05d18b5daffca$var$_c : Object)
|
|
3380
|
+
], $c7f05d18b5daffca$export$b336bd716f5acf7e.prototype, "mapManager", void 0);
|
|
3381
|
+
$c7f05d18b5daffca$var$__decorate([
|
|
3382
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3383
|
+
$c7f05d18b5daffca$var$__metadata("design:type", typeof ($c7f05d18b5daffca$var$_d = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $c7f05d18b5daffca$var$_d : Object)
|
|
3384
|
+
], $c7f05d18b5daffca$export$b336bd716f5acf7e.prototype, "eventService", void 0);
|
|
3385
|
+
$c7f05d18b5daffca$var$__decorate([
|
|
3386
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3387
|
+
$c7f05d18b5daffca$var$__metadata("design:type", typeof ($c7f05d18b5daffca$var$_e = typeof (0, $8zHUo$yesilyazilimwebspa.Application) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.Application)) === "function" ? $c7f05d18b5daffca$var$_e : Object)
|
|
3388
|
+
], $c7f05d18b5daffca$export$b336bd716f5acf7e.prototype, "application", void 0);
|
|
3389
|
+
$c7f05d18b5daffca$export$b336bd716f5acf7e = $c7f05d18b5daffca$var$__decorate([
|
|
3390
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)($c7f05d18b5daffca$var$cmxProps),
|
|
3391
|
+
$c7f05d18b5daffca$var$__metadata("design:paramtypes", [])
|
|
3392
|
+
], $c7f05d18b5daffca$export$b336bd716f5acf7e);
|
|
3393
|
+
|
|
3394
|
+
|
|
3395
|
+
var $8699ac28631f2b5a$exports = {};
|
|
3396
|
+
|
|
3397
|
+
$parcel$export($8699ac28631f2b5a$exports, "MeasureLineTool", () => $8699ac28631f2b5a$export$e0edaea1e563f54d);
|
|
3398
|
+
$parcel$export($8699ac28631f2b5a$exports, "MeasureAreaTool", () => $8699ac28631f2b5a$export$bbdd8171c08a14c);
|
|
3399
|
+
$parcel$export($8699ac28631f2b5a$exports, "MeasureLineToolCtx", () => $8699ac28631f2b5a$export$7f173efc34e4c794);
|
|
3400
|
+
$parcel$export($8699ac28631f2b5a$exports, "MeasureAreaToolCtx", () => $8699ac28631f2b5a$export$984ce43c3197b583);
|
|
3401
|
+
|
|
3402
|
+
|
|
3403
|
+
|
|
3404
|
+
|
|
3405
|
+
|
|
3406
|
+
|
|
3407
|
+
|
|
3408
|
+
|
|
3409
|
+
|
|
3410
|
+
var $8699ac28631f2b5a$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
3411
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3412
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3413
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3414
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3415
|
+
};
|
|
3416
|
+
var $8699ac28631f2b5a$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
3417
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3418
|
+
};
|
|
3419
|
+
var $8699ac28631f2b5a$var$_a, $8699ac28631f2b5a$var$_b, $8699ac28631f2b5a$var$_c;
|
|
3420
|
+
class $8699ac28631f2b5a$var$MeasureDrawer {
|
|
3421
|
+
_initStyles() {
|
|
3422
|
+
this.style = new (0, $8zHUo$olstyle.Style)({
|
|
3423
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
3424
|
+
color: 'rgba(255, 255, 0, 0.2)'
|
|
3425
|
+
}),
|
|
3426
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
3427
|
+
color: 'rgba(255, 255, 0, 0.9)',
|
|
3428
|
+
lineDash: [
|
|
3429
|
+
10,
|
|
3430
|
+
10
|
|
3431
|
+
],
|
|
3432
|
+
width: 2
|
|
3433
|
+
}),
|
|
3434
|
+
image: new (0, $8zHUo$olstyle.Circle)({
|
|
3435
|
+
radius: 5,
|
|
3436
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
3437
|
+
color: 'rgba(255, 255, 0, 0.7)'
|
|
3438
|
+
}),
|
|
3439
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
3440
|
+
color: 'rgba(255, 255, 0, 0.2)'
|
|
3441
|
+
})
|
|
3442
|
+
})
|
|
3443
|
+
});
|
|
3444
|
+
this.labelStyle = new (0, $8zHUo$olstyle.Style)({
|
|
3445
|
+
text: new (0, $8zHUo$olstyle.Text)({
|
|
3446
|
+
font: '14px sans-serif',
|
|
3447
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
3448
|
+
color: 'rgba(255, 255, 255, 1)'
|
|
3449
|
+
}),
|
|
3450
|
+
backgroundFill: new (0, $8zHUo$olstyle.Fill)({
|
|
3451
|
+
color: 'rgba(0, 0, 0, 0.7)'
|
|
3452
|
+
}),
|
|
3453
|
+
padding: [
|
|
3454
|
+
3,
|
|
3455
|
+
3,
|
|
3456
|
+
3,
|
|
3457
|
+
3
|
|
3458
|
+
],
|
|
3459
|
+
textBaseline: 'bottom',
|
|
3460
|
+
offsetY: -15
|
|
3461
|
+
}),
|
|
3462
|
+
image: new (0, $8zHUo$olstyle.RegularShape)({
|
|
3463
|
+
radius: 8,
|
|
3464
|
+
points: 3,
|
|
3465
|
+
angle: Math.PI,
|
|
3466
|
+
displacement: [
|
|
3467
|
+
0,
|
|
3468
|
+
10
|
|
3469
|
+
],
|
|
3470
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
3471
|
+
color: 'rgba(0, 0, 0, 0.7)'
|
|
3472
|
+
})
|
|
3473
|
+
})
|
|
3474
|
+
});
|
|
3475
|
+
this.tipStyle = new (0, $8zHUo$olstyle.Style)({
|
|
3476
|
+
text: new (0, $8zHUo$olstyle.Text)({
|
|
3477
|
+
font: '12px sans-serif',
|
|
3478
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
3479
|
+
color: 'rgba(255, 255, 255, 1)'
|
|
3480
|
+
}),
|
|
3481
|
+
backgroundFill: new (0, $8zHUo$olstyle.Fill)({
|
|
3482
|
+
color: 'rgba(0, 0, 0, 0.4)'
|
|
3483
|
+
}),
|
|
3484
|
+
padding: [
|
|
3485
|
+
2,
|
|
3486
|
+
2,
|
|
3487
|
+
2,
|
|
3488
|
+
2
|
|
3489
|
+
],
|
|
3490
|
+
textAlign: 'left',
|
|
3491
|
+
offsetX: 15
|
|
3492
|
+
})
|
|
3493
|
+
});
|
|
3494
|
+
this.modifyStyle = new (0, $8zHUo$olstyle.Style)({
|
|
3495
|
+
image: new (0, $8zHUo$olstyle.Circle)({
|
|
3496
|
+
radius: 5,
|
|
3497
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
3498
|
+
color: 'rgba(0, 0, 0, 0.7)'
|
|
3499
|
+
}),
|
|
3500
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
3501
|
+
color: 'rgba(0, 0, 0, 0.4)'
|
|
3502
|
+
})
|
|
3503
|
+
}),
|
|
3504
|
+
text: new (0, $8zHUo$olstyle.Text)({
|
|
3505
|
+
text: "D\xfczenlemek i\xe7in s\xfcr\xfckleyin",
|
|
3506
|
+
font: '12px sans-serif',
|
|
3507
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
3508
|
+
color: 'rgba(255, 255, 255, 1)'
|
|
3509
|
+
}),
|
|
3510
|
+
backgroundFill: new (0, $8zHUo$olstyle.Fill)({
|
|
3511
|
+
color: 'rgba(0, 0, 0, 0.7)'
|
|
3512
|
+
}),
|
|
3513
|
+
padding: [
|
|
3514
|
+
2,
|
|
3515
|
+
2,
|
|
3516
|
+
2,
|
|
3517
|
+
2
|
|
3518
|
+
],
|
|
3519
|
+
textAlign: 'left',
|
|
3520
|
+
offsetX: 15
|
|
3521
|
+
})
|
|
3522
|
+
});
|
|
3523
|
+
this.segmentStyle = new (0, $8zHUo$olstyle.Style)({
|
|
3524
|
+
text: new (0, $8zHUo$olstyle.Text)({
|
|
3525
|
+
font: '12px sans-serif',
|
|
3526
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
3527
|
+
color: 'rgba(255, 255, 255, 1)'
|
|
3528
|
+
}),
|
|
3529
|
+
backgroundFill: new (0, $8zHUo$olstyle.Fill)({
|
|
3530
|
+
color: 'rgba(0, 0, 0, 0.4)'
|
|
3531
|
+
}),
|
|
3532
|
+
padding: [
|
|
3533
|
+
2,
|
|
3534
|
+
2,
|
|
3535
|
+
2,
|
|
3536
|
+
2
|
|
3537
|
+
],
|
|
3538
|
+
textBaseline: 'bottom',
|
|
3539
|
+
offsetY: -12
|
|
3540
|
+
}),
|
|
3541
|
+
image: new (0, $8zHUo$olstyle.RegularShape)({
|
|
3542
|
+
radius: 6,
|
|
3543
|
+
points: 3,
|
|
3544
|
+
angle: Math.PI,
|
|
3545
|
+
displacement: [
|
|
3546
|
+
0,
|
|
3547
|
+
8
|
|
3548
|
+
],
|
|
3549
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
3550
|
+
color: 'rgba(0, 0, 0, 0.4)'
|
|
3551
|
+
})
|
|
3552
|
+
})
|
|
3553
|
+
});
|
|
3554
|
+
this.segmentStyles = [
|
|
3555
|
+
this.segmentStyle
|
|
3556
|
+
];
|
|
3557
|
+
}
|
|
3558
|
+
start(isArea, initCoord) {
|
|
3559
|
+
if (this.isActive) this.stop();
|
|
3560
|
+
this._initStyles();
|
|
3561
|
+
this.source = new (0, $8zHUo$olsource.Vector)();
|
|
3562
|
+
this.modify = new (0, $8zHUo$olinteraction.Modify)({
|
|
3563
|
+
source: this.source,
|
|
3564
|
+
style: this.modifyStyle
|
|
3565
|
+
});
|
|
3566
|
+
const styleFunc = function(feature) {
|
|
3567
|
+
return this.styleFunction(feature, true);
|
|
3568
|
+
};
|
|
3569
|
+
this.vector = new (0, $8zHUo$ollayer.Vector)({
|
|
3570
|
+
source: this.source,
|
|
3571
|
+
style: styleFunc.bind(this),
|
|
3572
|
+
zIndex: 500
|
|
3573
|
+
});
|
|
3574
|
+
this.mapManager.map.addLayer(this.vector);
|
|
3575
|
+
this.mapManager.map.addInteraction(this.modify);
|
|
3576
|
+
const drawType = isArea ? 'Polygon' : 'LineString';
|
|
3577
|
+
const activeTip = "Devam etmek i\xe7in t\u0131klay\u0131n\u0131z ";
|
|
3578
|
+
const idleTip = "\xd6l\xe7\xfcme ba\u015Flamak i\xe7in t\u0131klay\u0131n\u0131z";
|
|
3579
|
+
let tip = idleTip;
|
|
3580
|
+
const styleFunc2 = function(feature) {
|
|
3581
|
+
return this.styleFunction(feature, true, drawType, tip);
|
|
3582
|
+
};
|
|
3583
|
+
this.draw = new (0, $8zHUo$olinteraction.Draw)({
|
|
3584
|
+
source: this.source,
|
|
3585
|
+
type: drawType,
|
|
3586
|
+
style: styleFunc2.bind(this)
|
|
3587
|
+
});
|
|
3588
|
+
this.draw.on('drawstart', ()=>{
|
|
3589
|
+
this.source.clear();
|
|
3590
|
+
this.modify.setActive(false);
|
|
3591
|
+
tip = activeTip;
|
|
3592
|
+
});
|
|
3593
|
+
this.draw.on('drawend', ()=>{
|
|
3594
|
+
this.modifyStyle.setGeometry(this.tipPoint);
|
|
3595
|
+
this.modify.setActive(true);
|
|
3596
|
+
this.mapManager.map.once('pointermove', ()=>{
|
|
3597
|
+
this.modifyStyle.setGeometry(null);
|
|
3598
|
+
});
|
|
3599
|
+
tip = idleTip;
|
|
3600
|
+
});
|
|
3601
|
+
this.modify.setActive(true);
|
|
3602
|
+
this.mapManager.map.addInteraction(this.draw);
|
|
3603
|
+
if (initCoord) this.draw.appendCoordinates([
|
|
3604
|
+
initCoord
|
|
3605
|
+
]);
|
|
3606
|
+
this.isActive = true;
|
|
3607
|
+
}
|
|
3608
|
+
stop() {
|
|
3609
|
+
if (this.isActive) {
|
|
3610
|
+
this.mapManager.map.removeInteraction(this.draw);
|
|
3611
|
+
this.mapManager.map.removeInteraction(this.modify);
|
|
3612
|
+
this.mapManager.map.removeLayer(this.vector);
|
|
3613
|
+
this.isActive = false;
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
formatLength(line) {
|
|
3617
|
+
const length = (0, $8zHUo$olsphere.getLength)(line, {
|
|
3618
|
+
projection: 'EPSG:4326'
|
|
3619
|
+
});
|
|
3620
|
+
let output;
|
|
3621
|
+
if (length > 1000) output = Math.round(length / 1000 * 100) / 100 + ' km';
|
|
3622
|
+
else output = Math.round(length * 100) / 100 + ' m';
|
|
3623
|
+
return output;
|
|
3624
|
+
}
|
|
3625
|
+
formatArea(polygon) {
|
|
3626
|
+
const area = (0, $8zHUo$olsphere.getArea)(polygon, {
|
|
3627
|
+
projection: 'EPSG:4326'
|
|
3628
|
+
});
|
|
3629
|
+
let output;
|
|
3630
|
+
if (area > 1000000) output = Math.round(area / 1000000 * 100) / 100 + ' km\xB2';
|
|
3631
|
+
else output = Math.round(area * 100) / 100 + ' m\xB2';
|
|
3632
|
+
return output;
|
|
3633
|
+
}
|
|
3634
|
+
styleFunction(feature, segments, drawType, tip) {
|
|
3635
|
+
const styles = [
|
|
3636
|
+
this.style
|
|
3637
|
+
];
|
|
3638
|
+
const geometry = feature.getGeometry();
|
|
3639
|
+
const type = geometry.getType();
|
|
3640
|
+
let point, label, line;
|
|
3641
|
+
if (!drawType || drawType === type) {
|
|
3642
|
+
if (type === 'Polygon') {
|
|
3643
|
+
point = geometry.getInteriorPoint();
|
|
3644
|
+
label = this.formatArea(geometry);
|
|
3645
|
+
line = new (0, $8zHUo$olgeom.LineString)(geometry.getCoordinates()[0]);
|
|
3646
|
+
} else if (type === 'LineString') {
|
|
3647
|
+
point = new (0, $8zHUo$olgeom.Point)(geometry.getLastCoordinate());
|
|
3648
|
+
label = this.formatLength(geometry);
|
|
3649
|
+
line = geometry;
|
|
3650
|
+
}
|
|
3651
|
+
}
|
|
3652
|
+
if (segments && line) {
|
|
3653
|
+
let count = 0;
|
|
3654
|
+
line.forEachSegment((a, b)=>{
|
|
3655
|
+
const segment = new (0, $8zHUo$olgeom.LineString)([
|
|
3656
|
+
a,
|
|
3657
|
+
b
|
|
3658
|
+
]);
|
|
3659
|
+
const label = this.formatLength(segment);
|
|
3660
|
+
if (this.segmentStyles.length - 1 < count) this.segmentStyles.push(this.segmentStyle.clone());
|
|
3661
|
+
const segmentPoint = new (0, $8zHUo$olgeom.Point)(segment.getCoordinateAt(0.5));
|
|
3662
|
+
this.segmentStyles[count].setGeometry(segmentPoint);
|
|
3663
|
+
this.segmentStyles[count].getText().setText(label);
|
|
3664
|
+
styles.push(this.segmentStyles[count]);
|
|
3665
|
+
count++;
|
|
3666
|
+
});
|
|
3667
|
+
}
|
|
3668
|
+
if (label) {
|
|
3669
|
+
this.labelStyle.setGeometry(point);
|
|
3670
|
+
this.labelStyle.getText().setText(label);
|
|
3671
|
+
styles.push(this.labelStyle);
|
|
3672
|
+
}
|
|
3673
|
+
if (tip && type === 'Point' && !this.modify.getOverlay().getSource().getFeatures().length) {
|
|
3674
|
+
this.tipPoint = geometry;
|
|
3675
|
+
this.tipStyle.getText().setText(tip);
|
|
3676
|
+
styles.push(this.tipStyle);
|
|
3677
|
+
}
|
|
3678
|
+
return styles;
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
$8699ac28631f2b5a$var$__decorate([
|
|
3682
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3683
|
+
$8699ac28631f2b5a$var$__metadata("design:type", typeof ($8699ac28631f2b5a$var$_a = typeof (0, $e2e9872d2858bcde$export$c521bb0b406df9a3) !== "undefined" && (0, $e2e9872d2858bcde$export$c521bb0b406df9a3)) === "function" ? $8699ac28631f2b5a$var$_a : Object)
|
|
3684
|
+
], $8699ac28631f2b5a$var$MeasureDrawer.prototype, "mapManager", void 0);
|
|
3685
|
+
const $8699ac28631f2b5a$var$mdrawer = new $8699ac28631f2b5a$var$MeasureDrawer();
|
|
3686
|
+
let $8699ac28631f2b5a$export$e0edaea1e563f54d = class MeasureLineTool {
|
|
3687
|
+
constructor(){
|
|
3688
|
+
this.enabled = true;
|
|
3689
|
+
}
|
|
3690
|
+
cancel() {
|
|
3691
|
+
$8699ac28631f2b5a$var$mdrawer.stop();
|
|
3692
|
+
this.active = false;
|
|
3693
|
+
return true;
|
|
3694
|
+
}
|
|
3695
|
+
start(childKey, coord) {
|
|
3696
|
+
$8699ac28631f2b5a$var$mdrawer.start(false, coord);
|
|
3697
|
+
this.active = true;
|
|
3698
|
+
}
|
|
3699
|
+
};
|
|
3700
|
+
$8699ac28631f2b5a$export$e0edaea1e563f54d = $8699ac28631f2b5a$var$__decorate([
|
|
3701
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)({
|
|
3702
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Tool,
|
|
3703
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).ribbon,
|
|
3704
|
+
key: 'measure-line-tool',
|
|
3705
|
+
group: 'mg-general-measure',
|
|
3706
|
+
order: 1,
|
|
3707
|
+
title: 'Mesafe',
|
|
3708
|
+
iconClass: 'icon--measure-line fg-warning'
|
|
3709
|
+
}),
|
|
3710
|
+
$8699ac28631f2b5a$var$__metadata("design:paramtypes", [])
|
|
3711
|
+
], $8699ac28631f2b5a$export$e0edaea1e563f54d);
|
|
3712
|
+
let $8699ac28631f2b5a$export$bbdd8171c08a14c = class MeasureAreaTool {
|
|
3713
|
+
constructor(){
|
|
3714
|
+
this.enabled = true;
|
|
3715
|
+
}
|
|
3716
|
+
cancel() {
|
|
3717
|
+
$8699ac28631f2b5a$var$mdrawer.stop();
|
|
3718
|
+
this.active = false;
|
|
3719
|
+
return true;
|
|
3720
|
+
}
|
|
3721
|
+
start(childKey, coord) {
|
|
3722
|
+
$8699ac28631f2b5a$var$mdrawer.start(true, coord);
|
|
3723
|
+
this.active = true;
|
|
3724
|
+
}
|
|
3725
|
+
};
|
|
3726
|
+
$8699ac28631f2b5a$export$bbdd8171c08a14c = $8699ac28631f2b5a$var$__decorate([
|
|
3727
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)({
|
|
3728
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Tool,
|
|
3729
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).ribbon,
|
|
3730
|
+
key: 'measure-area-tool',
|
|
3731
|
+
group: 'mg-general-measure',
|
|
3732
|
+
order: 2,
|
|
3733
|
+
title: 'Alan',
|
|
3734
|
+
iconClass: 'icon--measure-area fg-warning'
|
|
3735
|
+
}),
|
|
3736
|
+
$8699ac28631f2b5a$var$__metadata("design:paramtypes", [])
|
|
3737
|
+
], $8699ac28631f2b5a$export$bbdd8171c08a14c);
|
|
3738
|
+
const $8699ac28631f2b5a$var$cmxPropsLine = {
|
|
3739
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Command,
|
|
3740
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).mapCtx,
|
|
3741
|
+
key: 'ctx-measure-line-tool',
|
|
3742
|
+
group: '',
|
|
3743
|
+
order: 1,
|
|
3744
|
+
title: "Mesafe \xd6l\xe7",
|
|
3745
|
+
iconClass: 'icon--measure-line fg-warning',
|
|
3746
|
+
canExecuteFor: (sa)=>{
|
|
3747
|
+
return !sa.ci;
|
|
3748
|
+
}
|
|
3749
|
+
};
|
|
3750
|
+
let $8699ac28631f2b5a$export$7f173efc34e4c794 = class MeasureLineToolCtx {
|
|
3751
|
+
constructor(){
|
|
3752
|
+
this.enabled = true;
|
|
3753
|
+
}
|
|
3754
|
+
start(childKey, sa) {
|
|
3755
|
+
this.cmdService.startCommand('measure-line-tool', childKey, sa === null || sa === void 0 ? void 0 : sa.coord);
|
|
3756
|
+
}
|
|
3757
|
+
};
|
|
3758
|
+
$8699ac28631f2b5a$var$__decorate([
|
|
3759
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3760
|
+
$8699ac28631f2b5a$var$__metadata("design:type", typeof ($8699ac28631f2b5a$var$_b = typeof (0, $8zHUo$yesilyazilimwebspa.CommandService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.CommandService)) === "function" ? $8699ac28631f2b5a$var$_b : Object)
|
|
3761
|
+
], $8699ac28631f2b5a$export$7f173efc34e4c794.prototype, "cmdService", void 0);
|
|
3762
|
+
$8699ac28631f2b5a$export$7f173efc34e4c794 = $8699ac28631f2b5a$var$__decorate([
|
|
3763
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)($8699ac28631f2b5a$var$cmxPropsLine),
|
|
3764
|
+
$8699ac28631f2b5a$var$__metadata("design:paramtypes", [])
|
|
3765
|
+
], $8699ac28631f2b5a$export$7f173efc34e4c794);
|
|
3766
|
+
const $8699ac28631f2b5a$var$cmxPropsArea = {
|
|
3767
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Command,
|
|
3768
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).mapCtx,
|
|
3769
|
+
key: 'ctx-measure-area-tool',
|
|
3770
|
+
group: '',
|
|
3771
|
+
order: 2,
|
|
3772
|
+
title: "Alan \xd6l\xe7",
|
|
3773
|
+
iconClass: 'icon--measure-area fg-warning',
|
|
3774
|
+
canExecuteFor: (sa)=>{
|
|
3775
|
+
return !sa.ci;
|
|
3776
|
+
}
|
|
3777
|
+
};
|
|
3778
|
+
let $8699ac28631f2b5a$export$984ce43c3197b583 = class MeasureAreaToolCtx {
|
|
3779
|
+
constructor(){
|
|
3780
|
+
this.enabled = true;
|
|
3781
|
+
}
|
|
3782
|
+
start(childKey, sa) {
|
|
3783
|
+
this.cmdService.startCommand('measure-area-tool', childKey, sa === null || sa === void 0 ? void 0 : sa.coord);
|
|
3784
|
+
}
|
|
3785
|
+
};
|
|
3786
|
+
$8699ac28631f2b5a$var$__decorate([
|
|
3787
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3788
|
+
$8699ac28631f2b5a$var$__metadata("design:type", typeof ($8699ac28631f2b5a$var$_c = typeof (0, $8zHUo$yesilyazilimwebspa.CommandService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.CommandService)) === "function" ? $8699ac28631f2b5a$var$_c : Object)
|
|
3789
|
+
], $8699ac28631f2b5a$export$984ce43c3197b583.prototype, "cmdService", void 0);
|
|
3790
|
+
$8699ac28631f2b5a$export$984ce43c3197b583 = $8699ac28631f2b5a$var$__decorate([
|
|
3791
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)($8699ac28631f2b5a$var$cmxPropsArea),
|
|
3792
|
+
$8699ac28631f2b5a$var$__metadata("design:paramtypes", [])
|
|
3793
|
+
], $8699ac28631f2b5a$export$984ce43c3197b583);
|
|
3794
|
+
|
|
3795
|
+
|
|
3796
|
+
|
|
3797
|
+
$e17bdfcbfec5a561$exports = {
|
|
3798
|
+
"basemap.command.ts": $26125c547f0400d9$exports,
|
|
3799
|
+
"default.tool.ts": $60509b0aa95160f5$exports,
|
|
3800
|
+
"full-screen.command.ts": $c0b07e14125bcef7$exports,
|
|
3801
|
+
"goto.command.ts": $6abe3e0619c616f6$exports,
|
|
3802
|
+
"identify.command.ts": $c7f05d18b5daffca$exports,
|
|
3803
|
+
"measure.tool.ts": $8699ac28631f2b5a$exports,
|
|
3804
|
+
"styles.less": {}
|
|
3805
|
+
};
|
|
3806
|
+
|
|
3807
|
+
|
|
3808
|
+
var $a1772d70f6472cf3$exports = {};
|
|
3809
|
+
var $0886c8bb6256cf0c$exports = {};
|
|
3810
|
+
|
|
3811
|
+
$parcel$export($0886c8bb6256cf0c$exports, "ShLayerListCommand", () => $0886c8bb6256cf0c$export$11ede7347ce61760);
|
|
3812
|
+
|
|
3813
|
+
|
|
3814
|
+
var $3244a3c7a3ab6329$exports = {};
|
|
3815
|
+
|
|
3816
|
+
$parcel$export($3244a3c7a3ab6329$exports, "TocComponent", () => $3244a3c7a3ab6329$export$ffc1366d10787ec1);
|
|
3817
|
+
|
|
3818
|
+
|
|
3819
|
+
|
|
3820
|
+
var $3244a3c7a3ab6329$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
3821
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3822
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3823
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3824
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3825
|
+
};
|
|
3826
|
+
var $3244a3c7a3ab6329$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
3827
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3828
|
+
};
|
|
3829
|
+
var $3244a3c7a3ab6329$var$_a;
|
|
3830
|
+
let $3244a3c7a3ab6329$export$ffc1366d10787ec1 = class TocComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
3831
|
+
constructor(){
|
|
3832
|
+
super();
|
|
3833
|
+
this._tree = new (0, $8zHUo$yesilyazilimwebspa.TreeView)(this.layerManager.layerList, {
|
|
3834
|
+
selection: {
|
|
3835
|
+
mode: 'multi'
|
|
3836
|
+
}
|
|
3837
|
+
});
|
|
3838
|
+
this.appendChild(this._tree);
|
|
3839
|
+
}
|
|
3840
|
+
};
|
|
3841
|
+
$3244a3c7a3ab6329$var$__decorate([
|
|
3842
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3843
|
+
$3244a3c7a3ab6329$var$__metadata("design:type", typeof ($3244a3c7a3ab6329$var$_a = typeof (0, $a28fe88e0f106608$export$eff87c52915dd7fe) !== "undefined" && (0, $a28fe88e0f106608$export$eff87c52915dd7fe)) === "function" ? $3244a3c7a3ab6329$var$_a : Object)
|
|
3844
|
+
], $3244a3c7a3ab6329$export$ffc1366d10787ec1.prototype, "layerManager", void 0);
|
|
3845
|
+
$3244a3c7a3ab6329$export$ffc1366d10787ec1 = $3244a3c7a3ab6329$var$__decorate([
|
|
3846
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
3847
|
+
elementName: "app-toc"
|
|
3848
|
+
}),
|
|
3849
|
+
$3244a3c7a3ab6329$var$__metadata("design:paramtypes", [])
|
|
3850
|
+
], $3244a3c7a3ab6329$export$ffc1366d10787ec1);
|
|
3851
|
+
|
|
3852
|
+
|
|
3853
|
+
var $0886c8bb6256cf0c$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
3854
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3855
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3856
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3857
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3858
|
+
};
|
|
3859
|
+
var $0886c8bb6256cf0c$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
3860
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3861
|
+
};
|
|
3862
|
+
var $0886c8bb6256cf0c$var$_a;
|
|
3863
|
+
let $0886c8bb6256cf0c$export$11ede7347ce61760 = class ShLayerListCommand {
|
|
3864
|
+
constructor(){
|
|
3865
|
+
this.enabled = true;
|
|
3866
|
+
this.active = true;
|
|
3867
|
+
}
|
|
3868
|
+
start(childKey) {
|
|
3869
|
+
if (this.application.isPanelOpen('panel-map-toc')) this.application.closePanelAsync('panel-map-toc');
|
|
3870
|
+
else this.application.openPanel({
|
|
3871
|
+
closable: false,
|
|
3872
|
+
name: 'panel-map-toc',
|
|
3873
|
+
header: 'Katmanlar',
|
|
3874
|
+
content: new (0, $3244a3c7a3ab6329$export$ffc1366d10787ec1)(),
|
|
3875
|
+
draggable: true
|
|
3876
|
+
}, (0, $8zHUo$yesilyazilimwebspa.PanelPos).Left);
|
|
3877
|
+
this.active = !this.active;
|
|
3878
|
+
}
|
|
3879
|
+
};
|
|
3880
|
+
$0886c8bb6256cf0c$var$__decorate([
|
|
3881
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3882
|
+
$0886c8bb6256cf0c$var$__metadata("design:type", typeof ($0886c8bb6256cf0c$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.Application) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.Application)) === "function" ? $0886c8bb6256cf0c$var$_a : Object)
|
|
3883
|
+
], $0886c8bb6256cf0c$export$11ede7347ce61760.prototype, "application", void 0);
|
|
3884
|
+
$0886c8bb6256cf0c$export$11ede7347ce61760 = $0886c8bb6256cf0c$var$__decorate([
|
|
3885
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)({
|
|
3886
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Command,
|
|
3887
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).ribbon,
|
|
3888
|
+
key: 'view-sh-layerlist',
|
|
3889
|
+
group: 'mg-view-panels',
|
|
3890
|
+
order: 1,
|
|
3891
|
+
title: 'Katmanlar',
|
|
3892
|
+
iconClass: 'bi bi-layers'
|
|
3893
|
+
}),
|
|
3894
|
+
$0886c8bb6256cf0c$var$__metadata("design:paramtypes", [])
|
|
3895
|
+
], $0886c8bb6256cf0c$export$11ede7347ce61760);
|
|
3896
|
+
|
|
3897
|
+
|
|
3898
|
+
var $00bc23a8c2168d56$exports = {};
|
|
3899
|
+
|
|
3900
|
+
$parcel$export($00bc23a8c2168d56$exports, "ShLegendCommand", () => $00bc23a8c2168d56$export$2ba7b7ff482be773);
|
|
3901
|
+
|
|
3902
|
+
|
|
3903
|
+
var $592c9f0aa7568173$exports = {};
|
|
3904
|
+
|
|
3905
|
+
$parcel$export($592c9f0aa7568173$exports, "LegendComponent", () => $592c9f0aa7568173$export$78003ba218df33f3);
|
|
3906
|
+
$parcel$export($592c9f0aa7568173$exports, "LayerLegentItem", () => $592c9f0aa7568173$export$20031d91c4cb08c7);
|
|
3907
|
+
|
|
3908
|
+
|
|
3909
|
+
|
|
3910
|
+
|
|
3911
|
+
|
|
3912
|
+
var $592c9f0aa7568173$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
3913
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3914
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3915
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3916
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3917
|
+
};
|
|
3918
|
+
var $592c9f0aa7568173$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
3919
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3920
|
+
};
|
|
3921
|
+
var $592c9f0aa7568173$var$_a, $592c9f0aa7568173$var$_b, $592c9f0aa7568173$var$_c;
|
|
3922
|
+
let $592c9f0aa7568173$export$78003ba218df33f3 = class LegendComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
3923
|
+
constructor(lazy){
|
|
3924
|
+
super();
|
|
3925
|
+
if (lazy) this._attach();
|
|
3926
|
+
else this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapReady, ()=>{
|
|
3927
|
+
this._attach();
|
|
3928
|
+
}, this.getDisposedSignal());
|
|
3929
|
+
}
|
|
3930
|
+
_attach() {
|
|
3931
|
+
this.listComp = new (0, $8zHUo$yesilyazilimwebspa.ListComponent)({
|
|
3932
|
+
source: this.layerManager.layerList,
|
|
3933
|
+
itemFactory: this._createListItem.bind(this)
|
|
3934
|
+
});
|
|
3935
|
+
this.appendChild(this.listComp);
|
|
3936
|
+
}
|
|
3937
|
+
_createListItem(layer) {
|
|
3938
|
+
const div = (0, $8zHUo$yesilyazilimwebspa.ELF).div('main-legend-item');
|
|
3939
|
+
var mainHeader = (0, $8zHUo$yesilyazilimwebspa.ELF).h(3, layer.title);
|
|
3940
|
+
div.appendChild(mainHeader);
|
|
3941
|
+
if (layer.hasMapLayer) {
|
|
3942
|
+
const ml = layer;
|
|
3943
|
+
const infos = ml.getLegendInfos();
|
|
3944
|
+
if (infos && infos.length > 0) {
|
|
3945
|
+
let skipTitle = false;
|
|
3946
|
+
if (infos.length == 1 && infos[0].title == layer.title) skipTitle = true;
|
|
3947
|
+
for (const info of infos){
|
|
3948
|
+
const subItem = new $592c9f0aa7568173$export$20031d91c4cb08c7(info, skipTitle);
|
|
3949
|
+
div.appendChild(subItem);
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
}
|
|
3953
|
+
return div;
|
|
3954
|
+
}
|
|
3955
|
+
};
|
|
3956
|
+
$592c9f0aa7568173$var$__decorate([
|
|
3957
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3958
|
+
$592c9f0aa7568173$var$__metadata("design:type", typeof ($592c9f0aa7568173$var$_a = typeof (0, $a28fe88e0f106608$export$eff87c52915dd7fe) !== "undefined" && (0, $a28fe88e0f106608$export$eff87c52915dd7fe)) === "function" ? $592c9f0aa7568173$var$_a : Object)
|
|
3959
|
+
], $592c9f0aa7568173$export$78003ba218df33f3.prototype, "layerManager", void 0);
|
|
3960
|
+
$592c9f0aa7568173$var$__decorate([
|
|
3961
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3962
|
+
$592c9f0aa7568173$var$__metadata("design:type", typeof ($592c9f0aa7568173$var$_b = typeof (0, $e2e9872d2858bcde$export$c521bb0b406df9a3) !== "undefined" && (0, $e2e9872d2858bcde$export$c521bb0b406df9a3)) === "function" ? $592c9f0aa7568173$var$_b : Object)
|
|
3963
|
+
], $592c9f0aa7568173$export$78003ba218df33f3.prototype, "mapManager", void 0);
|
|
3964
|
+
$592c9f0aa7568173$var$__decorate([
|
|
3965
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
3966
|
+
$592c9f0aa7568173$var$__metadata("design:type", typeof ($592c9f0aa7568173$var$_c = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $592c9f0aa7568173$var$_c : Object)
|
|
3967
|
+
], $592c9f0aa7568173$export$78003ba218df33f3.prototype, "eventService", void 0);
|
|
3968
|
+
$592c9f0aa7568173$export$78003ba218df33f3 = $592c9f0aa7568173$var$__decorate([
|
|
3969
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
3970
|
+
elementName: "app-map-legend"
|
|
3971
|
+
}),
|
|
3972
|
+
$592c9f0aa7568173$var$__metadata("design:paramtypes", [
|
|
3973
|
+
Boolean
|
|
3974
|
+
])
|
|
3975
|
+
], $592c9f0aa7568173$export$78003ba218df33f3);
|
|
3976
|
+
let $592c9f0aa7568173$export$20031d91c4cb08c7 = class LayerLegentItem extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
3977
|
+
get layerId() {
|
|
3978
|
+
return this.info.layerId;
|
|
3979
|
+
}
|
|
3980
|
+
constructor(info, skipTitle){
|
|
3981
|
+
super();
|
|
3982
|
+
this.info = info;
|
|
3983
|
+
if (!skipTitle) {
|
|
3984
|
+
this.appendChild((0, $8zHUo$yesilyazilimwebspa.ELF).label(info.title, 'legend-title'));
|
|
3985
|
+
if (info.subtitle) this.appendChild((0, $8zHUo$yesilyazilimwebspa.ELF).label(info.subtitle, 'legend-subtitle'));
|
|
3986
|
+
}
|
|
3987
|
+
this.appendChild(this._getRowsTable());
|
|
3988
|
+
}
|
|
3989
|
+
_getRowsTable() {
|
|
3990
|
+
const table = document.createElement('table');
|
|
3991
|
+
table.setClasses('legend-table');
|
|
3992
|
+
if (this.info.rows && this.info.rows.length > 0) for (const ls of this.info.rows){
|
|
3993
|
+
const row = document.createElement('tr');
|
|
3994
|
+
const c1 = document.createElement('td');
|
|
3995
|
+
c1.setClasses('leg-image-col');
|
|
3996
|
+
const c2 = document.createElement('td');
|
|
3997
|
+
if (ls.elm) c1.appendChildren(ls.elm);
|
|
3998
|
+
if (ls.label) c2.innerText = ls.label;
|
|
3999
|
+
row.appendChildren(c1, c2);
|
|
4000
|
+
table.appendChild(row);
|
|
4001
|
+
}
|
|
4002
|
+
return table;
|
|
4003
|
+
}
|
|
4004
|
+
};
|
|
4005
|
+
$592c9f0aa7568173$export$20031d91c4cb08c7 = $592c9f0aa7568173$var$__decorate([
|
|
4006
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
4007
|
+
elementName: 'app-layer-legend-item'
|
|
4008
|
+
}),
|
|
4009
|
+
$592c9f0aa7568173$var$__metadata("design:paramtypes", [
|
|
4010
|
+
Object,
|
|
4011
|
+
Boolean
|
|
4012
|
+
])
|
|
4013
|
+
], $592c9f0aa7568173$export$20031d91c4cb08c7);
|
|
4014
|
+
|
|
4015
|
+
|
|
4016
|
+
var $00bc23a8c2168d56$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
4017
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4018
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4019
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4020
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4021
|
+
};
|
|
4022
|
+
var $00bc23a8c2168d56$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
4023
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4024
|
+
};
|
|
4025
|
+
var $00bc23a8c2168d56$var$_a;
|
|
4026
|
+
let $00bc23a8c2168d56$export$2ba7b7ff482be773 = class ShLegendCommand {
|
|
4027
|
+
constructor(){
|
|
4028
|
+
this.enabled = true;
|
|
4029
|
+
this.active = true;
|
|
4030
|
+
}
|
|
4031
|
+
start(childKey) {
|
|
4032
|
+
if (this.application.isPanelOpen('panel-map-legend')) this.application.closePanelAsync('panel-map-legend');
|
|
4033
|
+
else this.application.openPanel({
|
|
4034
|
+
closable: false,
|
|
4035
|
+
name: 'panel-map-legend',
|
|
4036
|
+
header: 'Lejant',
|
|
4037
|
+
content: new (0, $592c9f0aa7568173$export$78003ba218df33f3)(true),
|
|
4038
|
+
draggable: true
|
|
4039
|
+
}, (0, $8zHUo$yesilyazilimwebspa.PanelPos).Left);
|
|
4040
|
+
this.active = !this.active;
|
|
4041
|
+
}
|
|
4042
|
+
};
|
|
4043
|
+
$00bc23a8c2168d56$var$__decorate([
|
|
4044
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
4045
|
+
$00bc23a8c2168d56$var$__metadata("design:type", typeof ($00bc23a8c2168d56$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.Application) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.Application)) === "function" ? $00bc23a8c2168d56$var$_a : Object)
|
|
4046
|
+
], $00bc23a8c2168d56$export$2ba7b7ff482be773.prototype, "application", void 0);
|
|
4047
|
+
$00bc23a8c2168d56$export$2ba7b7ff482be773 = $00bc23a8c2168d56$var$__decorate([
|
|
4048
|
+
(0, $8zHUo$yesilyazilimwebspa.Command)({
|
|
4049
|
+
type: (0, $8zHUo$yesilyazilimwebspa.CommandTypes).Command,
|
|
4050
|
+
container: (0, $91d76f4d8e753f27$export$b29ff6cb22936cb7).ribbon,
|
|
4051
|
+
key: 'view-sh-legend',
|
|
4052
|
+
group: 'mg-view-panels',
|
|
4053
|
+
order: 2,
|
|
4054
|
+
title: 'Lejant',
|
|
4055
|
+
iconClass: 'bi bi-layers'
|
|
4056
|
+
}),
|
|
4057
|
+
$00bc23a8c2168d56$var$__metadata("design:paramtypes", [])
|
|
4058
|
+
], $00bc23a8c2168d56$export$2ba7b7ff482be773);
|
|
4059
|
+
|
|
4060
|
+
|
|
4061
|
+
$a1772d70f6472cf3$exports = {
|
|
4062
|
+
"sh-layerlist.command.ts": $0886c8bb6256cf0c$exports,
|
|
4063
|
+
"sh-legend.command.ts": $00bc23a8c2168d56$exports
|
|
4064
|
+
};
|
|
4065
|
+
|
|
4066
|
+
|
|
4067
|
+
var $b052729e6971afe9$exports = {};
|
|
4068
|
+
|
|
4069
|
+
$parcel$export($b052729e6971afe9$exports, "MapComponent", () => $b052729e6971afe9$export$c8c02c9c269eb8dd);
|
|
4070
|
+
|
|
4071
|
+
|
|
4072
|
+
|
|
4073
|
+
|
|
4074
|
+
|
|
4075
|
+
|
|
4076
|
+
|
|
4077
|
+
|
|
4078
|
+
|
|
4079
|
+
|
|
4080
|
+
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
|
|
4084
|
+
|
|
4085
|
+
|
|
4086
|
+
|
|
4087
|
+
|
|
4088
|
+
|
|
4089
|
+
|
|
4090
|
+
|
|
4091
|
+
|
|
4092
|
+
|
|
4093
|
+
|
|
4094
|
+
|
|
4095
|
+
|
|
4096
|
+
var $7740a0eda7f57417$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
4097
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4098
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4099
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4100
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4101
|
+
};
|
|
4102
|
+
var $7740a0eda7f57417$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
4103
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4104
|
+
};
|
|
4105
|
+
var $7740a0eda7f57417$var$_a;
|
|
4106
|
+
let $7740a0eda7f57417$export$6c0f1ba6587d9386 = class MinimapComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
4107
|
+
constructor(_srcMap){
|
|
4108
|
+
super();
|
|
4109
|
+
this._srcMap = _srcMap;
|
|
4110
|
+
this._maxZoom = 15;
|
|
4111
|
+
this._buildUI();
|
|
4112
|
+
}
|
|
4113
|
+
_buildUI() {
|
|
4114
|
+
const mapDiv = (0, $8zHUo$yesilyazilimwebspa.ELF).div("wh-100");
|
|
4115
|
+
this.appendChild(mapDiv);
|
|
4116
|
+
const baseLayer = new (0, ($parcel$interopDefault($8zHUo$ollayerTile)))({
|
|
4117
|
+
source: new (0, ($parcel$interopDefault($8zHUo$olsourceOSM)))()
|
|
4118
|
+
});
|
|
4119
|
+
this._areaFeature = new (0, $8zHUo$ol.Feature)();
|
|
4120
|
+
const vlayer = new (0, ($parcel$interopDefault($8zHUo$ollayerVector)))({
|
|
4121
|
+
source: new (0, $8zHUo$olsource.Vector)({
|
|
4122
|
+
features: [
|
|
4123
|
+
this._areaFeature
|
|
4124
|
+
]
|
|
4125
|
+
}),
|
|
4126
|
+
style: new (0, $8zHUo$olstyle.Style)({
|
|
4127
|
+
stroke: new (0, $8zHUo$olstyle.Stroke)({
|
|
4128
|
+
color: "#3f51b5",
|
|
4129
|
+
width: 2
|
|
4130
|
+
}),
|
|
4131
|
+
image: new (0, $8zHUo$olstyle.Circle)({
|
|
4132
|
+
radius: 5,
|
|
4133
|
+
fill: new (0, $8zHUo$olstyle.Fill)({
|
|
4134
|
+
color: "#3f51b5"
|
|
4135
|
+
})
|
|
4136
|
+
})
|
|
4137
|
+
})
|
|
4138
|
+
});
|
|
4139
|
+
this._map = new (0, ($parcel$interopDefault($8zHUo$olMap)))({
|
|
4140
|
+
target: mapDiv,
|
|
4141
|
+
layers: [
|
|
4142
|
+
baseLayer,
|
|
4143
|
+
vlayer
|
|
4144
|
+
],
|
|
4145
|
+
view: new (0, ($parcel$interopDefault($8zHUo$olView)))({
|
|
4146
|
+
center: [
|
|
4147
|
+
0,
|
|
4148
|
+
0
|
|
4149
|
+
],
|
|
4150
|
+
zoom: 0,
|
|
4151
|
+
maxZoom: this._maxZoom
|
|
4152
|
+
}),
|
|
4153
|
+
controls: []
|
|
4154
|
+
});
|
|
4155
|
+
this._srcMap.on('moveend', ()=>{
|
|
4156
|
+
this._refreshView();
|
|
4157
|
+
});
|
|
4158
|
+
}
|
|
4159
|
+
_refreshView() {
|
|
4160
|
+
const view = this._srcMap.getView();
|
|
4161
|
+
const vse = view.getViewStateAndExtent();
|
|
4162
|
+
const zoom = Math.max(Math.min(Math.trunc(view.getZoom()) - 4, this._maxZoom), 0);
|
|
4163
|
+
const newPolygon = (0, $8zHUo$olgeomPolygon.fromExtent)(vse.extent);
|
|
4164
|
+
const newGeom = view.getZoom() - this._maxZoom > 6 ? newPolygon.getInteriorPoint() : newPolygon;
|
|
4165
|
+
this._areaFeature.setGeometry(newGeom);
|
|
4166
|
+
const tview = this._map.getView();
|
|
4167
|
+
tview.setCenter(view.getCenter());
|
|
4168
|
+
tview.setZoom(zoom);
|
|
4169
|
+
}
|
|
4170
|
+
};
|
|
4171
|
+
$7740a0eda7f57417$export$6c0f1ba6587d9386 = $7740a0eda7f57417$var$__decorate([
|
|
4172
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
4173
|
+
elementName: 'app-minimap',
|
|
4174
|
+
styles: {
|
|
4175
|
+
width: '250px',
|
|
4176
|
+
height: '150px'
|
|
4177
|
+
}
|
|
4178
|
+
}),
|
|
4179
|
+
$7740a0eda7f57417$var$__metadata("design:paramtypes", [
|
|
4180
|
+
typeof ($7740a0eda7f57417$var$_a = typeof (0, ($parcel$interopDefault($8zHUo$olMap))) !== "undefined" && (0, ($parcel$interopDefault($8zHUo$olMap)))) === "function" ? $7740a0eda7f57417$var$_a : Object
|
|
4181
|
+
])
|
|
4182
|
+
], $7740a0eda7f57417$export$6c0f1ba6587d9386);
|
|
4183
|
+
|
|
4184
|
+
|
|
4185
|
+
var $1d98a541f33fb0d2$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
4186
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4187
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4188
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4189
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4190
|
+
};
|
|
4191
|
+
var $1d98a541f33fb0d2$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
4192
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4193
|
+
};
|
|
4194
|
+
var $1d98a541f33fb0d2$var$_a;
|
|
4195
|
+
const $1d98a541f33fb0d2$var$INCHES_PER_METRE = 39.37;
|
|
4196
|
+
const $1d98a541f33fb0d2$var$numFormatter = new Intl.NumberFormat();
|
|
4197
|
+
let $1d98a541f33fb0d2$export$f92b46dcd8b8121b = class MapBarComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
4198
|
+
constructor(_map){
|
|
4199
|
+
super();
|
|
4200
|
+
this._map = _map;
|
|
4201
|
+
this._controls = [];
|
|
4202
|
+
this._scaleDiv = (0, $8zHUo$yesilyazilimwebspa.ELF).div('scale-div');
|
|
4203
|
+
this.appendChild(this._scaleDiv);
|
|
4204
|
+
this._mousePosDiv = (0, $8zHUo$yesilyazilimwebspa.ELF).div('mouse-position');
|
|
4205
|
+
this.appendChild(this._mousePosDiv);
|
|
4206
|
+
this._zoomDiv = (0, $8zHUo$yesilyazilimwebspa.ELF).label('0');
|
|
4207
|
+
this._mousePosDiv.appendChild(this._zoomDiv.setClasses('zoom-label'));
|
|
4208
|
+
this._overviewBtn = (0, $8zHUo$yesilyazilimwebspa.ELF).button(null, 'Mini Map', 'overview-btn', 'bi bi-arrow-down-right-square-fill', ()=>{
|
|
4209
|
+
this._overviewDiv.classList.toggle('show');
|
|
4210
|
+
});
|
|
4211
|
+
this._overviewDiv = (0, $8zHUo$yesilyazilimwebspa.ELF).div('overview-div', new (0, $7740a0eda7f57417$export$6c0f1ba6587d9386)(this._map));
|
|
4212
|
+
this.appendChild(this._overviewBtn);
|
|
4213
|
+
this.appendChild(this._overviewDiv);
|
|
4214
|
+
let dpi = 0;
|
|
4215
|
+
var calcDpi = function() {
|
|
4216
|
+
if (window.matchMedia("(min-resolution: 10dpi)").matches) {
|
|
4217
|
+
for(var i = 650; i >= 1; i = i - 1)if (window.matchMedia("(min-resolution: " + i + "dpi)").matches) {
|
|
4218
|
+
dpi = i;
|
|
4219
|
+
break;
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
};
|
|
4223
|
+
this._map.on('moveend', ()=>{
|
|
4224
|
+
const view = this._map.getView();
|
|
4225
|
+
const resolution = view.getResolution();
|
|
4226
|
+
const unit = view.getProjection().getUnits();
|
|
4227
|
+
calcDpi();
|
|
4228
|
+
(0, $8zHUo$yesilyazilimwebspa.DevLogger).log('MapExt ', {
|
|
4229
|
+
resolution: resolution,
|
|
4230
|
+
cent: view.getCenter(),
|
|
4231
|
+
ext: view.calculateExtent()
|
|
4232
|
+
});
|
|
4233
|
+
let scale = Math.round(resolution * (0, $8zHUo$olprojUnits.METERS_PER_UNIT)[unit] * $1d98a541f33fb0d2$var$INCHES_PER_METRE * dpi);
|
|
4234
|
+
this._zoomDiv.innerText = 'Zoom: ' + view.getZoom().toFixed(0) + " \xd6l\xe7ek: 1/" + $1d98a541f33fb0d2$var$numFormatter.format(scale);
|
|
4235
|
+
});
|
|
4236
|
+
this._createControls();
|
|
4237
|
+
}
|
|
4238
|
+
get controls() {
|
|
4239
|
+
return this._controls;
|
|
4240
|
+
}
|
|
4241
|
+
_createControls() {
|
|
4242
|
+
this._mousePosCtl = new (0, ($parcel$interopDefault($8zHUo$olcontrolMousePosition)))({
|
|
4243
|
+
coordinateFormat: (0, $10571313f00c012e$export$4691a8a9ff232a6b).formatCoordWgs,
|
|
4244
|
+
projection: 'EPSG:4326',
|
|
4245
|
+
target: this._mousePosDiv
|
|
4246
|
+
});
|
|
4247
|
+
this._controls.push(this._mousePosCtl);
|
|
4248
|
+
this._scaleLineCtl = new (0, ($parcel$interopDefault($8zHUo$olcontrolScaleLine)))({
|
|
4249
|
+
target: this
|
|
4250
|
+
});
|
|
4251
|
+
this._controls.push(this._scaleLineCtl);
|
|
4252
|
+
}
|
|
4253
|
+
};
|
|
4254
|
+
$1d98a541f33fb0d2$export$f92b46dcd8b8121b = $1d98a541f33fb0d2$var$__decorate([
|
|
4255
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
4256
|
+
elementName: 'app-map-bar'
|
|
4257
|
+
}),
|
|
4258
|
+
$1d98a541f33fb0d2$var$__metadata("design:paramtypes", [
|
|
4259
|
+
typeof ($1d98a541f33fb0d2$var$_a = typeof (0, ($parcel$interopDefault($8zHUo$olMap))) !== "undefined" && (0, ($parcel$interopDefault($8zHUo$olMap)))) === "function" ? $1d98a541f33fb0d2$var$_a : Object
|
|
4260
|
+
])
|
|
4261
|
+
], $1d98a541f33fb0d2$export$f92b46dcd8b8121b);
|
|
4262
|
+
|
|
4263
|
+
|
|
4264
|
+
|
|
4265
|
+
|
|
4266
|
+
|
|
4267
|
+
var $6c9d3937549b2f07$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
4268
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4269
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4270
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4271
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4272
|
+
};
|
|
4273
|
+
var $6c9d3937549b2f07$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
4274
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4275
|
+
};
|
|
4276
|
+
var $6c9d3937549b2f07$var$_a;
|
|
4277
|
+
let $6c9d3937549b2f07$export$8f16e9c3e7703006 = class MapSearchComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
4278
|
+
constructor(settings){
|
|
4279
|
+
super();
|
|
4280
|
+
this._searchTimeout = null;
|
|
4281
|
+
this._onSearchClicked = ()=>{
|
|
4282
|
+
if (!this._activeSource) return;
|
|
4283
|
+
this._results.clear();
|
|
4284
|
+
const st = this._textBox.value.trim();
|
|
4285
|
+
if (!st) return;
|
|
4286
|
+
const vr = this._activeSource.validate(st);
|
|
4287
|
+
if (!vr.success) {
|
|
4288
|
+
(0, $8zHUo$yesilyazilimwebspa.Notify).Warning("Arama yap\u0131lamaz !", vr.message);
|
|
4289
|
+
return;
|
|
4290
|
+
}
|
|
4291
|
+
const displayResults = (res)=>{
|
|
4292
|
+
var _a;
|
|
4293
|
+
if (!res.success) (0, $8zHUo$yesilyazilimwebspa.Notify).Error("Arama yap\u0131lamad\u0131 !", res.message);
|
|
4294
|
+
else if (((_a = res.data) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
4295
|
+
this._results.addMany(...res.data);
|
|
4296
|
+
this._dropDownResults.visible = true;
|
|
4297
|
+
} else (0, $8zHUo$yesilyazilimwebspa.Notify).Warning("Kay\u0131t bulunamad\u0131 !");
|
|
4298
|
+
};
|
|
4299
|
+
if (this._activeSource.type == 'local') {
|
|
4300
|
+
const res = this._activeSource.run(st);
|
|
4301
|
+
displayResults(res);
|
|
4302
|
+
} else {
|
|
4303
|
+
(0, $8zHUo$yesilyazilimwebspa.ELF).showHideWorkingAt(this, true, 'bottom');
|
|
4304
|
+
this._activeSource.runAsync(st).then((res)=>{
|
|
4305
|
+
(0, $8zHUo$yesilyazilimwebspa.ELF).showHideWorkingAt(this, false);
|
|
4306
|
+
displayResults(res);
|
|
4307
|
+
}).catch(()=>{
|
|
4308
|
+
(0, $8zHUo$yesilyazilimwebspa.ELF).showHideWorkingAt(this, false);
|
|
4309
|
+
(0, $8zHUo$yesilyazilimwebspa.Notify).Error('Arama hatasi !');
|
|
4310
|
+
});
|
|
4311
|
+
}
|
|
4312
|
+
};
|
|
4313
|
+
this._createResultItem = (item)=>{
|
|
4314
|
+
if (!this._activeSource) return null;
|
|
4315
|
+
const searchText = this._textBox.value.trim();
|
|
4316
|
+
const actions = this._createResultActions(item);
|
|
4317
|
+
const title = this._createMarkedText('item-title', item.text, searchText);
|
|
4318
|
+
const detailParts = item.detail ? item.detail.split(' - ').map((p)=>p.trim()) : [];
|
|
4319
|
+
const detail = detailParts.length > 0 ? (0, $8zHUo$yesilyazilimwebspa.ELF).div('item-detail', ...detailParts.map((part)=>this._createMarkedText('detail-line', part, searchText))) : null;
|
|
4320
|
+
const body = (0, $8zHUo$yesilyazilimwebspa.ELF).div('text-body', title, detail);
|
|
4321
|
+
if (item.location) body.addEventListener('click', ()=>{
|
|
4322
|
+
const data = {
|
|
4323
|
+
geom: item.location
|
|
4324
|
+
};
|
|
4325
|
+
this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapFlashGeomRequest, data);
|
|
4326
|
+
});
|
|
4327
|
+
return (0, $8zHUo$yesilyazilimwebspa.ELF).div('search-result-item', body, actions);
|
|
4328
|
+
};
|
|
4329
|
+
this._sources = settings.sources || [];
|
|
4330
|
+
this._results = new (0, $8zHUo$yesilyazilimwebspa.IndexedList)();
|
|
4331
|
+
}
|
|
4332
|
+
onConnected(isFirst) {
|
|
4333
|
+
var _a;
|
|
4334
|
+
if (!isFirst) return;
|
|
4335
|
+
const icon = (0, $8zHUo$yesilyazilimwebspa.ELF).icon((0, $8zHUo$yesilyazilimwebspa.IconClass).search + ' search-logo');
|
|
4336
|
+
const cmb = (0, $8zHUo$yesilyazilimwebspa.ELF).selectWithLookup(...this._sources);
|
|
4337
|
+
this._textBox = (0, $8zHUo$yesilyazilimwebspa.ELF).input('text');
|
|
4338
|
+
this._textBox.addEventListener('input', ()=>{
|
|
4339
|
+
if (this._searchTimeout) clearTimeout(this._searchTimeout);
|
|
4340
|
+
this._searchTimeout = setTimeout(()=>{
|
|
4341
|
+
this._onSearchClicked();
|
|
4342
|
+
}, 300);
|
|
4343
|
+
});
|
|
4344
|
+
this._textBox.addEventListener('keyup', (e)=>{
|
|
4345
|
+
if (e.key === 'Enter') {
|
|
4346
|
+
if (this._searchTimeout) clearTimeout(this._searchTimeout);
|
|
4347
|
+
this._onSearchClicked();
|
|
4348
|
+
}
|
|
4349
|
+
});
|
|
4350
|
+
const btn = (0, $8zHUo$yesilyazilimwebspa.ELF).Buttons.search(this._onSearchClicked, '');
|
|
4351
|
+
const items = (0, $8zHUo$yesilyazilimwebspa.ELF).div('search-items', (0, $8zHUo$yesilyazilimwebspa.ELF).div('select-holder', cmb), this._textBox, btn);
|
|
4352
|
+
const topRow = (0, $8zHUo$yesilyazilimwebspa.ELF).div('search-top', icon, items);
|
|
4353
|
+
const resultList = new (0, $8zHUo$yesilyazilimwebspa.ListComponent)({
|
|
4354
|
+
source: this._results,
|
|
4355
|
+
itemFactory: this._createResultItem
|
|
4356
|
+
});
|
|
4357
|
+
this._dropDownResults = new (0, $8zHUo$yesilyazilimwebspa.Dropdown)(resultList, 'parent');
|
|
4358
|
+
this.appendChildren(topRow, this._dropDownResults);
|
|
4359
|
+
cmb.addEventListener('change', ()=>{
|
|
4360
|
+
var _a;
|
|
4361
|
+
const key = cmb.value;
|
|
4362
|
+
this._activeSource = this._sources.find((_)=>_.key == key);
|
|
4363
|
+
this._textBox.placeholder = ((_a = this._activeSource) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
|
|
4364
|
+
});
|
|
4365
|
+
this._activeSource = this._sources[0];
|
|
4366
|
+
this._textBox.placeholder = ((_a = this._activeSource) === null || _a === void 0 ? void 0 : _a.placeholder) || '';
|
|
4367
|
+
}
|
|
4368
|
+
_createResultActions(item) {
|
|
4369
|
+
var _a;
|
|
4370
|
+
const btns = ((_a = this._activeSource.actions) === null || _a === void 0 ? void 0 : _a.map((kbi)=>{
|
|
4371
|
+
if (kbi.key === 'open-dropdown') {
|
|
4372
|
+
const menuItems = [
|
|
4373
|
+
{
|
|
4374
|
+
key: 'create-wo-o',
|
|
4375
|
+
text: "Kesintili \u0130\u015F Emri Olu\u015Ftur",
|
|
4376
|
+
iconClass: ''
|
|
4377
|
+
},
|
|
4378
|
+
{
|
|
4379
|
+
key: 'create-wo',
|
|
4380
|
+
text: "Kesintisiz \u0130\u015F Emri Olu\u015Ftur",
|
|
4381
|
+
iconClass: ''
|
|
4382
|
+
},
|
|
4383
|
+
{
|
|
4384
|
+
key: 'create-light',
|
|
4385
|
+
text: "Ayd\u0131nlatma \u0130\u015F Emri Olu\u015Ftur",
|
|
4386
|
+
iconClass: ''
|
|
4387
|
+
}
|
|
4388
|
+
];
|
|
4389
|
+
const dropdown = new (0, $8zHUo$yesilyazilimwebspa.DropdownButton)({
|
|
4390
|
+
main: kbi,
|
|
4391
|
+
children: menuItems,
|
|
4392
|
+
clickAction: (selected)=>{
|
|
4393
|
+
var _a, _b;
|
|
4394
|
+
(_b = (_a = this._activeSource).onAction) === null || _b === void 0 || _b.call(_a, selected.key, item);
|
|
4395
|
+
}
|
|
4396
|
+
});
|
|
4397
|
+
return dropdown;
|
|
4398
|
+
}
|
|
4399
|
+
return (0, $8zHUo$yesilyazilimwebspa.ELF).button(null, kbi.tootip, null, kbi.iconClass, ()=>{
|
|
4400
|
+
var _a, _b;
|
|
4401
|
+
(_b = (_a = this._activeSource).onAction) === null || _b === void 0 || _b.call(_a, kbi.key, item);
|
|
4402
|
+
});
|
|
4403
|
+
})) || [];
|
|
4404
|
+
return (0, $8zHUo$yesilyazilimwebspa.ELF).div('actions', ...btns);
|
|
4405
|
+
}
|
|
4406
|
+
_createMarkedText(elmClass, text, searchText) {
|
|
4407
|
+
const i = text.toLowerCase().indexOf(searchText.toLowerCase());
|
|
4408
|
+
if (i == 0) {
|
|
4409
|
+
const a = (0, $8zHUo$yesilyazilimwebspa.ELF).span(text.substring(0, searchText.length), 'marked');
|
|
4410
|
+
const b = (0, $8zHUo$yesilyazilimwebspa.ELF).span(text.substring(i + searchText.length));
|
|
4411
|
+
return (0, $8zHUo$yesilyazilimwebspa.ELF).div('marked-sentence ' + elmClass, a, b);
|
|
4412
|
+
} else if (i > 0) {
|
|
4413
|
+
const z = (0, $8zHUo$yesilyazilimwebspa.ELF).span(text.substring(0, i));
|
|
4414
|
+
const a = (0, $8zHUo$yesilyazilimwebspa.ELF).span(text.substring(i, i + searchText.length), 'marked');
|
|
4415
|
+
const b = (0, $8zHUo$yesilyazilimwebspa.ELF).span(text.substring(i + searchText.length));
|
|
4416
|
+
return (0, $8zHUo$yesilyazilimwebspa.ELF).div('marked-sentence ' + elmClass, z, a, b);
|
|
4417
|
+
}
|
|
4418
|
+
return (0, $8zHUo$yesilyazilimwebspa.ELF).span(text, elmClass);
|
|
4419
|
+
}
|
|
4420
|
+
};
|
|
4421
|
+
$6c9d3937549b2f07$var$__decorate([
|
|
4422
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
4423
|
+
$6c9d3937549b2f07$var$__metadata("design:type", typeof ($6c9d3937549b2f07$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $6c9d3937549b2f07$var$_a : Object)
|
|
4424
|
+
], $6c9d3937549b2f07$export$8f16e9c3e7703006.prototype, "eventService", void 0);
|
|
4425
|
+
$6c9d3937549b2f07$export$8f16e9c3e7703006 = $6c9d3937549b2f07$var$__decorate([
|
|
4426
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
4427
|
+
elementName: 'map-search'
|
|
4428
|
+
}),
|
|
4429
|
+
$6c9d3937549b2f07$var$__metadata("design:paramtypes", [
|
|
4430
|
+
Object
|
|
4431
|
+
])
|
|
4432
|
+
], $6c9d3937549b2f07$export$8f16e9c3e7703006);
|
|
4433
|
+
|
|
4434
|
+
|
|
4435
|
+
var $b052729e6971afe9$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
4436
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4437
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4438
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4439
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4440
|
+
};
|
|
4441
|
+
var $b052729e6971afe9$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
4442
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4443
|
+
};
|
|
4444
|
+
var $b052729e6971afe9$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
4445
|
+
function adopt(value) {
|
|
4446
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
4447
|
+
resolve(value);
|
|
4448
|
+
});
|
|
4449
|
+
}
|
|
4450
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
4451
|
+
function fulfilled(value) {
|
|
4452
|
+
try {
|
|
4453
|
+
step(generator.next(value));
|
|
4454
|
+
} catch (e) {
|
|
4455
|
+
reject(e);
|
|
4456
|
+
}
|
|
4457
|
+
}
|
|
4458
|
+
function rejected(value) {
|
|
4459
|
+
try {
|
|
4460
|
+
step(generator["throw"](value));
|
|
4461
|
+
} catch (e) {
|
|
4462
|
+
reject(e);
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4465
|
+
function step(result) {
|
|
4466
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4467
|
+
}
|
|
4468
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4469
|
+
});
|
|
4470
|
+
};
|
|
4471
|
+
var $b052729e6971afe9$var$_a, $b052729e6971afe9$var$_b, $b052729e6971afe9$var$_c;
|
|
4472
|
+
const $b052729e6971afe9$var$LastLocKey = "LastMapExtent";
|
|
4473
|
+
let $b052729e6971afe9$export$c8c02c9c269eb8dd = class MapComponent extends (0, $8zHUo$yesilyazilimwebspa.BaseElement) {
|
|
4474
|
+
constructor(){
|
|
4475
|
+
super(...arguments);
|
|
4476
|
+
this._mapTime = 0;
|
|
4477
|
+
this._onMoveEnd = ()=>{
|
|
4478
|
+
const loc = {
|
|
4479
|
+
center: this.view.getCenter(),
|
|
4480
|
+
zoom: Math.trunc(this.view.getZoom()),
|
|
4481
|
+
extent: this.view.calculateExtent()
|
|
4482
|
+
};
|
|
4483
|
+
localStorage.setItem($b052729e6971afe9$var$LastLocKey, JSON.stringify(loc));
|
|
4484
|
+
this.layerManager.onExtentChanged(loc);
|
|
4485
|
+
};
|
|
4486
|
+
}
|
|
4487
|
+
initAsync(settings) {
|
|
4488
|
+
return $b052729e6971afe9$var$__awaiter(this, void 0, void 0, function*() {
|
|
4489
|
+
const mapDiv = (0, $8zHUo$yesilyazilimwebspa.ELF).div("wh-100");
|
|
4490
|
+
mapDiv.addEventListener('contextmenu', (ev)=>ev.preventDefault());
|
|
4491
|
+
this.appendChild(mapDiv);
|
|
4492
|
+
let lo = settings.defaultLocation;
|
|
4493
|
+
const lljson = localStorage.getItem($b052729e6971afe9$var$LastLocKey);
|
|
4494
|
+
if (lljson) lo = JSON.parse(lljson);
|
|
4495
|
+
this.layerManager.onExtentChanged(lo);
|
|
4496
|
+
this.view = new (0, ($parcel$interopDefault($8zHUo$olView)))({
|
|
4497
|
+
center: lo.center,
|
|
4498
|
+
zoom: lo.zoom,
|
|
4499
|
+
constrainResolution: true
|
|
4500
|
+
});
|
|
4501
|
+
this.map = new (0, ($parcel$interopDefault($8zHUo$olMap)))({
|
|
4502
|
+
target: mapDiv,
|
|
4503
|
+
layers: [],
|
|
4504
|
+
view: this.view,
|
|
4505
|
+
controls: []
|
|
4506
|
+
});
|
|
4507
|
+
this.map.once('rendercomplete', (ev)=>{
|
|
4508
|
+
this.mapManager.init(this.map, this.view, this.popupElm);
|
|
4509
|
+
const ctrls = (0, $8zHUo$olcontrol.defaults)().extend(this.mapBar.controls);
|
|
4510
|
+
ctrls.forEach((c)=>this.map.addControl(c));
|
|
4511
|
+
this.eventService.raise((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapReady, null);
|
|
4512
|
+
});
|
|
4513
|
+
this.layerManager.layerList.changeEvent.register(this._onLayerListChanged.bind(this));
|
|
4514
|
+
this.mapBar = new (0, $1d98a541f33fb0d2$export$f92b46dcd8b8121b)(this.map);
|
|
4515
|
+
this.mapSearch = new (0, $6c9d3937549b2f07$export$8f16e9c3e7703006)({
|
|
4516
|
+
sources: settings.searchSources
|
|
4517
|
+
});
|
|
4518
|
+
const popupCloser = (0, $8zHUo$yesilyazilimwebspa.ELF).closeButton().setClasses('ol-popup-closer');
|
|
4519
|
+
const popupContent = (0, $8zHUo$yesilyazilimwebspa.ELF).div('popup-content');
|
|
4520
|
+
this.popupElm = (0, $8zHUo$yesilyazilimwebspa.ELF).div('ol-popup', popupCloser, popupContent);
|
|
4521
|
+
this.appendChildren(this.mapSearch, this.mapBar, this.popupElm);
|
|
4522
|
+
this.map.on('moveend', this._onMoveEnd);
|
|
4523
|
+
yield this.layerManager.init(settings);
|
|
4524
|
+
this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapTimeChanged, (time)=>{
|
|
4525
|
+
this.time = time;
|
|
4526
|
+
});
|
|
4527
|
+
});
|
|
4528
|
+
}
|
|
4529
|
+
get time() {
|
|
4530
|
+
return this._mapTime;
|
|
4531
|
+
}
|
|
4532
|
+
set time(value) {
|
|
4533
|
+
if (this._mapTime === value) return;
|
|
4534
|
+
this._mapTime = value;
|
|
4535
|
+
const enabled = value > 0;
|
|
4536
|
+
this.classList.toggle('historic', enabled);
|
|
4537
|
+
}
|
|
4538
|
+
onConnected() {}
|
|
4539
|
+
_onLayerListChanged(change) {
|
|
4540
|
+
if (change.added) for (const ml of change.added){
|
|
4541
|
+
const lyr = ml.value;
|
|
4542
|
+
if (!lyr.order) lyr.order = 20;
|
|
4543
|
+
this.map.addLayer(lyr.layerObj);
|
|
4544
|
+
}
|
|
4545
|
+
else if (change.removed) for (const ml of change.removed)this.map.removeLayer(ml.value.layerObj);
|
|
4546
|
+
else if (change.replaced) {
|
|
4547
|
+
this.map.removeLayer(change.replaced.old.value.layerObj);
|
|
4548
|
+
this.map.addLayer(change.replaced.new.value.layerObj);
|
|
4549
|
+
} else change.sorted;
|
|
4550
|
+
}
|
|
4551
|
+
};
|
|
4552
|
+
$b052729e6971afe9$var$__decorate([
|
|
4553
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
4554
|
+
$b052729e6971afe9$var$__metadata("design:type", typeof ($b052729e6971afe9$var$_a = typeof (0, $e2e9872d2858bcde$export$c521bb0b406df9a3) !== "undefined" && (0, $e2e9872d2858bcde$export$c521bb0b406df9a3)) === "function" ? $b052729e6971afe9$var$_a : Object)
|
|
4555
|
+
], $b052729e6971afe9$export$c8c02c9c269eb8dd.prototype, "mapManager", void 0);
|
|
4556
|
+
$b052729e6971afe9$var$__decorate([
|
|
4557
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
4558
|
+
$b052729e6971afe9$var$__metadata("design:type", typeof ($b052729e6971afe9$var$_b = typeof (0, $a28fe88e0f106608$export$eff87c52915dd7fe) !== "undefined" && (0, $a28fe88e0f106608$export$eff87c52915dd7fe)) === "function" ? $b052729e6971afe9$var$_b : Object)
|
|
4559
|
+
], $b052729e6971afe9$export$c8c02c9c269eb8dd.prototype, "layerManager", void 0);
|
|
4560
|
+
$b052729e6971afe9$var$__decorate([
|
|
4561
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
4562
|
+
$b052729e6971afe9$var$__metadata("design:type", typeof ($b052729e6971afe9$var$_c = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $b052729e6971afe9$var$_c : Object)
|
|
4563
|
+
], $b052729e6971afe9$export$c8c02c9c269eb8dd.prototype, "eventService", void 0);
|
|
4564
|
+
$b052729e6971afe9$export$c8c02c9c269eb8dd = $b052729e6971afe9$var$__decorate([
|
|
4565
|
+
(0, $8zHUo$yesilyazilimwebspa.Component)({
|
|
4566
|
+
elementName: 'app-map',
|
|
4567
|
+
styles: {
|
|
4568
|
+
width: "100%",
|
|
4569
|
+
height: "100%",
|
|
4570
|
+
position: "relative",
|
|
4571
|
+
overflow: "hidden",
|
|
4572
|
+
background: 'white'
|
|
4573
|
+
}
|
|
4574
|
+
})
|
|
4575
|
+
], $b052729e6971afe9$export$c8c02c9c269eb8dd);
|
|
4576
|
+
|
|
4577
|
+
|
|
4578
|
+
|
|
4579
|
+
|
|
4580
|
+
|
|
4581
|
+
|
|
4582
|
+
var $e2b04145cd8186fe$exports = {};
|
|
4583
|
+
|
|
4584
|
+
$parcel$export($e2b04145cd8186fe$exports, "GisAppService", () => $e2b04145cd8186fe$export$b691314506f45992);
|
|
4585
|
+
|
|
4586
|
+
|
|
4587
|
+
|
|
4588
|
+
|
|
4589
|
+
|
|
4590
|
+
|
|
4591
|
+
|
|
4592
|
+
var $e2b04145cd8186fe$var$__decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
|
|
4593
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4594
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4595
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4596
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4597
|
+
};
|
|
4598
|
+
var $e2b04145cd8186fe$var$__metadata = undefined && undefined.__metadata || function(k, v) {
|
|
4599
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4600
|
+
};
|
|
4601
|
+
var $e2b04145cd8186fe$var$__awaiter = undefined && undefined.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
4602
|
+
function adopt(value) {
|
|
4603
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
4604
|
+
resolve(value);
|
|
4605
|
+
});
|
|
4606
|
+
}
|
|
4607
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
4608
|
+
function fulfilled(value) {
|
|
4609
|
+
try {
|
|
4610
|
+
step(generator.next(value));
|
|
4611
|
+
} catch (e) {
|
|
4612
|
+
reject(e);
|
|
4613
|
+
}
|
|
4614
|
+
}
|
|
4615
|
+
function rejected(value) {
|
|
4616
|
+
try {
|
|
4617
|
+
step(generator["throw"](value));
|
|
4618
|
+
} catch (e) {
|
|
4619
|
+
reject(e);
|
|
4620
|
+
}
|
|
4621
|
+
}
|
|
4622
|
+
function step(result) {
|
|
4623
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4624
|
+
}
|
|
4625
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4626
|
+
});
|
|
4627
|
+
};
|
|
4628
|
+
var $e2b04145cd8186fe$var$_a, $e2b04145cd8186fe$var$_b, $e2b04145cd8186fe$var$_c;
|
|
4629
|
+
class $e2b04145cd8186fe$export$b691314506f45992 {
|
|
4630
|
+
startMapComponents(settings) {
|
|
4631
|
+
return $e2b04145cd8186fe$var$__awaiter(this, void 0, void 0, function*() {
|
|
4632
|
+
(0, $8zHUo$olproj.useGeographic)();
|
|
4633
|
+
this.eventService.listen((0, $91d76f4d8e753f27$export$3b3923acac36255a).MapReady, ()=>$e2b04145cd8186fe$var$__awaiter(this, void 0, void 0, function*() {
|
|
4634
|
+
this.commandService.startDefault();
|
|
4635
|
+
}));
|
|
4636
|
+
const panels = this._getStartupPanels();
|
|
4637
|
+
for (const pnl of panels)this.application.openPanel(pnl.tab, pnl.pos);
|
|
4638
|
+
yield this.mapComponent.initAsync(settings);
|
|
4639
|
+
});
|
|
4640
|
+
}
|
|
4641
|
+
_getStartupPanels() {
|
|
4642
|
+
return [
|
|
4643
|
+
{
|
|
4644
|
+
tab: {
|
|
4645
|
+
closable: false,
|
|
4646
|
+
name: 'panel-map-main',
|
|
4647
|
+
header: 'Harita',
|
|
4648
|
+
content: this._createMapPanel()
|
|
4649
|
+
},
|
|
4650
|
+
pos: (0, $8zHUo$yesilyazilimwebspa.PanelPos).Center
|
|
4651
|
+
}
|
|
4652
|
+
];
|
|
4653
|
+
}
|
|
4654
|
+
_createMapPanel() {
|
|
4655
|
+
const tab = new (0, $8zHUo$yesilyazilimwebspa.TabContainer)(false);
|
|
4656
|
+
tab.addTab({
|
|
4657
|
+
closable: false,
|
|
4658
|
+
content: new (0, $592c9f0aa7568173$export$78003ba218df33f3)(true),
|
|
4659
|
+
header: 'Lejant',
|
|
4660
|
+
name: 'tab-legent'
|
|
4661
|
+
});
|
|
4662
|
+
tab.addTab({
|
|
4663
|
+
closable: false,
|
|
4664
|
+
content: new (0, $3244a3c7a3ab6329$export$ffc1366d10787ec1)(),
|
|
4665
|
+
header: 'Katmanlar',
|
|
4666
|
+
name: 'tab-layers'
|
|
4667
|
+
});
|
|
4668
|
+
const div = (0, $8zHUo$yesilyazilimwebspa.ELF).div('leftInnerPane', tab);
|
|
4669
|
+
this.mapComponent = new (0, $b052729e6971afe9$export$c8c02c9c269eb8dd)();
|
|
4670
|
+
const drw = new (0, $8zHUo$yesilyazilimwebspa.DrawerContainer)({
|
|
4671
|
+
main: this.mapComponent,
|
|
4672
|
+
left: {
|
|
4673
|
+
content: div,
|
|
4674
|
+
title: 'Lejant ve Katmanlar',
|
|
4675
|
+
pinnable: true
|
|
4676
|
+
}
|
|
4677
|
+
});
|
|
4678
|
+
drw.classList.add('mapdrawer-container');
|
|
4679
|
+
return drw;
|
|
4680
|
+
}
|
|
4681
|
+
}
|
|
4682
|
+
$e2b04145cd8186fe$var$__decorate([
|
|
4683
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
4684
|
+
$e2b04145cd8186fe$var$__metadata("design:type", typeof ($e2b04145cd8186fe$var$_a = typeof (0, $8zHUo$yesilyazilimwebspa.Application) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.Application)) === "function" ? $e2b04145cd8186fe$var$_a : Object)
|
|
4685
|
+
], $e2b04145cd8186fe$export$b691314506f45992.prototype, "application", void 0);
|
|
4686
|
+
$e2b04145cd8186fe$var$__decorate([
|
|
4687
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
4688
|
+
$e2b04145cd8186fe$var$__metadata("design:type", typeof ($e2b04145cd8186fe$var$_b = typeof (0, $8zHUo$yesilyazilimwebspa.EventService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.EventService)) === "function" ? $e2b04145cd8186fe$var$_b : Object)
|
|
4689
|
+
], $e2b04145cd8186fe$export$b691314506f45992.prototype, "eventService", void 0);
|
|
4690
|
+
$e2b04145cd8186fe$var$__decorate([
|
|
4691
|
+
(0, $8zHUo$yesilyazilimwebspa.Inject)(),
|
|
4692
|
+
$e2b04145cd8186fe$var$__metadata("design:type", typeof ($e2b04145cd8186fe$var$_c = typeof (0, $8zHUo$yesilyazilimwebspa.CommandService) !== "undefined" && (0, $8zHUo$yesilyazilimwebspa.CommandService)) === "function" ? $e2b04145cd8186fe$var$_c : Object)
|
|
4693
|
+
], $e2b04145cd8186fe$export$b691314506f45992.prototype, "commandService", void 0);
|
|
4694
|
+
|
|
4695
|
+
|
|
4696
|
+
$parcel$exportWildcard(module.exports, $b052729e6971afe9$exports);
|
|
4697
|
+
$parcel$exportWildcard(module.exports, $592c9f0aa7568173$exports);
|
|
4698
|
+
$parcel$exportWildcard(module.exports, $3244a3c7a3ab6329$exports);
|
|
4699
|
+
$parcel$exportWildcard(module.exports, $e2e9872d2858bcde$exports);
|
|
4700
|
+
$parcel$exportWildcard(module.exports, $a28fe88e0f106608$exports);
|
|
4701
|
+
$parcel$exportWildcard(module.exports, $e2b04145cd8186fe$exports);
|
|
4702
|
+
|
|
4703
|
+
|
|
4704
|
+
//# sourceMappingURL=index.js.map
|