3205 |
delphine |
1 |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{
|
|
|
2 |
|
|
|
3 |
/***/ "./dist/tb-geoloc-lib/fesm5/tb-geoloc-lib.js":
|
|
|
4 |
/*!***************************************************!*\
|
|
|
5 |
!*** ./dist/tb-geoloc-lib/fesm5/tb-geoloc-lib.js ***!
|
|
|
6 |
\***************************************************/
|
|
|
7 |
/*! exports provided: TbGeolocLibModule, TbGeolocLibComponent, MapComponent, GeocodingService, ElevationService, ɵa */
|
|
|
8 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
9 |
|
|
|
10 |
"use strict";
|
|
|
11 |
__webpack_require__.r(__webpack_exports__);
|
|
|
12 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TbGeolocLibModule", function() { return TbGeolocLibModule; });
|
|
|
13 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TbGeolocLibComponent", function() { return TbGeolocLibComponent; });
|
|
|
14 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapComponent", function() { return MapComponent; });
|
|
|
15 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GeocodingService", function() { return GeocodingService; });
|
|
|
16 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElevationService", function() { return ElevationService; });
|
|
|
17 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵa", function() { return OsmPlaceReadableAddressPipe; });
|
|
|
18 |
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
|
19 |
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! leaflet */ "./node_modules/leaflet/dist/leaflet-src.js");
|
|
|
20 |
/* harmony import */ var leaflet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(leaflet__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
21 |
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
|
|
|
22 |
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
|
|
|
23 |
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
|
|
|
24 |
/* harmony import */ var _angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/compiler/src/util */ "./node_modules/@angular/compiler/src/util.js");
|
|
|
25 |
/* harmony import */ var _angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__);
|
|
|
26 |
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js");
|
|
|
27 |
/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! leaflet-draw */ "./node_modules/leaflet-draw/dist/leaflet.draw.js");
|
|
|
28 |
/* harmony import */ var leaflet_draw__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(leaflet_draw__WEBPACK_IMPORTED_MODULE_7__);
|
|
|
29 |
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
|
|
|
30 |
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/fesm5/animations.js");
|
|
|
31 |
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
|
|
|
32 |
/* harmony import */ var _angular_material__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material */ "./node_modules/@angular/material/esm5/material.es5.js");
|
|
|
33 |
/* harmony import */ var _asymmetrik_ngx_leaflet__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @asymmetrik/ngx-leaflet */ "./node_modules/@asymmetrik/ngx-leaflet/dist/index.js");
|
|
|
34 |
/* harmony import */ var _asymmetrik_ngx_leaflet_draw__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @asymmetrik/ngx-leaflet-draw */ "./node_modules/@asymmetrik/ngx-leaflet-draw/dist/index.js");
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
/**
|
|
|
51 |
* @fileoverview added by tsickle
|
|
|
52 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
53 |
*/
|
|
|
54 |
var TbGeolocLibComponent = /** @class */ (function () {
|
|
|
55 |
function TbGeolocLibComponent() {
|
|
|
56 |
}
|
|
|
57 |
/**
|
|
|
58 |
* @return {?}
|
|
|
59 |
*/
|
|
|
60 |
TbGeolocLibComponent.prototype.ngOnInit = /**
|
|
|
61 |
* @return {?}
|
|
|
62 |
*/
|
|
|
63 |
function () {
|
|
|
64 |
};
|
|
|
65 |
TbGeolocLibComponent.decorators = [
|
|
|
66 |
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
|
|
|
67 |
selector: 'tb-geoloc-tb-geoloc-lib',
|
|
|
68 |
template: "",
|
|
|
69 |
styles: []
|
|
|
70 |
},] },
|
|
|
71 |
];
|
|
|
72 |
/** @nocollapse */
|
|
|
73 |
TbGeolocLibComponent.ctorParameters = function () { return []; };
|
|
|
74 |
return TbGeolocLibComponent;
|
|
|
75 |
}());
|
|
|
76 |
|
|
|
77 |
/**
|
|
|
78 |
* @fileoverview added by tsickle
|
|
|
79 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
80 |
*/
|
|
|
81 |
/**
|
|
|
82 |
* GeoPoint
|
|
|
83 |
*
|
|
|
84 |
* https://github.com/perfectline/geopoint
|
|
|
85 |
*
|
|
|
86 |
* Authors :
|
|
|
87 |
* Tanel Suurhans (http://twitter.com/tanelsuurhans)
|
|
|
88 |
* Tarmo Lehtpuu (http://twitter.com/tarmolehtpuu)
|
|
|
89 |
*
|
|
|
90 |
* License :
|
|
|
91 |
* Copyright 2011 by PerfectLine LLC (http://www.perfectline.ee) and is released under the MIT license.
|
|
|
92 |
*/
|
|
|
93 |
/** @type {?} */
|
|
|
94 |
var GeoPoint = function (lon, lat) {
|
|
|
95 |
switch (typeof (lon)) {
|
|
|
96 |
case 'number':
|
|
|
97 |
this.lonDeg = this.dec2deg(lon, this.MAX_LON);
|
|
|
98 |
this.lonDec = lon;
|
|
|
99 |
break;
|
|
|
100 |
case 'string':
|
|
|
101 |
if (this.decode(lon)) {
|
|
|
102 |
this.lonDeg = lon;
|
|
|
103 |
}
|
|
|
104 |
this.lonDec = this.deg2dec(lon, this.MAX_LON);
|
|
|
105 |
break;
|
|
|
106 |
}
|
|
|
107 |
switch (typeof (lat)) {
|
|
|
108 |
case 'number':
|
|
|
109 |
this.latDeg = this.dec2deg(lat, this.MAX_LAT);
|
|
|
110 |
this.latDec = lat;
|
|
|
111 |
break;
|
|
|
112 |
case 'string':
|
|
|
113 |
if (this.decode(lat)) {
|
|
|
114 |
this.latDeg = lat;
|
|
|
115 |
}
|
|
|
116 |
this.latDec = this.deg2dec(lat, this.MAX_LAT);
|
|
|
117 |
break;
|
|
|
118 |
}
|
|
|
119 |
};
|
|
|
120 |
GeoPoint.prototype = {
|
|
|
121 |
CHAR_DEG: '\u00B0',
|
|
|
122 |
CHAR_MIN: '\u0027',
|
|
|
123 |
CHAR_SEC: '\u0022',
|
|
|
124 |
CHAR_SEP: '\u0020',
|
|
|
125 |
MAX_LON: 180,
|
|
|
126 |
MAX_LAT: 90,
|
|
|
127 |
// decimal
|
|
|
128 |
lonDec: NaN,
|
|
|
129 |
latDec: NaN,
|
|
|
130 |
// degrees
|
|
|
131 |
lonDeg: NaN,
|
|
|
132 |
latDeg: NaN,
|
|
|
133 |
dec2deg: function (value, max) {
|
|
|
134 |
/** @type {?} */
|
|
|
135 |
var sign = value < 0 ? -1 : 1;
|
|
|
136 |
/** @type {?} */
|
|
|
137 |
var abs = Math.abs(Math.round(value * 1000000));
|
|
|
138 |
if (abs > (max * 1000000)) {
|
|
|
139 |
return NaN;
|
|
|
140 |
}
|
|
|
141 |
/** @type {?} */
|
|
|
142 |
var dec = abs % 1000000 / 1000000;
|
|
|
143 |
/** @type {?} */
|
|
|
144 |
var deg = Math.floor(abs / 1000000) * sign;
|
|
|
145 |
/** @type {?} */
|
|
|
146 |
var min = Math.floor(dec * 60);
|
|
|
147 |
/** @type {?} */
|
|
|
148 |
var sec = (dec - min / 60) * 3600;
|
|
|
149 |
/** @type {?} */
|
|
|
150 |
var result = '';
|
|
|
151 |
result += deg;
|
|
|
152 |
result += this.CHAR_DEG;
|
|
|
153 |
result += this.CHAR_SEP;
|
|
|
154 |
result += min;
|
|
|
155 |
result += this.CHAR_MIN;
|
|
|
156 |
result += this.CHAR_SEP;
|
|
|
157 |
result += sec.toFixed(2);
|
|
|
158 |
result += this.CHAR_SEC;
|
|
|
159 |
return result;
|
|
|
160 |
},
|
|
|
161 |
deg2dec: function (value) {
|
|
|
162 |
/** @type {?} */
|
|
|
163 |
var matches = this.decode(value);
|
|
|
164 |
if (!matches) {
|
|
|
165 |
return NaN;
|
|
|
166 |
}
|
|
|
167 |
/** @type {?} */
|
|
|
168 |
var deg = parseFloat(matches[1]);
|
|
|
169 |
/** @type {?} */
|
|
|
170 |
var min = parseFloat(matches[2]);
|
|
|
171 |
/** @type {?} */
|
|
|
172 |
var sec = parseFloat(matches[3]);
|
|
|
173 |
if (isNaN(deg) || isNaN(min) || isNaN(sec)) {
|
|
|
174 |
return NaN;
|
|
|
175 |
}
|
|
|
176 |
return deg + (min / 60.0) + (sec / 3600);
|
|
|
177 |
},
|
|
|
178 |
decode: function (value) {
|
|
|
179 |
/** @type {?} */
|
|
|
180 |
var pattern = '';
|
|
|
181 |
// deg
|
|
|
182 |
pattern += '(-?\\d+)';
|
|
|
183 |
pattern += this.CHAR_DEG;
|
|
|
184 |
pattern += '\\s*';
|
|
|
185 |
// min
|
|
|
186 |
pattern += '(\\d+)';
|
|
|
187 |
pattern += this.CHAR_MIN;
|
|
|
188 |
pattern += '\\s*';
|
|
|
189 |
// sec
|
|
|
190 |
pattern += '(\\d+(?:\\.\\d+)?)';
|
|
|
191 |
pattern += this.CHAR_SEC;
|
|
|
192 |
return value.match(new RegExp(pattern));
|
|
|
193 |
},
|
|
|
194 |
getLonDec: function () {
|
|
|
195 |
return this.lonDec;
|
|
|
196 |
},
|
|
|
197 |
getLatDec: function () {
|
|
|
198 |
return this.latDec;
|
|
|
199 |
},
|
|
|
200 |
getLonDeg: function () {
|
|
|
201 |
return this.lonDeg;
|
|
|
202 |
},
|
|
|
203 |
getLatDeg: function () {
|
|
|
204 |
return this.latDeg;
|
|
|
205 |
}
|
|
|
206 |
};
|
|
|
207 |
|
|
|
208 |
/**
|
|
|
209 |
* @fileoverview added by tsickle
|
|
|
210 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
211 |
*/
|
|
|
212 |
/** *
|
|
|
213 |
*
|
|
|
214 |
* \@param lat
|
|
|
215 |
* \@param lng
|
|
|
216 |
* \@param dragend callback
|
|
|
217 |
@type {?} */
|
|
|
218 |
var draggableMarker = function (lat, lng, dragend) {
|
|
|
219 |
/** @type {?} */
|
|
|
220 |
var simpleIcon = simpleIconMarker();
|
|
|
221 |
/** @type {?} */
|
|
|
222 |
var marker$$1 = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["marker"])([lat, lng], { icon: simpleIcon, draggable: true });
|
|
|
223 |
marker$$1.on('dragend', function (event) { return dragend(event); });
|
|
|
224 |
return marker$$1;
|
|
|
225 |
};
|
|
|
226 |
/** *
|
|
|
227 |
*
|
|
|
228 |
@type {?} */
|
|
|
229 |
var simpleIconMarker = function () {
|
|
|
230 |
return Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["icon"])({
|
|
|
231 |
iconUrl: './assets/img/map/marker-icon.png',
|
|
|
232 |
shadowUrl: './assets/img/map/marker-shadow.png',
|
|
|
233 |
iconAnchor: [13, 40]
|
|
|
234 |
});
|
|
|
235 |
};
|
|
|
236 |
/** *
|
|
|
237 |
*
|
|
|
238 |
@type {?} */
|
|
|
239 |
var drawControlPanel = new leaflet__WEBPACK_IMPORTED_MODULE_1__["Control"].Draw({
|
|
|
240 |
position: 'topleft',
|
|
|
241 |
draw: {
|
|
|
242 |
marker: { icon: simpleIconMarker() },
|
|
|
243 |
polyline: {},
|
|
|
244 |
polygon: { showArea: true, metric: false },
|
|
|
245 |
rectangle: false,
|
|
|
246 |
circle: false,
|
|
|
247 |
circlemarker: false
|
|
|
248 |
}
|
|
|
249 |
});
|
|
|
250 |
/**
|
|
|
251 |
*
|
|
|
252 |
* @param {?} editedLayer
|
|
|
253 |
* @return {?}
|
|
|
254 |
*/
|
|
|
255 |
function drawControlEditPanel(editedLayer) {
|
|
|
256 |
return new leaflet__WEBPACK_IMPORTED_MODULE_1__["Control"].Draw({
|
|
|
257 |
position: 'topleft',
|
|
|
258 |
draw: {
|
|
|
259 |
marker: false,
|
|
|
260 |
polyline: false,
|
|
|
261 |
polygon: false,
|
|
|
262 |
rectangle: false,
|
|
|
263 |
circle: false,
|
|
|
264 |
circlemarker: false
|
|
|
265 |
},
|
|
|
266 |
edit: {
|
|
|
267 |
featureGroup: editedLayer,
|
|
|
268 |
// this panel id editing editedLayer
|
|
|
269 |
edit: {},
|
|
|
270 |
remove: {}
|
|
|
271 |
}
|
|
|
272 |
});
|
|
|
273 |
}
|
|
|
274 |
/** *
|
|
|
275 |
*
|
|
|
276 |
@type {?} */
|
|
|
277 |
var circleMarkerStyle = {
|
|
|
278 |
radius: 6,
|
|
|
279 |
fillColor: '#ff7800',
|
|
|
280 |
color: '#000',
|
|
|
281 |
weight: 1,
|
|
|
282 |
opacity: 1,
|
|
|
283 |
fillOpacity: 0.8
|
|
|
284 |
};
|
|
|
285 |
/** *
|
|
|
286 |
*
|
|
|
287 |
@type {?} */
|
|
|
288 |
var cityStyle = {
|
|
|
289 |
color: '#ff7800',
|
|
|
290 |
weight: 5,
|
|
|
291 |
opacity: 0.65
|
|
|
292 |
};
|
|
|
293 |
/** *
|
|
|
294 |
*
|
|
|
295 |
@type {?} */
|
|
|
296 |
var gpsPhotoMarkerIcon = function () {
|
|
|
297 |
return Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["icon"])({
|
|
|
298 |
iconUrl: './assets/img/map/photo-marker-icon.png',
|
|
|
299 |
shadowUrl: './assets/img/map/marker-shadow.png',
|
|
|
300 |
iconSize: [33, 41],
|
|
|
301 |
// size of the icon
|
|
|
302 |
// shadowSize: [50, 64], // size of the shadow
|
|
|
303 |
iconAnchor: [13, 40],
|
|
|
304 |
// point of the icon which will correspond to marker's location
|
|
|
305 |
// shadowAnchor: [4, 62], // the same for the shadow
|
|
|
306 |
popupAnchor: [5, -41] // point from which the popup should open relative to the iconAnchor
|
|
|
307 |
});
|
|
|
308 |
};
|
|
|
309 |
|
|
|
310 |
/**
|
|
|
311 |
* @fileoverview added by tsickle
|
|
|
312 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
313 |
*/
|
|
|
314 |
/**
|
|
|
315 |
* Auto format a DMS coordinates
|
|
|
316 |
* eg. user can enter 43 0 14.77
|
|
|
317 |
* and the formatter returns 43° 0' 14.77"
|
|
|
318 |
* + avoid enter non numeric (or . ,) characters
|
|
|
319 |
* + force entire numbers for degrees and minutes
|
|
|
320 |
* @param {?} dmsStr
|
|
|
321 |
* @return {?}
|
|
|
322 |
*/
|
|
|
323 |
function dmsFormatter(dmsStr) {
|
|
|
324 |
try {
|
|
|
325 |
// replace multiples spaces
|
|
|
326 |
dmsStr = dmsStr.replace(/\s\s+/g, ' ');
|
|
|
327 |
// replace space at first position
|
|
|
328 |
if (dmsStr.charAt(0) === ' ') {
|
|
|
329 |
dmsStr = dmsStr.slice(1, dmsStr.length - 1);
|
|
|
330 |
}
|
|
|
331 |
// replace , by .
|
|
|
332 |
dmsStr = dmsStr.replace(',', '.');
|
|
|
333 |
// delete all non numeric characters
|
|
|
334 |
dmsStr = dmsStr.replace(/[^0-9\-.,°\'"\s]/g, '');
|
|
|
335 |
/** @type {?} */
|
|
|
336 |
var nbSpaces = void 0;
|
|
|
337 |
/** @type {?} */
|
|
|
338 |
var degChr = '';
|
|
|
339 |
/** @type {?} */
|
|
|
340 |
var minChr = '';
|
|
|
341 |
/** @type {?} */
|
|
|
342 |
var secChr = '';
|
|
|
343 |
/** @type {?} */
|
|
|
344 |
var v = dmsStr.split(' ');
|
|
|
345 |
// remove last space od input string
|
|
|
346 |
if (dmsStr.charAt(dmsStr.length - 1) === ' ') {
|
|
|
347 |
v = v.slice(0, v.length - 1);
|
|
|
348 |
}
|
|
|
349 |
// remove last item of v array if it's empty
|
|
|
350 |
if (v[v.length - 1] === '') {
|
|
|
351 |
v = v.slice(0, v.length - 1);
|
|
|
352 |
}
|
|
|
353 |
if (v.length === 1) {
|
|
|
354 |
degChr = v[0];
|
|
|
355 |
// degChr must be an entire number
|
|
|
356 |
if (degChr.indexOf('.') !== -1) {
|
|
|
357 |
degChr = degChr.slice(0, degChr.indexOf('.'));
|
|
|
358 |
}
|
|
|
359 |
// between -90 & +90
|
|
|
360 |
if (Number(degChr) < -90) {
|
|
|
361 |
degChr = '-90';
|
|
|
362 |
}
|
|
|
363 |
if (Number(degChr) > 90) {
|
|
|
364 |
degChr = '90';
|
|
|
365 |
}
|
|
|
366 |
}
|
|
|
367 |
if (v.length === 2) {
|
|
|
368 |
degChr = v[0];
|
|
|
369 |
minChr = v[1];
|
|
|
370 |
if (degChr.indexOf('.') !== -1) {
|
|
|
371 |
degChr = degChr.slice(0, degChr.indexOf('.'));
|
|
|
372 |
}
|
|
|
373 |
if (minChr.indexOf('.') !== -1) {
|
|
|
374 |
minChr = minChr.slice(0, degChr.indexOf('.'));
|
|
|
375 |
}
|
|
|
376 |
if (Number(degChr) < -90) {
|
|
|
377 |
degChr = '-90';
|
|
|
378 |
}
|
|
|
379 |
if (Number(degChr) > 90) {
|
|
|
380 |
degChr = '90';
|
|
|
381 |
}
|
|
|
382 |
if (Number(minChr) < -90) {
|
|
|
383 |
minChr = '-90';
|
|
|
384 |
}
|
|
|
385 |
if (Number(minChr) > 90) {
|
|
|
386 |
minChr = '90';
|
|
|
387 |
}
|
|
|
388 |
}
|
|
|
389 |
if (v.length === 3) {
|
|
|
390 |
degChr = v[0];
|
|
|
391 |
minChr = v[1];
|
|
|
392 |
secChr = v[2];
|
|
|
393 |
if (degChr.indexOf('.') !== -1) {
|
|
|
394 |
degChr = degChr.slice(0, degChr.indexOf('.'));
|
|
|
395 |
}
|
|
|
396 |
if (minChr.indexOf('.') !== -1) {
|
|
|
397 |
minChr = minChr.slice(0, degChr.indexOf('.'));
|
|
|
398 |
}
|
|
|
399 |
if (Number(degChr) < -90) {
|
|
|
400 |
degChr = '-90';
|
|
|
401 |
}
|
|
|
402 |
if (Number(degChr) > 90) {
|
|
|
403 |
degChr = '90';
|
|
|
404 |
}
|
|
|
405 |
if (Number(minChr) < -90) {
|
|
|
406 |
minChr = '-90';
|
|
|
407 |
}
|
|
|
408 |
if (Number(minChr) > 90) {
|
|
|
409 |
minChr = '90';
|
|
|
410 |
}
|
|
|
411 |
}
|
|
|
412 |
if (v.length >= 4) {
|
|
|
413 |
v = v.slice(0, 2);
|
|
|
414 |
if (degChr.indexOf('.') !== -1) {
|
|
|
415 |
degChr = degChr.slice(0, degChr.indexOf('.'));
|
|
|
416 |
}
|
|
|
417 |
if (minChr.indexOf('.') !== -1) {
|
|
|
418 |
minChr = minChr.slice(0, degChr.indexOf('.'));
|
|
|
419 |
}
|
|
|
420 |
if (Number(degChr) < -90) {
|
|
|
421 |
degChr = '-90';
|
|
|
422 |
}
|
|
|
423 |
if (Number(degChr) > 90) {
|
|
|
424 |
degChr = '90';
|
|
|
425 |
}
|
|
|
426 |
if (Number(minChr) < -90) {
|
|
|
427 |
minChr = '-90';
|
|
|
428 |
}
|
|
|
429 |
if (Number(minChr) > 90) {
|
|
|
430 |
minChr = '90';
|
|
|
431 |
}
|
|
|
432 |
}
|
|
|
433 |
try {
|
|
|
434 |
nbSpaces = dmsStr.match(/\s/g).length;
|
|
|
435 |
}
|
|
|
436 |
catch (e) {
|
|
|
437 |
nbSpaces = 0;
|
|
|
438 |
}
|
|
|
439 |
if (nbSpaces === 0 && v.length === 1) ;
|
|
|
440 |
else if (nbSpaces === 1 && v.length >= 1) {
|
|
|
441 |
degChr = degChr.replace(' ', '');
|
|
|
442 |
if (degChr.slice(degChr.length - 1, degChr.length) !== '°') {
|
|
|
443 |
degChr += '° ';
|
|
|
444 |
}
|
|
|
445 |
else {
|
|
|
446 |
degChr += ' ';
|
|
|
447 |
}
|
|
|
448 |
}
|
|
|
449 |
else if (nbSpaces === 2 && v.length >= 2) {
|
|
|
450 |
degChr = degChr.replace(' ', '');
|
|
|
451 |
minChr = minChr.replace(' ', '');
|
|
|
452 |
if (degChr.slice(degChr.length - 1, degChr.length) !== '°') {
|
|
|
453 |
degChr += '° ';
|
|
|
454 |
}
|
|
|
455 |
else {
|
|
|
456 |
degChr += ' ';
|
|
|
457 |
}
|
|
|
458 |
if (minChr.slice(minChr.length - 1, minChr.length) !== '\'') {
|
|
|
459 |
minChr += '\' ';
|
|
|
460 |
}
|
|
|
461 |
else {
|
|
|
462 |
minChr += ' ';
|
|
|
463 |
}
|
|
|
464 |
}
|
|
|
465 |
else if (nbSpaces === 3 && v.length >= 3) {
|
|
|
466 |
degChr = degChr.replace(' ', '');
|
|
|
467 |
minChr = minChr.replace(' ', '');
|
|
|
468 |
secChr = secChr.replace(' ', '');
|
|
|
469 |
if (degChr.slice(degChr.length - 1, degChr.length) !== '°') {
|
|
|
470 |
degChr += '° ';
|
|
|
471 |
}
|
|
|
472 |
else {
|
|
|
473 |
degChr += ' ';
|
|
|
474 |
}
|
|
|
475 |
if (minChr.slice(minChr.length - 1, minChr.length) !== '\'') {
|
|
|
476 |
minChr += '\' ';
|
|
|
477 |
}
|
|
|
478 |
else {
|
|
|
479 |
minChr += ' ';
|
|
|
480 |
}
|
|
|
481 |
if (secChr.slice(secChr.length - 1, secChr.length) !== '"') {
|
|
|
482 |
secChr += '"';
|
|
|
483 |
}
|
|
|
484 |
}
|
|
|
485 |
else {
|
|
|
486 |
throw { error: 'Can\'t manage input string.' };
|
|
|
487 |
}
|
|
|
488 |
return degChr + minChr + secChr;
|
|
|
489 |
}
|
|
|
490 |
catch (e) {
|
|
|
491 |
return dmsStr;
|
|
|
492 |
}
|
|
|
493 |
}
|
|
|
494 |
|
|
|
495 |
/**
|
|
|
496 |
* @fileoverview added by tsickle
|
|
|
497 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
498 |
*/
|
|
|
499 |
var GeocodingService = /** @class */ (function () {
|
|
|
500 |
function GeocodingService(http) {
|
|
|
501 |
this.http = http;
|
|
|
502 |
}
|
|
|
503 |
/**
|
|
|
504 |
* @param {?} address
|
|
|
505 |
* @return {?}
|
|
|
506 |
*/
|
|
|
507 |
GeocodingService.prototype.geocode = /**
|
|
|
508 |
* @param {?} address
|
|
|
509 |
* @return {?}
|
|
|
510 |
*/
|
|
|
511 |
function (address) {
|
|
|
512 |
if (address === null) {
|
|
|
513 |
return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["empty"])();
|
|
|
514 |
}
|
|
|
515 |
/** @type {?} */
|
|
|
516 |
var url = "https://nominatim.openstreetmap.org/?format=json&addressdetails=1&q=" + address + "&format=json&limit=10&polygon_geojson=1";
|
|
|
517 |
return this.http.get(url).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(function (obj) { return obj; }));
|
|
|
518 |
};
|
|
|
519 |
/**
|
|
|
520 |
* @param {?} lat
|
|
|
521 |
* @param {?} lng
|
|
|
522 |
* @return {?}
|
|
|
523 |
*/
|
|
|
524 |
GeocodingService.prototype.reverse = /**
|
|
|
525 |
* @param {?} lat
|
|
|
526 |
* @param {?} lng
|
|
|
527 |
* @return {?}
|
|
|
528 |
*/
|
|
|
529 |
function (lat, lng) {
|
|
|
530 |
/** @type {?} */
|
|
|
531 |
var url = "https://nominatim.openstreetmap.org/reverse?format=json&lat=" + lat + "&lon=" + lng + "&polygon_geojson=1";
|
|
|
532 |
return this.http.get(url).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(function (obj) { return obj; }));
|
|
|
533 |
};
|
|
|
534 |
/**
|
|
|
535 |
* @param {?} osmPlaceResult
|
|
|
536 |
* @return {?}
|
|
|
537 |
*/
|
|
|
538 |
GeocodingService.prototype.getReadbleAddress = /**
|
|
|
539 |
* @param {?} osmPlaceResult
|
|
|
540 |
* @return {?}
|
|
|
541 |
*/
|
|
|
542 |
function (osmPlaceResult) {
|
|
|
543 |
/** @type {?} */
|
|
|
544 |
var locality = null;
|
|
|
545 |
/** @type {?} */
|
|
|
546 |
var subLocality = null;
|
|
|
547 |
/** @type {?} */
|
|
|
548 |
var road = null;
|
|
|
549 |
/** @type {?} */
|
|
|
550 |
var neighbourhood = null;
|
|
|
551 |
// Get "city" information (I mean city or something similar like village)
|
|
|
552 |
if (Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.city)) {
|
|
|
553 |
locality = osmPlaceResult.address.city;
|
|
|
554 |
}
|
|
|
555 |
else if (Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.town)) {
|
|
|
556 |
locality = osmPlaceResult.address.town;
|
|
|
557 |
}
|
|
|
558 |
else if (Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.village)) {
|
|
|
559 |
locality = osmPlaceResult.address.village;
|
|
|
560 |
}
|
|
|
561 |
else if (Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.hamlet)) {
|
|
|
562 |
locality = osmPlaceResult.address.hamlet;
|
|
|
563 |
}
|
|
|
564 |
// Get suburbr & if not defined : postcode
|
|
|
565 |
if (Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.suburb) && Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.postcode) && locality !== null) {
|
|
|
566 |
subLocality = osmPlaceResult.address.suburb + ', ' + osmPlaceResult.address.postcode;
|
|
|
567 |
}
|
|
|
568 |
else if (!Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.suburb) && Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.postcode) && locality !== null) {
|
|
|
569 |
subLocality = osmPlaceResult.address.postcode;
|
|
|
570 |
}
|
|
|
571 |
// Get "road"
|
|
|
572 |
if (Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.road)) {
|
|
|
573 |
road = osmPlaceResult.address.road;
|
|
|
574 |
}
|
|
|
575 |
else if (Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.pedestrian)) {
|
|
|
576 |
road = osmPlaceResult.address.pedestrian;
|
|
|
577 |
}
|
|
|
578 |
// Get neighbourhood
|
|
|
579 |
if (Object(_angular_compiler_src_util__WEBPACK_IMPORTED_MODULE_5__["isDefined"])(osmPlaceResult.address.neighbourhood)) {
|
|
|
580 |
neighbourhood = osmPlaceResult.address.neighbourhood;
|
|
|
581 |
}
|
|
|
582 |
// Return
|
|
|
583 |
if (road && neighbourhood && subLocality && locality) {
|
|
|
584 |
return road + ' (' + neighbourhood + ') ' + subLocality + ' ' + locality;
|
|
|
585 |
}
|
|
|
586 |
else if (road && !neighbourhood && subLocality && locality) {
|
|
|
587 |
return road + ' ' + subLocality + ' ' + locality;
|
|
|
588 |
}
|
|
|
589 |
else if (!road && neighbourhood && subLocality && locality) {
|
|
|
590 |
return neighbourhood + ' ' + subLocality + ' ' + locality;
|
|
|
591 |
}
|
|
|
592 |
else if (!road && !neighbourhood && subLocality && locality) {
|
|
|
593 |
return subLocality + ' ' + locality;
|
|
|
594 |
}
|
|
|
595 |
else if (!road && !neighbourhood && !subLocality && locality) {
|
|
|
596 |
return locality;
|
|
|
597 |
}
|
|
|
598 |
else {
|
|
|
599 |
return osmPlaceResult.display_name;
|
|
|
600 |
}
|
|
|
601 |
};
|
|
|
602 |
/**
|
|
|
603 |
* @param {?} osmClassFilter
|
|
|
604 |
* @param {?} osmResults
|
|
|
605 |
* @return {?}
|
|
|
606 |
*/
|
|
|
607 |
GeocodingService.prototype.osmClassFilter = /**
|
|
|
608 |
* @param {?} osmClassFilter
|
|
|
609 |
* @param {?} osmResults
|
|
|
610 |
* @return {?}
|
|
|
611 |
*/
|
|
|
612 |
function (osmClassFilter, osmResults) {
|
|
|
613 |
/** @type {?} */
|
|
|
614 |
var osmFilteredResults = [];
|
|
|
615 |
if (osmClassFilter.length > 0 && osmResults.length > 0) {
|
|
|
616 |
osmResults.forEach(function (osmItem) {
|
|
|
617 |
/** @type {?} */
|
|
|
618 |
var filterMatchOccurence = 0;
|
|
|
619 |
/** @type {?} */
|
|
|
620 |
var removeOccurence = false;
|
|
|
621 |
osmClassFilter.forEach(function (osmFilterItem) {
|
|
|
622 |
/** @type {?} */
|
|
|
623 |
var _class = osmFilterItem.split(':')[0];
|
|
|
624 |
/** @type {?} */
|
|
|
625 |
var _type = osmFilterItem.split(':')[1];
|
|
|
626 |
if (_type === '*') {
|
|
|
627 |
if (osmItem.class === _class) {
|
|
|
628 |
filterMatchOccurence++;
|
|
|
629 |
}
|
|
|
630 |
}
|
|
|
631 |
else {
|
|
|
632 |
// if !, remove
|
|
|
633 |
if (_type.substr(0, 1) === '!') {
|
|
|
634 |
if (osmItem.class === _class && '!' + osmItem.type === _type) {
|
|
|
635 |
removeOccurence = true;
|
|
|
636 |
}
|
|
|
637 |
}
|
|
|
638 |
else {
|
|
|
639 |
if (osmItem.class === _class && osmItem.type === _type) {
|
|
|
640 |
filterMatchOccurence++;
|
|
|
641 |
}
|
|
|
642 |
}
|
|
|
643 |
}
|
|
|
644 |
});
|
|
|
645 |
if (filterMatchOccurence > 0 && !removeOccurence) {
|
|
|
646 |
osmFilteredResults.push(osmItem);
|
|
|
647 |
}
|
|
|
648 |
});
|
|
|
649 |
return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["of"])(osmFilteredResults);
|
|
|
650 |
}
|
|
|
651 |
else {
|
|
|
652 |
return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["of"])(osmResults);
|
|
|
653 |
}
|
|
|
654 |
};
|
|
|
655 |
/**
|
|
|
656 |
* @param {?} coordinatesArray
|
|
|
657 |
* @return {?}
|
|
|
658 |
*/
|
|
|
659 |
GeocodingService.prototype.reverseCorrdinatesArray = /**
|
|
|
660 |
* @param {?} coordinatesArray
|
|
|
661 |
* @return {?}
|
|
|
662 |
*/
|
|
|
663 |
function (coordinatesArray) {
|
|
|
664 |
if (coordinatesArray.length > 0) {
|
|
|
665 |
coordinatesArray.forEach(function (item) {
|
|
|
666 |
item.reverse();
|
|
|
667 |
});
|
|
|
668 |
return coordinatesArray;
|
|
|
669 |
}
|
|
|
670 |
};
|
|
|
671 |
/**
|
|
|
672 |
* @param {?} coordinatesArray
|
|
|
673 |
* @return {?}
|
|
|
674 |
*/
|
|
|
675 |
GeocodingService.prototype.simplifyPolyline = /**
|
|
|
676 |
* @param {?} coordinatesArray
|
|
|
677 |
* @return {?}
|
|
|
678 |
*/
|
|
|
679 |
function (coordinatesArray) {
|
|
|
680 |
if (coordinatesArray.length > 1) {
|
|
|
681 |
/** @type {?} */
|
|
|
682 |
var firstCoordinate = coordinatesArray[0];
|
|
|
683 |
/** @type {?} */
|
|
|
684 |
var lastCoordinate = coordinatesArray[coordinatesArray.length - 1];
|
|
|
685 |
return [firstCoordinate, lastCoordinate];
|
|
|
686 |
}
|
|
|
687 |
else {
|
|
|
688 |
return coordinatesArray;
|
|
|
689 |
}
|
|
|
690 |
};
|
|
|
691 |
GeocodingService.decorators = [
|
|
|
692 |
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{
|
|
|
693 |
providedIn: 'root'
|
|
|
694 |
},] },
|
|
|
695 |
];
|
|
|
696 |
/** @nocollapse */
|
|
|
697 |
GeocodingService.ctorParameters = function () { return [
|
|
|
698 |
{ type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] }
|
|
|
699 |
]; };
|
|
|
700 |
/** @nocollapse */ GeocodingService.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function GeocodingService_Factory() { return new GeocodingService(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"])); }, token: GeocodingService, providedIn: "root" });
|
|
|
701 |
return GeocodingService;
|
|
|
702 |
}());
|
|
|
703 |
|
|
|
704 |
/**
|
|
|
705 |
* @fileoverview added by tsickle
|
|
|
706 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
707 |
*/
|
|
|
708 |
var ElevationService = /** @class */ (function () {
|
|
|
709 |
function ElevationService(http) {
|
|
|
710 |
this.http = http;
|
|
|
711 |
}
|
|
|
712 |
/**
|
|
|
713 |
* @param {?} lat
|
|
|
714 |
* @param {?} lng
|
|
|
715 |
* @return {?}
|
|
|
716 |
*/
|
|
|
717 |
ElevationService.prototype.getElevation = /**
|
|
|
718 |
* @param {?} lat
|
|
|
719 |
* @param {?} lng
|
|
|
720 |
* @return {?}
|
|
|
721 |
*/
|
|
|
722 |
function (lat, lng) {
|
|
|
723 |
/** @type {?} */
|
|
|
724 |
var apiUrl = "https://api.open-elevation.com/api/v1/lookup?locations=" + lat + "," + lng;
|
|
|
725 |
return this.http.get(apiUrl).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(function (obj) { return obj.results[0].elevation; }));
|
|
|
726 |
};
|
|
|
727 |
ElevationService.decorators = [
|
|
|
728 |
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{
|
|
|
729 |
providedIn: 'root'
|
|
|
730 |
},] },
|
|
|
731 |
];
|
|
|
732 |
/** @nocollapse */
|
|
|
733 |
ElevationService.ctorParameters = function () { return [
|
|
|
734 |
{ type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] }
|
|
|
735 |
]; };
|
|
|
736 |
/** @nocollapse */ ElevationService.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["defineInjectable"])({ factory: function ElevationService_Factory() { return new ElevationService(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["inject"])(_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"])); }, token: ElevationService, providedIn: "root" });
|
|
|
737 |
return ElevationService;
|
|
|
738 |
}());
|
|
|
739 |
|
|
|
740 |
/**
|
|
|
741 |
* @fileoverview added by tsickle
|
|
|
742 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
743 |
*/
|
|
|
744 |
var MapComponent = /** @class */ (function () {
|
|
|
745 |
// ----
|
|
|
746 |
// CODE
|
|
|
747 |
// ----
|
|
|
748 |
function MapComponent(fb, geocodeService, elevationService) {
|
|
|
749 |
this.fb = fb;
|
|
|
750 |
this.geocodeService = geocodeService;
|
|
|
751 |
this.elevationService = elevationService;
|
|
|
752 |
// --------------
|
|
|
753 |
// INPUT / OUTPUT
|
|
|
754 |
// --------------
|
|
|
755 |
this.layersToAdd = ['osm'];
|
|
|
756 |
this.osmClassFilter = [];
|
|
|
757 |
this.location = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
|
|
|
758 |
this.coordFormat = 'dms';
|
|
|
759 |
// ---------
|
|
|
760 |
// VARIABLES
|
|
|
761 |
// ---------
|
|
|
762 |
this._location = /** @type {?} */ ({});
|
|
|
763 |
this.geolocatedPhotoLatLngData = [];
|
|
|
764 |
this.geolocatedPhotoLatLngDisplayedColumnsTable = ['select', 'photoName', 'lat', 'lng', 'altitude'];
|
|
|
765 |
this.isLoadingAddress = false;
|
|
|
766 |
this.isLoadingLatitude = false;
|
|
|
767 |
this.isLoadingLongitude = false;
|
|
|
768 |
this.isLoadingElevation = false;
|
|
|
769 |
// -------------
|
|
|
770 |
// SUBSCRIPTIONS
|
|
|
771 |
// -------------
|
|
|
772 |
this.geoSearchSubscription = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subscription"];
|
|
|
773 |
this.latDmsInputSubscription = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subscription"];
|
|
|
774 |
this.lngDmsInputSubscription = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subscription"];
|
|
|
775 |
this.mapLat = 0;
|
|
|
776 |
this.mapLng = 0;
|
|
|
777 |
this.osmLayer = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["tileLayer"])('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'Open Street map' });
|
|
|
778 |
this.googleSatelliteLayer = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["tileLayer"])('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', { maxZoom: 20, subdomains: ['mt0', 'mt1', 'mt2', 'mt3'], attribution: 'Google maps' });
|
|
|
779 |
this.googleHybridLayer = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["tileLayer"])('http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}', { maxZoom: 20, subdomains: ['mt0', 'mt1', 'mt2', 'mt3'], attribution: 'Google maps' });
|
|
|
780 |
this.brgmLayer = leaflet__WEBPACK_IMPORTED_MODULE_1__["tileLayer"].wms('http://geoservices.brgm.fr/geologie', { version: '1.3.0', layers: 'Geologie' });
|
|
|
781 |
this.mapLayers = {
|
|
|
782 |
'Google': this.googleHybridLayer,
|
|
|
783 |
'OSM': this.osmLayer,
|
|
|
784 |
'BRGM': this.brgmLayer
|
|
|
785 |
};
|
|
|
786 |
this.geoResultsLayer = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["geoJSON"])(null, { style: function () { return { color: '#ff7800', weight: 5, opacity: 0.65 }; } });
|
|
|
787 |
this.geolocatedPhotoLatLngLayer = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["geoJSON"])();
|
|
|
788 |
// map options
|
|
|
789 |
this.options = {
|
|
|
790 |
layers: [this.osmLayer],
|
|
|
791 |
zoom: 4,
|
|
|
792 |
center: Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["latLng"])({ lat: 46.55886030311719, lng: 2.9882812500000004 })
|
|
|
793 |
};
|
|
|
794 |
// Leaflet map configuration
|
|
|
795 |
this.drawnItems = new leaflet__WEBPACK_IMPORTED_MODULE_1__["FeatureGroup"]();
|
|
|
796 |
this.drawControlFull = drawControlPanel;
|
|
|
797 |
this.drawControlEdit = drawControlEditPanel(this.drawnItems);
|
|
|
798 |
this.circleMarkerOpt = circleMarkerStyle;
|
|
|
799 |
this.geoResultsOpt = cityStyle;
|
|
|
800 |
}
|
|
|
801 |
/**
|
|
|
802 |
* - Create the forms
|
|
|
803 |
* - Set up subscriptions (geo search, geolocated photos, lat / lng inputs)
|
|
|
804 |
*/
|
|
|
805 |
/**
|
|
|
806 |
* - Create the forms
|
|
|
807 |
* - Set up subscriptions (geo search, geolocated photos, lat / lng inputs)
|
|
|
808 |
* @return {?}
|
|
|
809 |
*/
|
|
|
810 |
MapComponent.prototype.ngOnInit = /**
|
|
|
811 |
* - Create the forms
|
|
|
812 |
* - Set up subscriptions (geo search, geolocated photos, lat / lng inputs)
|
|
|
813 |
* @return {?}
|
|
|
814 |
*/
|
|
|
815 |
function () {
|
|
|
816 |
var _this = this;
|
|
|
817 |
// Create forms
|
|
|
818 |
this.latlngFormGroup = this.fb.group({
|
|
|
819 |
latInput: this.fb.control('', [_angular_forms__WEBPACK_IMPORTED_MODULE_6__["Validators"].required, this.latLngDecValidator]),
|
|
|
820 |
lngInput: this.fb.control('', [_angular_forms__WEBPACK_IMPORTED_MODULE_6__["Validators"].required, this.latLngDecValidator]),
|
|
|
821 |
dmsLatInput: this.fb.control('', [_angular_forms__WEBPACK_IMPORTED_MODULE_6__["Validators"].required, this.latLngDmsValidator]),
|
|
|
822 |
dmsLngInput: this.fb.control('', [_angular_forms__WEBPACK_IMPORTED_MODULE_6__["Validators"].required, this.latLngDmsValidator])
|
|
|
823 |
});
|
|
|
824 |
this.elevationFormGroup = this.fb.group({
|
|
|
825 |
elevationInput: this.fb.control('', null)
|
|
|
826 |
});
|
|
|
827 |
this.geoSearchFormGroup = this.fb.group({
|
|
|
828 |
placeInput: this.fb.control('', null)
|
|
|
829 |
});
|
|
|
830 |
// Watch placeInput changes
|
|
|
831 |
this.geoSearchSubscription = this.geoSearchFormGroup.controls["placeInput"].valueChanges
|
|
|
832 |
.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["debounceTime"])(400), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["distinctUntilChanged"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["switchMap"])(function (value) {
|
|
|
833 |
_this.isLoadingAddress = true;
|
|
|
834 |
return _this.geocodeService.geocode(value);
|
|
|
835 |
})).subscribe(function (results) {
|
|
|
836 |
_this.isLoadingAddress = false;
|
|
|
837 |
// filter results if needed
|
|
|
838 |
if (_this.osmClassFilter.length > 0) {
|
|
|
839 |
_this.geocodeService.osmClassFilter(_this.osmClassFilter, results).subscribe(function (filteredResults) {
|
|
|
840 |
_this.geoSearchResults = filteredResults;
|
|
|
841 |
});
|
|
|
842 |
}
|
|
|
843 |
else {
|
|
|
844 |
_this.geoSearchResults = results;
|
|
|
845 |
}
|
|
|
846 |
}, function (error) {
|
|
|
847 |
// @toto manage error
|
|
|
848 |
// @toto manage error
|
|
|
849 |
_this.isLoadingAddress = false;
|
|
|
850 |
});
|
|
|
851 |
// Watch geolocated photo input changes
|
|
|
852 |
this.geolocatedPhotoLatLng.subscribe(function (photoLatLng) {
|
|
|
853 |
// @todo clear this.geolocatedPhotoLatLngLayer
|
|
|
854 |
// @todo clear this.geolocatedPhotoLatLngLayer
|
|
|
855 |
_this.geolocatedPhotoLatLngData = photoLatLng;
|
|
|
856 |
// For each geolocated photo, add marker and bind mouse event on thoses markers
|
|
|
857 |
// For each geolocated photo, add marker and bind mouse event on thoses markers
|
|
|
858 |
_this.geolocatedPhotoLatLngData.forEach(function (data) {
|
|
|
859 |
/** @type {?} */
|
|
|
860 |
var _latDms = data.lat.deg + '° ' + data.lat.min + '\'' + data.lat.sec + '"';
|
|
|
861 |
/** @type {?} */
|
|
|
862 |
var _lngDms = data.lng.deg + '° ' + data.lng.min + '\'' + data.lng.sec + '"';
|
|
|
863 |
/** @type {?} */
|
|
|
864 |
var g = new GeoPoint(_lngDms, _latDms);
|
|
|
865 |
data.latDec = g.latDec;
|
|
|
866 |
data.lngDec = g.lonDec;
|
|
|
867 |
/** @type {?} */
|
|
|
868 |
var latLng$$1 = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["latLng"])(data.latDec, data.lngDec);
|
|
|
869 |
/** @type {?} */
|
|
|
870 |
var gpsPhotoMarker = new leaflet__WEBPACK_IMPORTED_MODULE_1__["Marker"](latLng$$1, { icon: gpsPhotoMarkerIcon() });
|
|
|
871 |
/** @type {?} */
|
|
|
872 |
var html = "\n <b>Fichier \"" + data.photoName + "\"</b><br>\n Lat. : " + g.latDeg + "<br />\n Lng. : " + g.lonDeg + "<br />\n Alt. : " + data.altitude + " m<br /><br />\n <b>Cliquez sur le point pour utiliser ces coordonn\u00E9es</b>";
|
|
|
873 |
gpsPhotoMarker.bindPopup(html).openPopup();
|
|
|
874 |
// Marker mouse events
|
|
|
875 |
gpsPhotoMarker.on('click', (function (event) { _this.gpsMarkerSetValues(data.latDec, data.lngDec, data.altitude); }));
|
|
|
876 |
gpsPhotoMarker.on('mouseover', function (event) { gpsPhotoMarker.openPopup(); });
|
|
|
877 |
gpsPhotoMarker.on('mouseout', (function (event) { gpsPhotoMarker.closePopup(); }));
|
|
|
878 |
// Add the marker to the map
|
|
|
879 |
gpsPhotoMarker.addTo(_this.geolocatedPhotoLatLngLayer);
|
|
|
880 |
});
|
|
|
881 |
// Fit map to geolocated photos markers
|
|
|
882 |
// Fit map to geolocated photos markers
|
|
|
883 |
_this.flyToGeolocatedPhotoItems();
|
|
|
884 |
});
|
|
|
885 |
// Watch lat & lng DMS inputs changes and set up the DMS formatter
|
|
|
886 |
// The DMS formatter restricts the keyboard input of the user : only number, comma, dot and '-', deg and min must be between -90 and +90
|
|
|
887 |
// The formatter auto fill the ° ' and " characters to help the user input
|
|
|
888 |
this.latDmsInputSubscription = this.latlngFormGroup.controls["dmsLatInput"].valueChanges.subscribe(function (value) {
|
|
|
889 |
_this.latlngFormGroup.controls["dmsLatInput"].setValue(dmsFormatter(value), { emitEvent: false });
|
|
|
890 |
});
|
|
|
891 |
this.lngDmsInputSubscription = this.latlngFormGroup.controls["dmsLngInput"].valueChanges.subscribe(function (value) {
|
|
|
892 |
_this.latlngFormGroup.controls["dmsLngInput"].setValue(dmsFormatter(value), { emitEvent: false });
|
|
|
893 |
});
|
|
|
894 |
};
|
|
|
895 |
/**
|
|
|
896 |
* Unsubscribe
|
|
|
897 |
*/
|
|
|
898 |
/**
|
|
|
899 |
* Unsubscribe
|
|
|
900 |
* @return {?}
|
|
|
901 |
*/
|
|
|
902 |
MapComponent.prototype.ngOnDestroy = /**
|
|
|
903 |
* Unsubscribe
|
|
|
904 |
* @return {?}
|
|
|
905 |
*/
|
|
|
906 |
function () {
|
|
|
907 |
this.geoSearchSubscription.unsubscribe();
|
|
|
908 |
this.latDmsInputSubscription.unsubscribe();
|
|
|
909 |
this.lngDmsInputSubscription.unsubscribe();
|
|
|
910 |
};
|
|
|
911 |
/**
|
|
|
912 |
* Add layers and events listeners
|
|
|
913 |
*/
|
|
|
914 |
/**
|
|
|
915 |
* Add layers and events listeners
|
|
|
916 |
* @param {?} map
|
|
|
917 |
* @return {?}
|
|
|
918 |
*/
|
|
|
919 |
MapComponent.prototype.onMapReady = /**
|
|
|
920 |
* Add layers and events listeners
|
|
|
921 |
* @param {?} map
|
|
|
922 |
* @return {?}
|
|
|
923 |
*/
|
|
|
924 |
function (map$$1) {
|
|
|
925 |
var _this = this;
|
|
|
926 |
this.map = map$$1;
|
|
|
927 |
this.map.addControl(leaflet__WEBPACK_IMPORTED_MODULE_1__["control"].layers(null, this.mapLayers, { position: 'topright' }));
|
|
|
928 |
this.map.addLayer(this.drawnItems);
|
|
|
929 |
this.map.addLayer(this.geoResultsLayer);
|
|
|
930 |
this.map.addLayer(this.geolocatedPhotoLatLngLayer);
|
|
|
931 |
this.map.addControl(this.drawControlFull);
|
|
|
932 |
this.map.on('draw:created', function (e) {
|
|
|
933 |
_this.drawnItem = e['layer'];
|
|
|
934 |
_this.drawType = e['layerType'];
|
|
|
935 |
// If it's a marker, it must be draggable. By default, leaflet.draw module does not provide a draggable marker
|
|
|
936 |
// So, we don't do a this.drawnItems.addLayer(layer);
|
|
|
937 |
// We just draw a new draggableMarker instead
|
|
|
938 |
if (_this.drawType === 'marker') {
|
|
|
939 |
/** @type {?} */
|
|
|
940 |
var latlng = _this.drawnItem._latlng;
|
|
|
941 |
draggableMarker(latlng.lat, latlng.lng, function (dragEnd) { _this.callGeolocElevationApisUsingLatLngInputsValues(); }).addTo(_this.drawnItems);
|
|
|
942 |
}
|
|
|
943 |
else {
|
|
|
944 |
_this.drawnItems.addLayer(_this.drawnItem);
|
|
|
945 |
}
|
|
|
946 |
// Show / hide control panels
|
|
|
947 |
// if ONE item is drawn, set place and elevation inputs (call API)
|
|
|
948 |
if (_this.drawnItems.getLayers().length > 0) {
|
|
|
949 |
_this.setMapEditMode();
|
|
|
950 |
}
|
|
|
951 |
if (_this.drawnItems.getLayers().length === 1) {
|
|
|
952 |
_this.callGeolocElevationApisUsingLatLngInputsValues();
|
|
|
953 |
}
|
|
|
954 |
_this.flyToDrawnItems();
|
|
|
955 |
});
|
|
|
956 |
this.map.on('draw:edited', function (e) {
|
|
|
957 |
_this.drawnItem = e['layer'];
|
|
|
958 |
_this.drawType = e['layerType'];
|
|
|
959 |
// this.drawnItems.addLayer(this.drawnItem);
|
|
|
960 |
if (_this.drawnItems.getLayers().length === 1) {
|
|
|
961 |
_this.callGeolocElevationApisUsingLatLngInputsValues();
|
|
|
962 |
}
|
|
|
963 |
_this.flyToDrawnItems();
|
|
|
964 |
});
|
|
|
965 |
this.map.on('draw:deleted', function (e) {
|
|
|
966 |
_this.clearGeoResultsLayer();
|
|
|
967 |
_this.clearDrawnItemsLayer();
|
|
|
968 |
_this.setMapDrawMode();
|
|
|
969 |
_this.clearForm();
|
|
|
970 |
});
|
|
|
971 |
this.redrawMap(100);
|
|
|
972 |
};
|
|
|
973 |
/**
|
|
|
974 |
* When the map parent's div size change (eg. panel width), have to redraw the map
|
|
|
975 |
* Sometimes (when opening / closing a tab), size change is detected too earlier, need to set a delay (about 10-100ms seems to be convenient)
|
|
|
976 |
*/
|
|
|
977 |
/**
|
|
|
978 |
* When the map parent's div size change (eg. panel width), have to redraw the map
|
|
|
979 |
* Sometimes (when opening / closing a tab), size change is detected too earlier, need to set a delay (about 10-100ms seems to be convenient)
|
|
|
980 |
* @param {?=} delay
|
|
|
981 |
* @return {?}
|
|
|
982 |
*/
|
|
|
983 |
MapComponent.prototype.redrawMap = /**
|
|
|
984 |
* When the map parent's div size change (eg. panel width), have to redraw the map
|
|
|
985 |
* Sometimes (when opening / closing a tab), size change is detected too earlier, need to set a delay (about 10-100ms seems to be convenient)
|
|
|
986 |
* @param {?=} delay
|
|
|
987 |
* @return {?}
|
|
|
988 |
*/
|
|
|
989 |
function (delay) {
|
|
|
990 |
var _this = this;
|
|
|
991 |
if (delay) {
|
|
|
992 |
window.setTimeout(function () { return _this.map.invalidateSize(); }, delay);
|
|
|
993 |
}
|
|
|
994 |
else {
|
|
|
995 |
this.map.invalidateSize();
|
|
|
996 |
}
|
|
|
997 |
};
|
|
|
998 |
/**
|
|
|
999 |
* Show the "edit" toolbar inside map
|
|
|
1000 |
*/
|
|
|
1001 |
/**
|
|
|
1002 |
* Show the "edit" toolbar inside map
|
|
|
1003 |
* @return {?}
|
|
|
1004 |
*/
|
|
|
1005 |
MapComponent.prototype.setMapEditMode = /**
|
|
|
1006 |
* Show the "edit" toolbar inside map
|
|
|
1007 |
* @return {?}
|
|
|
1008 |
*/
|
|
|
1009 |
function () {
|
|
|
1010 |
this.map.removeControl(this.drawControlFull);
|
|
|
1011 |
this.map.addControl(this.drawControlEdit);
|
|
|
1012 |
};
|
|
|
1013 |
/**
|
|
|
1014 |
* Show the "draw" toolbar inside map
|
|
|
1015 |
*/
|
|
|
1016 |
/**
|
|
|
1017 |
* Show the "draw" toolbar inside map
|
|
|
1018 |
* @return {?}
|
|
|
1019 |
*/
|
|
|
1020 |
MapComponent.prototype.setMapDrawMode = /**
|
|
|
1021 |
* Show the "draw" toolbar inside map
|
|
|
1022 |
* @return {?}
|
|
|
1023 |
*/
|
|
|
1024 |
function () {
|
|
|
1025 |
this.map.removeControl(this.drawControlEdit);
|
|
|
1026 |
this.map.addControl(this.drawControlFull);
|
|
|
1027 |
};
|
|
|
1028 |
/**
|
|
|
1029 |
* Set map bounds to drawn items
|
|
|
1030 |
*/
|
|
|
1031 |
/**
|
|
|
1032 |
* Set map bounds to drawn items
|
|
|
1033 |
* @param {?=} _maxZoom
|
|
|
1034 |
* @return {?}
|
|
|
1035 |
*/
|
|
|
1036 |
MapComponent.prototype.flyToDrawnItems = /**
|
|
|
1037 |
* Set map bounds to drawn items
|
|
|
1038 |
* @param {?=} _maxZoom
|
|
|
1039 |
* @return {?}
|
|
|
1040 |
*/
|
|
|
1041 |
function (_maxZoom) {
|
|
|
1042 |
if (_maxZoom === void 0) { _maxZoom = 14; }
|
|
|
1043 |
/** @type {?} */
|
|
|
1044 |
var b = this.drawnItems.getBounds();
|
|
|
1045 |
this.map.flyToBounds(b, { maxZoom: _maxZoom, animate: false });
|
|
|
1046 |
};
|
|
|
1047 |
/**
|
|
|
1048 |
* Set map bounds to geo reults items
|
|
|
1049 |
*/
|
|
|
1050 |
/**
|
|
|
1051 |
* Set map bounds to geo reults items
|
|
|
1052 |
* @return {?}
|
|
|
1053 |
*/
|
|
|
1054 |
MapComponent.prototype.flyToGeoResultsItems = /**
|
|
|
1055 |
* Set map bounds to geo reults items
|
|
|
1056 |
* @return {?}
|
|
|
1057 |
*/
|
|
|
1058 |
function () {
|
|
|
1059 |
/** @type {?} */
|
|
|
1060 |
var b = this.geoResultsLayer.getBounds();
|
|
|
1061 |
this.map.flyToBounds(b, { maxZoom: 14, animate: false });
|
|
|
1062 |
};
|
|
|
1063 |
/**
|
|
|
1064 |
* Set map bounds to geolocated photos items
|
|
|
1065 |
*/
|
|
|
1066 |
/**
|
|
|
1067 |
* Set map bounds to geolocated photos items
|
|
|
1068 |
* @return {?}
|
|
|
1069 |
*/
|
|
|
1070 |
MapComponent.prototype.flyToGeolocatedPhotoItems = /**
|
|
|
1071 |
* Set map bounds to geolocated photos items
|
|
|
1072 |
* @return {?}
|
|
|
1073 |
*/
|
|
|
1074 |
function () {
|
|
|
1075 |
/** @type {?} */
|
|
|
1076 |
var b = this.geolocatedPhotoLatLngLayer.getBounds();
|
|
|
1077 |
this.map.flyToBounds(b, { maxZoom: 14, animate: false });
|
|
|
1078 |
};
|
|
|
1079 |
/**
|
|
|
1080 |
* Draw a marker on drawItems featureGroup with DMS input values
|
|
|
1081 |
*/
|
|
|
1082 |
/**
|
|
|
1083 |
* Draw a marker on drawItems featureGroup with DMS input values
|
|
|
1084 |
* @return {?}
|
|
|
1085 |
*/
|
|
|
1086 |
MapComponent.prototype.addMarkerFromDmsCoord = /**
|
|
|
1087 |
* Draw a marker on drawItems featureGroup with DMS input values
|
|
|
1088 |
* @return {?}
|
|
|
1089 |
*/
|
|
|
1090 |
function () {
|
|
|
1091 |
// clear drawn items layer
|
|
|
1092 |
this.clearDrawnItemsLayer();
|
|
|
1093 |
// update map toolbar
|
|
|
1094 |
this.setMapEditMode();
|
|
|
1095 |
/** @type {?} */
|
|
|
1096 |
var geopoint = new GeoPoint(this.latlngFormGroup.controls["dmsLngInput"].value, this.latlngFormGroup.controls["dmsLatInput"].value);
|
|
|
1097 |
draggableMarker(geopoint.getLatDec(), geopoint.getLonDec(), function (e) {
|
|
|
1098 |
/* dragend callback fn */
|
|
|
1099 |
}).addTo(this.drawnItems);
|
|
|
1100 |
// Set (decimal) latLng inputs
|
|
|
1101 |
this.latlngFormGroup.controls["latInput"].setValue(geopoint.getLatDec(), { emitEvent: false });
|
|
|
1102 |
this.latlngFormGroup.controls["lngInput"].setValue(geopoint.getLatDec(), { emitEvent: false });
|
|
|
1103 |
// Fly
|
|
|
1104 |
this.flyToDrawnItems();
|
|
|
1105 |
};
|
|
|
1106 |
/**
|
|
|
1107 |
* Draw a marker on drawItems featureGroup with decimal input values
|
|
|
1108 |
*/
|
|
|
1109 |
/**
|
|
|
1110 |
* Draw a marker on drawItems featureGroup with decimal input values
|
|
|
1111 |
* @return {?}
|
|
|
1112 |
*/
|
|
|
1113 |
MapComponent.prototype.addMarkerFromLatLngCoord = /**
|
|
|
1114 |
* Draw a marker on drawItems featureGroup with decimal input values
|
|
|
1115 |
* @return {?}
|
|
|
1116 |
*/
|
|
|
1117 |
function () {
|
|
|
1118 |
// clear drawn items layer
|
|
|
1119 |
this.clearDrawnItemsLayer();
|
|
|
1120 |
// update map toolbar
|
|
|
1121 |
this.setMapEditMode();
|
|
|
1122 |
/** @type {?} */
|
|
|
1123 |
var geopoint = new GeoPoint(Number(this.latlngFormGroup.controls["lngInput"].value), Number(this.latlngFormGroup.controls["latInput"].value));
|
|
|
1124 |
draggableMarker(geopoint.getLatDec(), geopoint.getLonDec(), function (dragEnd) {
|
|
|
1125 |
/* dragend callback fn */
|
|
|
1126 |
}).addTo(this.drawnItems);
|
|
|
1127 |
// Set dmsLatLng inputs
|
|
|
1128 |
this.latlngFormGroup.controls["dmsLatInput"].setValue(geopoint.getLatDeg(), { emitEvent: false });
|
|
|
1129 |
this.latlngFormGroup.controls["dmsLngInput"].setValue(geopoint.getLonDeg(), { emitEvent: false });
|
|
|
1130 |
// Fly
|
|
|
1131 |
this.flyToDrawnItems();
|
|
|
1132 |
};
|
|
|
1133 |
/**
|
|
|
1134 |
*
|
|
|
1135 |
*/
|
|
|
1136 |
/**
|
|
|
1137 |
*
|
|
|
1138 |
* @param {?} coordinates
|
|
|
1139 |
* @return {?}
|
|
|
1140 |
*/
|
|
|
1141 |
MapComponent.prototype.addPolyline = /**
|
|
|
1142 |
*
|
|
|
1143 |
* @param {?} coordinates
|
|
|
1144 |
* @return {?}
|
|
|
1145 |
*/
|
|
|
1146 |
function (coordinates) {
|
|
|
1147 |
// clear drawn items layer
|
|
|
1148 |
this.clearDrawnItemsLayer();
|
|
|
1149 |
// update map toolbar
|
|
|
1150 |
this.setMapEditMode();
|
|
|
1151 |
/** @type {?} */
|
|
|
1152 |
var polyline$$1 = Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["polyline"])(coordinates);
|
|
|
1153 |
polyline$$1.addTo(this.drawnItems);
|
|
|
1154 |
// fly with max zoom
|
|
|
1155 |
this.flyToDrawnItems(18);
|
|
|
1156 |
};
|
|
|
1157 |
/**
|
|
|
1158 |
* Take latitude and longitude input values and call geocoding and elevation API
|
|
|
1159 |
* Sometimes you may want to force the elevation value and avoid calling elevation API (eg. elevation come from gps photo metadata)
|
|
|
1160 |
* then, you cas use the avoidCallingElevationApi option
|
|
|
1161 |
*
|
|
|
1162 |
* What is done inside this function :
|
|
|
1163 |
* - create an observable that zip all required observables
|
|
|
1164 |
* - do a switchmap on the main observable so that if one one the sub-observable change, old data are ignored
|
|
|
1165 |
* - when the main observable is finished, can send new location Output
|
|
|
1166 |
*
|
|
|
1167 |
* Several if / else avoidCallingElevationApi are used because when
|
|
|
1168 |
* avoidCallingElevationApi === false, httpTasks returns a single value (osmPlace)
|
|
|
1169 |
* whereas if avoidCallingElevationApi === true, httpTasks returns an array of 2 values [elevation, osmPlace]
|
|
|
1170 |
*/
|
|
|
1171 |
/**
|
|
|
1172 |
* Take latitude and longitude input values and call geocoding and elevation API
|
|
|
1173 |
* Sometimes you may want to force the elevation value and avoid calling elevation API (eg. elevation come from gps photo metadata)
|
|
|
1174 |
* then, you cas use the avoidCallingElevationApi option
|
|
|
1175 |
*
|
|
|
1176 |
* What is done inside this function :
|
|
|
1177 |
* - create an observable that zip all required observables
|
|
|
1178 |
* - do a switchmap on the main observable so that if one one the sub-observable change, old data are ignored
|
|
|
1179 |
* - when the main observable is finished, can send new location Output
|
|
|
1180 |
*
|
|
|
1181 |
* Several if / else avoidCallingElevationApi are used because when
|
|
|
1182 |
* avoidCallingElevationApi === false, httpTasks returns a single value (osmPlace)
|
|
|
1183 |
* whereas if avoidCallingElevationApi === true, httpTasks returns an array of 2 values [elevation, osmPlace]
|
|
|
1184 |
* @param {?=} avoidCallingElevationApi
|
|
|
1185 |
* @param {?=} avoidCallingGeolocApi
|
|
|
1186 |
* @return {?}
|
|
|
1187 |
*/
|
|
|
1188 |
MapComponent.prototype.callGeolocElevationApisUsingLatLngInputsValues = /**
|
|
|
1189 |
* Take latitude and longitude input values and call geocoding and elevation API
|
|
|
1190 |
* Sometimes you may want to force the elevation value and avoid calling elevation API (eg. elevation come from gps photo metadata)
|
|
|
1191 |
* then, you cas use the avoidCallingElevationApi option
|
|
|
1192 |
*
|
|
|
1193 |
* What is done inside this function :
|
|
|
1194 |
* - create an observable that zip all required observables
|
|
|
1195 |
* - do a switchmap on the main observable so that if one one the sub-observable change, old data are ignored
|
|
|
1196 |
* - when the main observable is finished, can send new location Output
|
|
|
1197 |
*
|
|
|
1198 |
* Several if / else avoidCallingElevationApi are used because when
|
|
|
1199 |
* avoidCallingElevationApi === false, httpTasks returns a single value (osmPlace)
|
|
|
1200 |
* whereas if avoidCallingElevationApi === true, httpTasks returns an array of 2 values [elevation, osmPlace]
|
|
|
1201 |
* @param {?=} avoidCallingElevationApi
|
|
|
1202 |
* @param {?=} avoidCallingGeolocApi
|
|
|
1203 |
* @return {?}
|
|
|
1204 |
*/
|
|
|
1205 |
function (avoidCallingElevationApi, avoidCallingGeolocApi) {
|
|
|
1206 |
var _this = this;
|
|
|
1207 |
if (avoidCallingElevationApi === void 0) { avoidCallingElevationApi = false; }
|
|
|
1208 |
if (avoidCallingGeolocApi === void 0) { avoidCallingGeolocApi = false; }
|
|
|
1209 |
this.setLatLngInputFromDrawnItems();
|
|
|
1210 |
this.setLatLngDmsInputFromDrawnItems();
|
|
|
1211 |
/** @type {?} */
|
|
|
1212 |
var httpTasks;
|
|
|
1213 |
/** @type {?} */
|
|
|
1214 |
var elevation;
|
|
|
1215 |
/** @type {?} */
|
|
|
1216 |
var osmPlace;
|
|
|
1217 |
if (avoidCallingElevationApi && !avoidCallingGeolocApi) {
|
|
|
1218 |
httpTasks = this.reverseGeocodingFromInputValue();
|
|
|
1219 |
}
|
|
|
1220 |
else if (avoidCallingGeolocApi && !avoidCallingElevationApi) {
|
|
|
1221 |
httpTasks = this.getElevationFromInputValue();
|
|
|
1222 |
}
|
|
|
1223 |
else if (!avoidCallingElevationApi && !avoidCallingGeolocApi) {
|
|
|
1224 |
httpTasks = Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["zip"])(this.getElevationFromInputValue(), this.reverseGeocodingFromInputValue());
|
|
|
1225 |
}
|
|
|
1226 |
else if (avoidCallingElevationApi && avoidCallingGeolocApi) {
|
|
|
1227 |
// nothing to do ; throw or log an error ?
|
|
|
1228 |
return;
|
|
|
1229 |
}
|
|
|
1230 |
// spinnners on
|
|
|
1231 |
this.isLoadingAddress = !avoidCallingGeolocApi;
|
|
|
1232 |
this.isLoadingElevation = !avoidCallingElevationApi;
|
|
|
1233 |
httpTasks.subscribe(function (result) {
|
|
|
1234 |
_this.isLoadingElevation = false;
|
|
|
1235 |
_this.isLoadingAddress = false;
|
|
|
1236 |
if (avoidCallingElevationApi && !avoidCallingGeolocApi) {
|
|
|
1237 |
elevation = null;
|
|
|
1238 |
osmPlace = result;
|
|
|
1239 |
}
|
|
|
1240 |
else if (avoidCallingGeolocApi && !avoidCallingElevationApi) {
|
|
|
1241 |
elevation = result;
|
|
|
1242 |
osmPlace = null;
|
|
|
1243 |
elevation = result;
|
|
|
1244 |
}
|
|
|
1245 |
else if (!avoidCallingGeolocApi && !avoidCallingGeolocApi) {
|
|
|
1246 |
elevation = result[0];
|
|
|
1247 |
osmPlace = result[1];
|
|
|
1248 |
}
|
|
|
1249 |
// Set elevation input
|
|
|
1250 |
if (!avoidCallingElevationApi) {
|
|
|
1251 |
_this.elevationFormGroup.controls["elevationInput"].setValue(elevation);
|
|
|
1252 |
}
|
|
|
1253 |
// Patch place input value
|
|
|
1254 |
if (!avoidCallingGeolocApi) {
|
|
|
1255 |
_this.geoSearchFormGroup.controls["placeInput"].patchValue(_this.geocodeService.getReadbleAddress(osmPlace), { emitEvent: false });
|
|
|
1256 |
}
|
|
|
1257 |
// bind _location & emit location
|
|
|
1258 |
if (avoidCallingElevationApi) {
|
|
|
1259 |
_this.bindLocationOutput([_this.elevationFormGroup.controls["elevationInput"].value, osmPlace]);
|
|
|
1260 |
}
|
|
|
1261 |
else {
|
|
|
1262 |
_this.bindLocationOutput(result);
|
|
|
1263 |
}
|
|
|
1264 |
}, function (error) {
|
|
|
1265 |
// Manage error
|
|
|
1266 |
// spinnners off
|
|
|
1267 |
// Manage error
|
|
|
1268 |
// spinnners off
|
|
|
1269 |
_this.isLoadingAddress = false;
|
|
|
1270 |
_this.isLoadingElevation = false;
|
|
|
1271 |
});
|
|
|
1272 |
};
|
|
|
1273 |
/**
|
|
|
1274 |
* Should be improved for complex polygons / polylines ?
|
|
|
1275 |
* Could use turf.js
|
|
|
1276 |
*/
|
|
|
1277 |
/**
|
|
|
1278 |
* Should be improved for complex polygons / polylines ?
|
|
|
1279 |
* Could use turf.js
|
|
|
1280 |
* @return {?}
|
|
|
1281 |
*/
|
|
|
1282 |
MapComponent.prototype.setLatLngInputFromDrawnItems = /**
|
|
|
1283 |
* Should be improved for complex polygons / polylines ?
|
|
|
1284 |
* Could use turf.js
|
|
|
1285 |
* @return {?}
|
|
|
1286 |
*/
|
|
|
1287 |
function () {
|
|
|
1288 |
/** @type {?} */
|
|
|
1289 |
var centroid = this.drawnItems.getBounds().getCenter();
|
|
|
1290 |
this.latlngFormGroup.controls["latInput"].setValue(centroid.lat);
|
|
|
1291 |
this.latlngFormGroup.controls["lngInput"].setValue(centroid.lng);
|
|
|
1292 |
};
|
|
|
1293 |
/**
|
|
|
1294 |
*
|
|
|
1295 |
*/
|
|
|
1296 |
/**
|
|
|
1297 |
*
|
|
|
1298 |
* @return {?}
|
|
|
1299 |
*/
|
|
|
1300 |
MapComponent.prototype.setLatLngDmsInputFromDrawnItems = /**
|
|
|
1301 |
*
|
|
|
1302 |
* @return {?}
|
|
|
1303 |
*/
|
|
|
1304 |
function () {
|
|
|
1305 |
/** @type {?} */
|
|
|
1306 |
var centroid = this.drawnItems.getBounds().getCenter();
|
|
|
1307 |
/** @type {?} */
|
|
|
1308 |
var geopoint = new GeoPoint(centroid.lng, centroid.lat);
|
|
|
1309 |
this.latlngFormGroup.controls["dmsLatInput"].patchValue(geopoint.getLatDeg());
|
|
|
1310 |
this.latlngFormGroup.controls["dmsLngInput"].patchValue(geopoint.getLonDeg());
|
|
|
1311 |
};
|
|
|
1312 |
/**
|
|
|
1313 |
*
|
|
|
1314 |
*/
|
|
|
1315 |
/**
|
|
|
1316 |
*
|
|
|
1317 |
* @return {?}
|
|
|
1318 |
*/
|
|
|
1319 |
MapComponent.prototype.getElevationFromInputValue = /**
|
|
|
1320 |
*
|
|
|
1321 |
* @return {?}
|
|
|
1322 |
*/
|
|
|
1323 |
function () {
|
|
|
1324 |
return this.elevationService.getElevation(this.latlngFormGroup.controls["latInput"].value, this.latlngFormGroup.controls["lngInput"].value);
|
|
|
1325 |
};
|
|
|
1326 |
/**
|
|
|
1327 |
* Reverse geocoding from lat / lng inputs values
|
|
|
1328 |
*/
|
|
|
1329 |
/**
|
|
|
1330 |
* Reverse geocoding from lat / lng inputs values
|
|
|
1331 |
* @return {?}
|
|
|
1332 |
*/
|
|
|
1333 |
MapComponent.prototype.reverseGeocodingFromInputValue = /**
|
|
|
1334 |
* Reverse geocoding from lat / lng inputs values
|
|
|
1335 |
* @return {?}
|
|
|
1336 |
*/
|
|
|
1337 |
function () {
|
|
|
1338 |
return this.geocodeService.reverse(this.latlngFormGroup.controls["latInput"].value, this.latlngFormGroup.controls["lngInput"].value);
|
|
|
1339 |
};
|
|
|
1340 |
/**
|
|
|
1341 |
* Latitude / longitude DMS form Validator
|
|
|
1342 |
*/
|
|
|
1343 |
/**
|
|
|
1344 |
* Latitude / longitude DMS form Validator
|
|
|
1345 |
* @param {?} control
|
|
|
1346 |
* @return {?}
|
|
|
1347 |
*/
|
|
|
1348 |
MapComponent.prototype.latLngDmsValidator = /**
|
|
|
1349 |
* Latitude / longitude DMS form Validator
|
|
|
1350 |
* @param {?} control
|
|
|
1351 |
* @return {?}
|
|
|
1352 |
*/
|
|
|
1353 |
function (control$$1) {
|
|
|
1354 |
/** @type {?} */
|
|
|
1355 |
var regexp = new RegExp('^(\\-)?[0-9]{1,2}\\° [0-9]{1,2}\\\' [0-9]{1,2}\\.[0-9]{1,12}\\"');
|
|
|
1356 |
return regexp.test(control$$1.value) ? null : { malformedLatLngDmsFormat: true };
|
|
|
1357 |
};
|
|
|
1358 |
/**
|
|
|
1359 |
* Latitude / longitude decimal form validator
|
|
|
1360 |
*/
|
|
|
1361 |
/**
|
|
|
1362 |
* Latitude / longitude decimal form validator
|
|
|
1363 |
* @param {?} control
|
|
|
1364 |
* @return {?}
|
|
|
1365 |
*/
|
|
|
1366 |
MapComponent.prototype.latLngDecValidator = /**
|
|
|
1367 |
* Latitude / longitude decimal form validator
|
|
|
1368 |
* @param {?} control
|
|
|
1369 |
* @return {?}
|
|
|
1370 |
*/
|
|
|
1371 |
function (control$$1) {
|
|
|
1372 |
/** @type {?} */
|
|
|
1373 |
var regexp = new RegExp('^(\\-)?[0-9]{1,2}\\.[0-9]{1,20}');
|
|
|
1374 |
return regexp.test(control$$1.value) ? null : { malformedLatLngDecFormat: true };
|
|
|
1375 |
};
|
|
|
1376 |
/**
|
|
|
1377 |
* When user select an address within the autocomplete results list
|
|
|
1378 |
*
|
|
|
1379 |
* Call the geoloc API 2 times :
|
|
|
1380 |
* - first call is for reverse geocoding
|
|
|
1381 |
* - second call is for geoconding, so the address input (placeInput) is updated
|
|
|
1382 |
*/
|
|
|
1383 |
/**
|
|
|
1384 |
* When user select an address within the autocomplete results list
|
|
|
1385 |
*
|
|
|
1386 |
* Call the geoloc API 2 times :
|
|
|
1387 |
* - first call is for reverse geocoding
|
|
|
1388 |
* - second call is for geoconding, so the address input (placeInput) is updated
|
|
|
1389 |
* @param {?} event
|
|
|
1390 |
* @return {?}
|
|
|
1391 |
*/
|
|
|
1392 |
MapComponent.prototype.addressSelectedChanged = /**
|
|
|
1393 |
* When user select an address within the autocomplete results list
|
|
|
1394 |
*
|
|
|
1395 |
* Call the geoloc API 2 times :
|
|
|
1396 |
* - first call is for reverse geocoding
|
|
|
1397 |
* - second call is for geoconding, so the address input (placeInput) is updated
|
|
|
1398 |
* @param {?} event
|
|
|
1399 |
* @return {?}
|
|
|
1400 |
*/
|
|
|
1401 |
function (event) {
|
|
|
1402 |
/** @type {?} */
|
|
|
1403 |
var osmPlace = event.option.value;
|
|
|
1404 |
/** @type {?} */
|
|
|
1405 |
var southWest = new leaflet__WEBPACK_IMPORTED_MODULE_1__["LatLng"](osmPlace.boundingbox[0], osmPlace.boundingbox[2]);
|
|
|
1406 |
/** @type {?} */
|
|
|
1407 |
var northEast = new leaflet__WEBPACK_IMPORTED_MODULE_1__["LatLng"](osmPlace.boundingbox[1], osmPlace.boundingbox[3]);
|
|
|
1408 |
this.map.fitBounds(Object(leaflet__WEBPACK_IMPORTED_MODULE_1__["latLngBounds"])(southWest, northEast));
|
|
|
1409 |
// Add geojson to the map (if user enter a city, draw the administrative shape on the map)
|
|
|
1410 |
this.clearGeoResultsLayer();
|
|
|
1411 |
this.geoResultsLayer.addData(osmPlace.geojson);
|
|
|
1412 |
// Fly
|
|
|
1413 |
this.flyToGeoResultsItems();
|
|
|
1414 |
// Patch input value
|
|
|
1415 |
this.geoSearchFormGroup.controls["placeInput"].patchValue(this.geocodeService.getReadbleAddress(osmPlace), { emitEvent: false });
|
|
|
1416 |
/** @type {?} */
|
|
|
1417 |
var g = new GeoPoint(Number(osmPlace.lon), Number(osmPlace.lat));
|
|
|
1418 |
this.latlngFormGroup.controls["latInput"].setValue(osmPlace.lat, { emitEvent: false });
|
|
|
1419 |
this.latlngFormGroup.controls["lngInput"].setValue(osmPlace.lon, { emitEvent: false });
|
|
|
1420 |
this.latlngFormGroup.controls["dmsLatInput"].setValue(g.getLatDeg(), { emitEvent: false });
|
|
|
1421 |
this.latlngFormGroup.controls["dmsLngInput"].setValue(g.getLonDeg(), { emitEvent: false });
|
|
|
1422 |
this.elevationFormGroup.controls["elevationInput"].setValue(osmPlace.elevation, { emitEvent: false });
|
|
|
1423 |
// Draw a polyline or place a marker at the center of a polygon
|
|
|
1424 |
if (osmPlace.geojson.type === 'LineString') {
|
|
|
1425 |
// osm geojson coordinates is like [[long, lat], [long, lat], ...]
|
|
|
1426 |
// but leaflet needs [[lat, long], [lat, long], ...] format !
|
|
|
1427 |
this.geocodeService.simplifyPolyline(osmPlace.geojson.coordinates);
|
|
|
1428 |
this.addPolyline(/** @type {?} */ (this.geocodeService.reverseCorrdinatesArray(this.geocodeService.simplifyPolyline(osmPlace.geojson.coordinates))));
|
|
|
1429 |
this.clearGeoResultsLayer();
|
|
|
1430 |
}
|
|
|
1431 |
else {
|
|
|
1432 |
this.addMarkerFromLatLngCoord();
|
|
|
1433 |
}
|
|
|
1434 |
// Call geoloc and elevation APIs
|
|
|
1435 |
this.callGeolocElevationApisUsingLatLngInputsValues(false, false);
|
|
|
1436 |
};
|
|
|
1437 |
/**
|
|
|
1438 |
* Clear the form when nedded : 'draw:deleted', etc.
|
|
|
1439 |
*/
|
|
|
1440 |
/**
|
|
|
1441 |
* Clear the form when nedded : 'draw:deleted', etc.
|
|
|
1442 |
* @return {?}
|
|
|
1443 |
*/
|
|
|
1444 |
MapComponent.prototype.clearForm = /**
|
|
|
1445 |
* Clear the form when nedded : 'draw:deleted', etc.
|
|
|
1446 |
* @return {?}
|
|
|
1447 |
*/
|
|
|
1448 |
function () {
|
|
|
1449 |
this.latlngFormGroup.controls["latInput"].setValue('', { emitEvent: false });
|
|
|
1450 |
this.latlngFormGroup.controls["lngInput"].setValue('', { emitEvent: false });
|
|
|
1451 |
this.latlngFormGroup.controls["dmsLatInput"].setValue('', { emitEvent: false });
|
|
|
1452 |
this.latlngFormGroup.controls["dmsLngInput"].setValue('', { emitEvent: false });
|
|
|
1453 |
this.latlngFormGroup.reset();
|
|
|
1454 |
this.elevationFormGroup.controls["elevationInput"].setValue('', { emitEvent: false });
|
|
|
1455 |
this.elevationFormGroup.reset();
|
|
|
1456 |
this.geoSearchFormGroup.controls["placeInput"].setValue('', { emitEvent: false });
|
|
|
1457 |
};
|
|
|
1458 |
/**
|
|
|
1459 |
* Clear geoResults layer (eg this layer contains administrative polygons -- "commune")
|
|
|
1460 |
*/
|
|
|
1461 |
/**
|
|
|
1462 |
* Clear geoResults layer (eg this layer contains administrative polygons -- "commune")
|
|
|
1463 |
* @return {?}
|
|
|
1464 |
*/
|
|
|
1465 |
MapComponent.prototype.clearGeoResultsLayer = /**
|
|
|
1466 |
* Clear geoResults layer (eg this layer contains administrative polygons -- "commune")
|
|
|
1467 |
* @return {?}
|
|
|
1468 |
*/
|
|
|
1469 |
function () {
|
|
|
1470 |
this.geoResultsLayer.clearLayers();
|
|
|
1471 |
};
|
|
|
1472 |
/**
|
|
|
1473 |
*
|
|
|
1474 |
*/
|
|
|
1475 |
/**
|
|
|
1476 |
*
|
|
|
1477 |
* @return {?}
|
|
|
1478 |
*/
|
|
|
1479 |
MapComponent.prototype.clearDrawnItemsLayer = /**
|
|
|
1480 |
*
|
|
|
1481 |
* @return {?}
|
|
|
1482 |
*/
|
|
|
1483 |
function () {
|
|
|
1484 |
this.drawnItems.clearLayers();
|
|
|
1485 |
};
|
|
|
1486 |
/**
|
|
|
1487 |
*
|
|
|
1488 |
*/
|
|
|
1489 |
/**
|
|
|
1490 |
*
|
|
|
1491 |
* @return {?}
|
|
|
1492 |
*/
|
|
|
1493 |
MapComponent.prototype.resetLocation = /**
|
|
|
1494 |
*
|
|
|
1495 |
* @return {?}
|
|
|
1496 |
*/
|
|
|
1497 |
function () {
|
|
|
1498 |
this.location = null;
|
|
|
1499 |
};
|
|
|
1500 |
/**
|
|
|
1501 |
* Bind data from elevation and OSM http results to this._location
|
|
|
1502 |
* Perform some verifications to ensure data integrity
|
|
|
1503 |
* @param data data[0] = elevation, data[1] = osm data | data = osm data
|
|
|
1504 |
*/
|
|
|
1505 |
/**
|
|
|
1506 |
* Bind data from elevation and OSM http results to this._location
|
|
|
1507 |
* Perform some verifications to ensure data integrity
|
|
|
1508 |
* @param {?} data data[0] = elevation, data[1] = osm data | data = osm data
|
|
|
1509 |
* @return {?}
|
|
|
1510 |
*/
|
|
|
1511 |
MapComponent.prototype.bindLocationOutput = /**
|
|
|
1512 |
* Bind data from elevation and OSM http results to this._location
|
|
|
1513 |
* Perform some verifications to ensure data integrity
|
|
|
1514 |
* @param {?} data data[0] = elevation, data[1] = osm data | data = osm data
|
|
|
1515 |
* @return {?}
|
|
|
1516 |
*/
|
|
|
1517 |
function (data) {
|
|
|
1518 |
/** @type {?} */
|
|
|
1519 |
var elevation;
|
|
|
1520 |
/** @type {?} */
|
|
|
1521 |
var osmPlace;
|
|
|
1522 |
if (Array.isArray(data)) {
|
|
|
1523 |
elevation = data[0];
|
|
|
1524 |
osmPlace = data[1];
|
|
|
1525 |
}
|
|
|
1526 |
else {
|
|
|
1527 |
elevation = this.elevationFormGroup.controls["elevationInput"].value;
|
|
|
1528 |
osmPlace = data;
|
|
|
1529 |
}
|
|
|
1530 |
this._location.geometry = this.drawnItems.toGeoJSON();
|
|
|
1531 |
// geodatum
|
|
|
1532 |
this._location.elevation = elevation;
|
|
|
1533 |
this._location.localityConsistency = this._location.localityConsistency ? true : null; // perform : Cohérence entre les coordonnées et la localité
|
|
|
1534 |
this._location.locationAccuracy = this._location.locationAccuracy ? 0 : null; // perform : Précision (ou incertitude) de la localisation, en mètres --> voir le nombre de décimales pour decLatInput ou decLngInput si point, sinon, demi-longeur de la bounding-box
|
|
|
1535 |
// published_location : Précision géographique à laquelle est publiée l'obs, permet de gérer le floutage - Précise, Localité, Maille 10x10km
|
|
|
1536 |
this._location.osmCountry = osmPlace.address.country;
|
|
|
1537 |
this._location.osmCountryCode = osmPlace.address.country_code;
|
|
|
1538 |
this._location.osmCounty = osmPlace.address.county;
|
|
|
1539 |
this._location.osmPostcode = osmPlace.address.postcode;
|
|
|
1540 |
if (osmPlace.address.city) {
|
|
|
1541 |
this._location.locality = osmPlace.address.city;
|
|
|
1542 |
}
|
|
|
1543 |
if (osmPlace.address.town) {
|
|
|
1544 |
this._location.locality = osmPlace.address.town;
|
|
|
1545 |
}
|
|
|
1546 |
if (osmPlace.address.village) {
|
|
|
1547 |
this._location.locality = osmPlace.address.village;
|
|
|
1548 |
}
|
|
|
1549 |
this._location.sublocality = osmPlace.hamlet;
|
|
|
1550 |
this._location.osmRoad = osmPlace.address.road;
|
|
|
1551 |
this._location.osmState = osmPlace.address.state;
|
|
|
1552 |
this._location.osmSuburb = osmPlace.address.suburb;
|
|
|
1553 |
this._location.osmId = osmPlace.osm_id;
|
|
|
1554 |
this._location.osmNeighbourhood = null; // not provided by nominatim
|
|
|
1555 |
this._location.osmPlaceId = osmPlace.place_id;
|
|
|
1556 |
this._location.publishedLocation = null; // perform
|
|
|
1557 |
this._location.station = null; // perform
|
|
|
1558 |
// Verifications
|
|
|
1559 |
// @todo
|
|
|
1560 |
// Emit
|
|
|
1561 |
this.location.next(this._location);
|
|
|
1562 |
};
|
|
|
1563 |
/**
|
|
|
1564 |
* Change the form coordinates format : 'decimal' or 'dms'
|
|
|
1565 |
*/
|
|
|
1566 |
/**
|
|
|
1567 |
* Change the form coordinates format : 'decimal' or 'dms'
|
|
|
1568 |
* @param {?} format
|
|
|
1569 |
* @return {?}
|
|
|
1570 |
*/
|
|
|
1571 |
MapComponent.prototype.setLatLngInputFormat = /**
|
|
|
1572 |
* Change the form coordinates format : 'decimal' or 'dms'
|
|
|
1573 |
* @param {?} format
|
|
|
1574 |
* @return {?}
|
|
|
1575 |
*/
|
|
|
1576 |
function (format) {
|
|
|
1577 |
if (format !== 'decimal' && format !== 'dms') {
|
|
|
1578 |
return;
|
|
|
1579 |
}
|
|
|
1580 |
this.coordFormat = format;
|
|
|
1581 |
};
|
|
|
1582 |
/**
|
|
|
1583 |
* Set inputs values, add a marker and call API for a geolocated photo
|
|
|
1584 |
*/
|
|
|
1585 |
/**
|
|
|
1586 |
* Set inputs values, add a marker and call API for a geolocated photo
|
|
|
1587 |
* @param {?} latDec
|
|
|
1588 |
* @param {?} lngDec
|
|
|
1589 |
* @param {?} elevation
|
|
|
1590 |
* @return {?}
|
|
|
1591 |
*/
|
|
|
1592 |
MapComponent.prototype.gpsMarkerSetValues = /**
|
|
|
1593 |
* Set inputs values, add a marker and call API for a geolocated photo
|
|
|
1594 |
* @param {?} latDec
|
|
|
1595 |
* @param {?} lngDec
|
|
|
1596 |
* @param {?} elevation
|
|
|
1597 |
* @return {?}
|
|
|
1598 |
*/
|
|
|
1599 |
function (latDec, lngDec, elevation) {
|
|
|
1600 |
// set inputs values
|
|
|
1601 |
this.latlngFormGroup.controls["latInput"].setValue(latDec);
|
|
|
1602 |
this.latlngFormGroup.controls["lngInput"].setValue(lngDec);
|
|
|
1603 |
this.elevationFormGroup.controls["elevationInput"].setValue(elevation);
|
|
|
1604 |
// add marker
|
|
|
1605 |
this.addMarkerFromLatLngCoord();
|
|
|
1606 |
// call APIs
|
|
|
1607 |
this.callGeolocElevationApisUsingLatLngInputsValues(true, false);
|
|
|
1608 |
// clear geolocated photos layer
|
|
|
1609 |
this.geolocatedPhotoLatLngLayer.clearLayers();
|
|
|
1610 |
};
|
|
|
1611 |
/**
|
|
|
1612 |
* @param {?} value
|
|
|
1613 |
* @return {?}
|
|
|
1614 |
*/
|
|
|
1615 |
MapComponent.prototype.latLngDmsAutoFormatter = /**
|
|
|
1616 |
* @param {?} value
|
|
|
1617 |
* @return {?}
|
|
|
1618 |
*/
|
|
|
1619 |
function (value) {
|
|
|
1620 |
return '';
|
|
|
1621 |
};
|
|
|
1622 |
MapComponent.decorators = [
|
|
|
1623 |
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
|
|
|
1624 |
selector: 'tb-geoloc-map',
|
|
|
1625 |
template: "<h1>O\u00F9 ?</h1>\n \n<div id=\"geoloc-map\">\n <div id=\"geoloc-map-meta\">\n <!-- geosearch autocomplete -->\n <mat-form-field style=\"width: 100%;\">\n <input matInput [formControl]=\"geoSearchFormGroup.controls.placeInput\" placeholder=\"Trouver un lieu\" aria-label=\"Trouver un lieu\" [matAutocomplete]=\"auto\">\n <mat-spinner *ngIf=\"isLoadingAddress\" diameter=\"20\" matSuffix></mat-spinner>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"addressSelectedChanged($event)\">\n <mat-option *ngFor=\"let address of geoSearchResults\" [value]=\"address\">\n <span>{{ address | osmPlaceReadableAddress }}</span>\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n \n <div class=\"geolocationInputs\">\n <div [formGroup]=\"latlngFormGroup\">\n <div class=\"latLngMenuInputs\">\n <!-- latitude / longitude decimal format -->\n <div *ngIf=\"coordFormat=='decimal'\">\n <!-- latitude / longitude format selection --> \n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n\n <mat-form-field>\n <input matInput formControlName=\"latInput\" placeholder=\"latitude\">\n <mat-spinner *ngIf=\"isLoadingLatitude\" diameter=\"20\" matSuffix></mat-spinner>\n <mat-error *ngIf=\"latlngFormGroup.controls.latInput.dirty && latlngFormGroup.controls.latInput.hasError('malformedLatLngDecFormat')\">Format non valide</mat-error>\n </mat-form-field>\n <mat-form-field>\n <input matInput formControlName=\"lngInput\" placeholder=\"longitude\">\n <mat-spinner *ngIf=\"isLoadingLongitude\" diameter=\"20\" matSuffix></mat-spinner>\n <mat-error *ngIf=\"latlngFormGroup.controls.latInput.dirty && latlngFormGroup.controls.latInput.hasError('malformedLatLngDecFormat')\">Format non valide</mat-error>\n </mat-form-field>\n \n <button mat-icon-button (click)=\"addMarkerFromLatLngCoord(); callGeolocElevationApisUsingLatLngInputsValues();\" [disabled]=\"!latlngFormGroup.controls.latInput.valid || !latlngFormGroup.controls.lngInput.valid\" color=\"primary\">\n <mat-icon matTooltip=\"Utiliser ces coordonn\u00E9es\">where_to_vote</mat-icon>\n </button>\n </div>\n </div>\n\n <!-- menu format decimal / dms-->\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"setLatLngInputFormat('dms')\">Degr\u00E9s minutes secondes</button>\n <button mat-menu-item (click)=\"setLatLngInputFormat('decimal')\">D\u00E9cimal</button>\n </mat-menu>\n\n <!-- latitude / longitude DMS format -->\n <div *ngIf=\"coordFormat=='dms'\">\n <!-- latitude / longitude format selection --> \n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n\n <mat-form-field>\n <input matInput formControlName=\"dmsLatInput\" placeholder=\"(deg)\u00B0 (min)' (sec)"\">\n <span matPrefix>N </span>\n <mat-spinner *ngIf=\"isLoadingLatitude\" diameter=\"20\" matSuffix></mat-spinner>\n <mat-error *ngIf=\"latlngFormGroup.controls.dmsLatInput.dirty && latlngFormGroup.controls.dmsLatInput.hasError('malformedLatLngDmsFormat')\">Format non valide</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input matInput formControlName=\"dmsLngInput\" placeholder=\"(deg)\u00B0 (min)' (sec)"\">\n <span matPrefix>E </span>\n <mat-spinner *ngIf=\"isLoadingLongitude\" diameter=\"20\" matSuffix></mat-spinner>\n <mat-error *ngIf=\"latlngFormGroup.controls.dmsLatInput.dirty && latlngFormGroup.controls.dmsLatInput.hasError('malformedLatLngDmsFormat')\">Format non valide</mat-error>\n </mat-form-field>\n\n <button mat-icon-button (click)=\"addMarkerFromDmsCoord(); callGeolocElevationApisUsingLatLngInputsValues();\" [disabled]=\"!latlngFormGroup.controls.dmsLatInput.valid || !latlngFormGroup.controls.dmsLngInput.valid\" color=\"primary\">\n <mat-icon matTooltip=\"Utiliser ces coordonn\u00E9es\">where_to_vote</mat-icon>\n </button>\n </div>\n </div>\n \n <!-- elevation -->\n <div [formGroup]=\"elevationFormGroup\">\n <mat-form-field style=\"width: 100px;\">\n <input matInput formControlName=\"elevationInput\" placeholder=\"altitude\">\n <mat-spinner *ngIf=\"isLoadingElevation\" diameter=\"20\" matSuffix></mat-spinner>\n <span *ngIf=\"!isLoadingElevation\" matSuffix>m</span>\n </mat-form-field>\n </div>\n </div>\n </div>\n\n <div id=\"geoloc-map-draw\" style=\"height: 400px;\"\n leaflet \n [leafletOptions]=\"options\"\n (leafletMapReady)=\"onMapReady($event)\">\n </div>\n</div>",
|
|
|
1626 |
styles: ["[hidden]{display:none!important}#geoloc-map{display:flex;flex-direction:column;min-height:200px}#geoloc-map #geoloc-map-meta{flex:1;padding:15px}#geoloc-map #geoloc-map-meta .geolocationInputs{display:flex;flex-direction:row;justify-content:space-between}#geoloc-map #geoloc-map-draw{position:relative;flex:3}#geoloc-map #httpTasksRunningSpinner{flex:1}button .mini{min-width:0;line-height:30px}.geolocatedPhotoMetadataTable{width:100%}"]
|
|
|
1627 |
},] },
|
|
|
1628 |
];
|
|
|
1629 |
/** @nocollapse */
|
|
|
1630 |
MapComponent.ctorParameters = function () { return [
|
|
|
1631 |
{ type: _angular_forms__WEBPACK_IMPORTED_MODULE_6__["FormBuilder"] },
|
|
|
1632 |
{ type: GeocodingService },
|
|
|
1633 |
{ type: ElevationService }
|
|
|
1634 |
]; };
|
|
|
1635 |
MapComponent.propDecorators = {
|
|
|
1636 |
layersToAdd: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
|
|
|
1637 |
geolocatedPhotoLatLng: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
|
|
|
1638 |
osmClassFilter: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }],
|
|
|
1639 |
location: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] }]
|
|
|
1640 |
};
|
|
|
1641 |
return MapComponent;
|
|
|
1642 |
}());
|
|
|
1643 |
|
|
|
1644 |
/**
|
|
|
1645 |
* @fileoverview added by tsickle
|
|
|
1646 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
1647 |
*/
|
|
|
1648 |
/**
|
|
|
1649 |
* To show an address to the user, we could use the display_name attribute returned by nominatim
|
|
|
1650 |
* This attribute is far complicated to read (road, neighbourhood, suburb, town, city, postcode, county, country, etc.)
|
|
|
1651 |
* This pipe use the getReadbleAddress() function of geocode service to show minimal information about the address returned by nominatim API
|
|
|
1652 |
*/
|
|
|
1653 |
var OsmPlaceReadableAddressPipe = /** @class */ (function () {
|
|
|
1654 |
function OsmPlaceReadableAddressPipe(geocodeService) {
|
|
|
1655 |
this.geocodeService = geocodeService;
|
|
|
1656 |
}
|
|
|
1657 |
/**
|
|
|
1658 |
* @param {?} value
|
|
|
1659 |
* @param {?=} args
|
|
|
1660 |
* @return {?}
|
|
|
1661 |
*/
|
|
|
1662 |
OsmPlaceReadableAddressPipe.prototype.transform = /**
|
|
|
1663 |
* @param {?} value
|
|
|
1664 |
* @param {?=} args
|
|
|
1665 |
* @return {?}
|
|
|
1666 |
*/
|
|
|
1667 |
function (value, args) {
|
|
|
1668 |
return this.geocodeService.getReadbleAddress(value);
|
|
|
1669 |
};
|
|
|
1670 |
OsmPlaceReadableAddressPipe.decorators = [
|
|
|
1671 |
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{
|
|
|
1672 |
name: 'osmPlaceReadableAddress'
|
|
|
1673 |
},] },
|
|
|
1674 |
];
|
|
|
1675 |
/** @nocollapse */
|
|
|
1676 |
OsmPlaceReadableAddressPipe.ctorParameters = function () { return [
|
|
|
1677 |
{ type: GeocodingService }
|
|
|
1678 |
]; };
|
|
|
1679 |
return OsmPlaceReadableAddressPipe;
|
|
|
1680 |
}());
|
|
|
1681 |
|
|
|
1682 |
/**
|
|
|
1683 |
* @fileoverview added by tsickle
|
|
|
1684 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
1685 |
*/
|
|
|
1686 |
var TbGeolocLibModule = /** @class */ (function () {
|
|
|
1687 |
function TbGeolocLibModule() {
|
|
|
1688 |
}
|
|
|
1689 |
TbGeolocLibModule.decorators = [
|
|
|
1690 |
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{
|
|
|
1691 |
imports: [
|
|
|
1692 |
_angular_common__WEBPACK_IMPORTED_MODULE_8__["CommonModule"],
|
|
|
1693 |
_angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__["BrowserAnimationsModule"],
|
|
|
1694 |
_angular_platform_browser__WEBPACK_IMPORTED_MODULE_10__["BrowserModule"],
|
|
|
1695 |
_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClientModule"],
|
|
|
1696 |
_angular_material__WEBPACK_IMPORTED_MODULE_11__["MatSelectModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatInputModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatAutocompleteModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatProgressSpinnerModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatTooltipModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatChipsModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatIconModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatButtonModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatRadioModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatProgressBarModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatMenuModule"], _angular_material__WEBPACK_IMPORTED_MODULE_11__["MatTableModule"],
|
|
|
1697 |
_asymmetrik_ngx_leaflet__WEBPACK_IMPORTED_MODULE_12__["LeafletModule"].forRoot(), _asymmetrik_ngx_leaflet_draw__WEBPACK_IMPORTED_MODULE_13__["LeafletDrawModule"].forRoot(),
|
|
|
1698 |
_angular_forms__WEBPACK_IMPORTED_MODULE_6__["FormsModule"],
|
|
|
1699 |
_angular_forms__WEBPACK_IMPORTED_MODULE_6__["ReactiveFormsModule"]
|
|
|
1700 |
],
|
|
|
1701 |
declarations: [TbGeolocLibComponent, MapComponent, OsmPlaceReadableAddressPipe],
|
|
|
1702 |
exports: [TbGeolocLibComponent, MapComponent]
|
|
|
1703 |
},] },
|
|
|
1704 |
];
|
|
|
1705 |
return TbGeolocLibModule;
|
|
|
1706 |
}());
|
|
|
1707 |
|
|
|
1708 |
/**
|
|
|
1709 |
* @fileoverview added by tsickle
|
|
|
1710 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
1711 |
*/
|
|
|
1712 |
|
|
|
1713 |
/**
|
|
|
1714 |
* @fileoverview added by tsickle
|
|
|
1715 |
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
|
1716 |
*/
|
|
|
1717 |
|
|
|
1718 |
|
|
|
1719 |
|
|
|
1720 |
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGItZ2VvbG9jLWxpYi5qcy5tYXAiLCJzb3VyY2VzIjpbIm5nOi8vdGItZ2VvbG9jLWxpYi9saWIvdGItZ2VvbG9jLWxpYi5jb21wb25lbnQudHMiLCJuZzovL3RiLWdlb2xvYy1saWIvbGliL19oZWxwZXJzL2dlb0NvbnZlcnQudHMiLCJuZzovL3RiLWdlb2xvYy1saWIvbGliL19oZWxwZXJzL2xlYWZsZXRPYmplY3RzLnRzIiwibmc6Ly90Yi1nZW9sb2MtbGliL2xpYi9faGVscGVycy9kbXNUb29scy50cyIsIm5nOi8vdGItZ2VvbG9jLWxpYi9saWIvX3NlcnZpY2VzL2dlb2NvZGluZy5zZXJ2aWNlLnRzIiwibmc6Ly90Yi1nZW9sb2MtbGliL2xpYi9fc2VydmljZXMvZWxldmF0aW9uLnNlcnZpY2UudHMiLCJuZzovL3RiLWdlb2xvYy1saWIvbGliL21hcC9tYXAuY29tcG9uZW50LnRzIiwibmc6Ly90Yi1nZW9sb2MtbGliL2xpYi9fcGlwZXMvb3NtLXBsYWNlLXJlYWRhYmxlLWFkZHJlc3MucGlwZS50cyIsIm5nOi8vdGItZ2VvbG9jLWxpYi9saWIvdGItZ2VvbG9jLWxpYi5tb2R1bGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBPbkluaXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQENvbXBvbmVudCh7XG4gIHNlbGVjdG9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GVBQWUsRUFBRSxjQUFjLEVBQUUsb0JBQW9CLEVBQUUsYUFBYSxFQUFFLGNBQWM7d0JBQ3ZOLGFBQWEsQ0FBQyxPQUFPLEVBQUUsRUFBRSxpQkFBaUIsQ0FBQyxPQUFPLEVBQUU7d0JBQ3BELFdBQVc7d0JBQ1gsbUJBQW1CO3FCQUFDO29CQUN0QixZQUFZLEVBQUUsQ0FBRSxvQkFBb0IsRUFBRSxZQUFZLEVBQUUsMkJBQTJCLENBQUU7b0JBQ2pGLE9BQU8sRUFBRSxDQUFFLG9CQUFvQixFQUFFLFlBQVksQ0FBRTtpQkFDaEQ7OzRCQTdCRDs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
|
|
1721 |
|
|
|
1722 |
/***/ }),
|
|
|
1723 |
|
|
|
1724 |
/***/ "./node_modules/@angular/compiler/src sync recursive":
|
|
|
1725 |
/*!*************************************************!*\
|
|
|
1726 |
!*** ./node_modules/@angular/compiler/src sync ***!
|
|
|
1727 |
\*************************************************/
|
|
|
1728 |
/*! no static exports found */
|
|
|
1729 |
/***/ (function(module, exports) {
|
|
|
1730 |
|
|
|
1731 |
function webpackEmptyContext(req) {
|
|
|
1732 |
var e = new Error('Cannot find module "' + req + '".');
|
|
|
1733 |
e.code = 'MODULE_NOT_FOUND';
|
|
|
1734 |
throw e;
|
|
|
1735 |
}
|
|
|
1736 |
webpackEmptyContext.keys = function() { return []; };
|
|
|
1737 |
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
|
1738 |
module.exports = webpackEmptyContext;
|
|
|
1739 |
webpackEmptyContext.id = "./node_modules/@angular/compiler/src sync recursive";
|
|
|
1740 |
|
|
|
1741 |
/***/ }),
|
|
|
1742 |
|
|
|
1743 |
/***/ "./src/$$_lazy_route_resource lazy recursive":
|
|
|
1744 |
/*!**********************************************************!*\
|
|
|
1745 |
!*** ./src/$$_lazy_route_resource lazy namespace object ***!
|
|
|
1746 |
\**********************************************************/
|
|
|
1747 |
/*! no static exports found */
|
|
|
1748 |
/***/ (function(module, exports) {
|
|
|
1749 |
|
|
|
1750 |
function webpackEmptyAsyncContext(req) {
|
|
|
1751 |
// Here Promise.resolve().then() is used instead of new Promise() to prevent
|
|
|
1752 |
// uncaught exception popping up in devtools
|
|
|
1753 |
return Promise.resolve().then(function() {
|
|
|
1754 |
var e = new Error('Cannot find module "' + req + '".');
|
|
|
1755 |
e.code = 'MODULE_NOT_FOUND';
|
|
|
1756 |
throw e;
|
|
|
1757 |
});
|
|
|
1758 |
}
|
|
|
1759 |
webpackEmptyAsyncContext.keys = function() { return []; };
|
|
|
1760 |
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
|
|
|
1761 |
module.exports = webpackEmptyAsyncContext;
|
|
|
1762 |
webpackEmptyAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive";
|
|
|
1763 |
|
|
|
1764 |
/***/ }),
|
|
|
1765 |
|
|
|
1766 |
/***/ "./src/app/app.component.css":
|
|
|
1767 |
/*!***********************************!*\
|
|
|
1768 |
!*** ./src/app/app.component.css ***!
|
|
|
1769 |
\***********************************/
|
|
|
1770 |
/*! no static exports found */
|
|
|
1771 |
/***/ (function(module, exports) {
|
|
|
1772 |
|
|
|
1773 |
module.exports = ""
|
|
|
1774 |
|
|
|
1775 |
/***/ }),
|
|
|
1776 |
|
|
|
1777 |
/***/ "./src/app/app.component.html":
|
|
|
1778 |
/*!************************************!*\
|
|
|
1779 |
!*** ./src/app/app.component.html ***!
|
|
|
1780 |
\************************************/
|
|
|
1781 |
/*! no static exports found */
|
|
|
1782 |
/***/ (function(module, exports) {
|
|
|
1783 |
|
|
|
1784 |
module.exports = "<tb-geoloc-map\n [geolocatedPhotoLatLng]=testLatLngData\n [osmClassFilter]=osmClassFilter\n (location)=locationChange($event)>\n</tb-geoloc-map>\n\n\n<div (click)=\"emitLatLngData()\">Simuler l'import de photos géolocalisées</div>"
|
|
|
1785 |
|
|
|
1786 |
/***/ }),
|
|
|
1787 |
|
|
|
1788 |
/***/ "./src/app/app.component.ts":
|
|
|
1789 |
/*!**********************************!*\
|
|
|
1790 |
!*** ./src/app/app.component.ts ***!
|
|
|
1791 |
\**********************************/
|
|
|
1792 |
/*! exports provided: AppComponent */
|
|
|
1793 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
1794 |
|
|
|
1795 |
"use strict";
|
|
|
1796 |
__webpack_require__.r(__webpack_exports__);
|
|
|
1797 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppComponent", function() { return AppComponent; });
|
|
|
1798 |
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
|
1799 |
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
|
1800 |
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
|
1801 |
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
|
1802 |
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;
|
|
|
1803 |
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
|
1804 |
};
|
|
|
1805 |
|
|
|
1806 |
var AppComponent = /** @class */ (function () {
|
|
|
1807 |
function AppComponent() {
|
|
|
1808 |
this.testLatLngData = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
|
|
|
1809 |
this.osmClassFilter = ['highway:*'];
|
|
|
1810 |
}
|
|
|
1811 |
AppComponent.prototype.locationChange = function (data) {
|
|
|
1812 |
console.log(data);
|
|
|
1813 |
};
|
|
|
1814 |
AppComponent.prototype.emitLatLngData = function () {
|
|
|
1815 |
var data = [
|
|
|
1816 |
{
|
|
|
1817 |
lat: { deg: 44, min: 27, sec: 8.976 },
|
|
|
1818 |
lng: { deg: 1, min: 9, sec: 24.84 },
|
|
|
1819 |
altitude: 187.6,
|
|
|
1820 |
photoName: 'PA050156.JPG'
|
|
|
1821 |
},
|
|
|
1822 |
{
|
|
|
1823 |
lat: { deg: 46, min: 27, sec: 5.432 },
|
|
|
1824 |
lng: { deg: 3, min: 12, sec: 24.84 },
|
|
|
1825 |
altitude: 187.6,
|
|
|
1826 |
photoName: 'PA050234.JPG'
|
|
|
1827 |
},
|
|
|
1828 |
{
|
|
|
1829 |
lat: { deg: 48, min: 25, sec: 8.765 },
|
|
|
1830 |
lng: { deg: 6, min: 15, sec: 24.84 },
|
|
|
1831 |
altitude: 187.6,
|
|
|
1832 |
photoName: 'PA050789.JPG'
|
|
|
1833 |
}
|
|
|
1834 |
];
|
|
|
1835 |
console.log('app emit gps data...');
|
|
|
1836 |
this.testLatLngData.next(data);
|
|
|
1837 |
};
|
|
|
1838 |
AppComponent = __decorate([
|
|
|
1839 |
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
|
1840 |
selector: 'app-root',
|
|
|
1841 |
template: __webpack_require__(/*! ./app.component.html */ "./src/app/app.component.html"),
|
|
|
1842 |
styles: [__webpack_require__(/*! ./app.component.css */ "./src/app/app.component.css")]
|
|
|
1843 |
})
|
|
|
1844 |
], AppComponent);
|
|
|
1845 |
return AppComponent;
|
|
|
1846 |
}());
|
|
|
1847 |
|
|
|
1848 |
|
|
|
1849 |
|
|
|
1850 |
/***/ }),
|
|
|
1851 |
|
|
|
1852 |
/***/ "./src/app/app.module.ts":
|
|
|
1853 |
/*!*******************************!*\
|
|
|
1854 |
!*** ./src/app/app.module.ts ***!
|
|
|
1855 |
\*******************************/
|
|
|
1856 |
/*! exports provided: AppModule */
|
|
|
1857 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
1858 |
|
|
|
1859 |
"use strict";
|
|
|
1860 |
__webpack_require__.r(__webpack_exports__);
|
|
|
1861 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; });
|
|
|
1862 |
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
|
|
|
1863 |
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
|
1864 |
/* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts");
|
|
|
1865 |
/* harmony import */ var tb_geoloc_lib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tb-geoloc-lib */ "./dist/tb-geoloc-lib/fesm5/tb-geoloc-lib.js");
|
|
|
1866 |
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
|
1867 |
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
|
1868 |
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
|
1869 |
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;
|
|
|
1870 |
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
|
1871 |
};
|
|
|
1872 |
|
|
|
1873 |
|
|
|
1874 |
|
|
|
1875 |
|
|
|
1876 |
var AppModule = /** @class */ (function () {
|
|
|
1877 |
function AppModule() {
|
|
|
1878 |
}
|
|
|
1879 |
AppModule = __decorate([
|
|
|
1880 |
Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
|
|
|
1881 |
declarations: [
|
|
|
1882 |
_app_component__WEBPACK_IMPORTED_MODULE_2__["AppComponent"]
|
|
|
1883 |
],
|
|
|
1884 |
imports: [
|
|
|
1885 |
_angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserModule"],
|
|
|
1886 |
tb_geoloc_lib__WEBPACK_IMPORTED_MODULE_3__["TbGeolocLibModule"]
|
|
|
1887 |
],
|
|
|
1888 |
providers: [],
|
|
|
1889 |
bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_2__["AppComponent"]]
|
|
|
1890 |
})
|
|
|
1891 |
], AppModule);
|
|
|
1892 |
return AppModule;
|
|
|
1893 |
}());
|
|
|
1894 |
|
|
|
1895 |
|
|
|
1896 |
|
|
|
1897 |
/***/ }),
|
|
|
1898 |
|
|
|
1899 |
/***/ "./src/environments/environment.ts":
|
|
|
1900 |
/*!*****************************************!*\
|
|
|
1901 |
!*** ./src/environments/environment.ts ***!
|
|
|
1902 |
\*****************************************/
|
|
|
1903 |
/*! exports provided: environment */
|
|
|
1904 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
1905 |
|
|
|
1906 |
"use strict";
|
|
|
1907 |
__webpack_require__.r(__webpack_exports__);
|
|
|
1908 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; });
|
|
|
1909 |
// This file can be replaced during build by using the `fileReplacements` array.
|
|
|
1910 |
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
|
|
|
1911 |
// The list of file replacements can be found in `angular.json`.
|
|
|
1912 |
var environment = {
|
|
|
1913 |
production: false
|
|
|
1914 |
};
|
|
|
1915 |
/*
|
|
|
1916 |
* In development mode, to ignore zone related error stack frames such as
|
|
|
1917 |
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
|
|
|
1918 |
* import the following file, but please comment it out in production mode
|
|
|
1919 |
* because it will have performance impact when throw error
|
|
|
1920 |
*/
|
|
|
1921 |
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
|
|
1922 |
|
|
|
1923 |
|
|
|
1924 |
/***/ }),
|
|
|
1925 |
|
|
|
1926 |
/***/ "./src/main.ts":
|
|
|
1927 |
/*!*********************!*\
|
|
|
1928 |
!*** ./src/main.ts ***!
|
|
|
1929 |
\*********************/
|
|
|
1930 |
/*! no exports provided */
|
|
|
1931 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
1932 |
|
|
|
1933 |
"use strict";
|
|
|
1934 |
__webpack_require__.r(__webpack_exports__);
|
|
|
1935 |
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
|
1936 |
/* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js");
|
|
|
1937 |
/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts");
|
|
|
1938 |
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts");
|
|
|
1939 |
|
|
|
1940 |
|
|
|
1941 |
|
|
|
1942 |
|
|
|
1943 |
if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) {
|
|
|
1944 |
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])();
|
|
|
1945 |
}
|
|
|
1946 |
Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"])
|
|
|
1947 |
.catch(function (err) { return console.log(err); });
|
|
|
1948 |
|
|
|
1949 |
|
|
|
1950 |
/***/ }),
|
|
|
1951 |
|
|
|
1952 |
/***/ 0:
|
|
|
1953 |
/*!***************************!*\
|
|
|
1954 |
!*** multi ./src/main.ts ***!
|
|
|
1955 |
\***************************/
|
|
|
1956 |
/*! no static exports found */
|
|
|
1957 |
/***/ (function(module, exports, __webpack_require__) {
|
|
|
1958 |
|
|
|
1959 |
module.exports = __webpack_require__(/*! /home/stephane/dev/tb-geoloc-lib/src/main.ts */"./src/main.ts");
|
|
|
1960 |
|
|
|
1961 |
|
|
|
1962 |
/***/ })
|
|
|
1963 |
|
|
|
1964 |
},[[0,"runtime","vendor"]]]);
|
|
|
1965 |
//# sourceMappingURL=main.js.map
|