@maplander/components 0.21.24 → 0.21.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/maplander-components.umd.js +82 -1
- package/bundles/maplander-components.umd.js.map +1 -1
- package/bundles/maplander-components.umd.min.js +1 -1
- package/bundles/maplander-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/filters/filters.component.js +2 -2
- package/esm2015/lib/services/markers/markers.service.js +67 -1
- package/esm5/lib/components/filters/filters.component.js +2 -2
- package/esm5/lib/services/markers/markers.service.js +83 -1
- package/fesm2015/maplander-components.js +67 -1
- package/fesm2015/maplander-components.js.map +1 -1
- package/fesm5/maplander-components.js +82 -1
- package/fesm5/maplander-components.js.map +1 -1
- package/lib/services/markers/markers.service.d.ts +11 -1
- package/maplander-components.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3331,9 +3331,9 @@ var FiltersComponent = /** @class */ (function () {
|
|
|
3331
3331
|
*/
|
|
3332
3332
|
function (open) {
|
|
3333
3333
|
if (open) {
|
|
3334
|
+
this.changeFilter.emit({ type: 'init', payload: { filter: null, value: null } });
|
|
3334
3335
|
this._render.setStyle(this._ref.nativeElement, 'visibility', 'visible');
|
|
3335
3336
|
this._render.setStyle(this._ref.nativeElement, 'opacity', '1');
|
|
3336
|
-
this.changeFilter.emit({ type: 'init', payload: null });
|
|
3337
3337
|
}
|
|
3338
3338
|
else {
|
|
3339
3339
|
this._render.setStyle(this._ref.nativeElement, 'opacity', '0');
|
|
@@ -7746,6 +7746,87 @@ var MarkersService = /** @class */ (function () {
|
|
|
7746
7746
|
response.markers = list;
|
|
7747
7747
|
return response;
|
|
7748
7748
|
};
|
|
7749
|
+
/**
|
|
7750
|
+
* @param {?} list
|
|
7751
|
+
* @return {?}
|
|
7752
|
+
*/
|
|
7753
|
+
MarkersService.prototype.buildNewSpider = /**
|
|
7754
|
+
* @param {?} list
|
|
7755
|
+
* @return {?}
|
|
7756
|
+
*/
|
|
7757
|
+
function (list) {
|
|
7758
|
+
var e_1, _a;
|
|
7759
|
+
/** @type {?} */
|
|
7760
|
+
var response = { markers: [], polyLines: [] };
|
|
7761
|
+
/** @type {?} */
|
|
7762
|
+
var newList = [];
|
|
7763
|
+
try {
|
|
7764
|
+
for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) {
|
|
7765
|
+
var listElement = list_1_1.value;
|
|
7766
|
+
newList.push({
|
|
7767
|
+
id: listElement.id,
|
|
7768
|
+
location: listElement.location,
|
|
7769
|
+
price: listElement.price,
|
|
7770
|
+
currency: listElement.currency,
|
|
7771
|
+
url: listElement.url,
|
|
7772
|
+
extras: {}
|
|
7773
|
+
});
|
|
7774
|
+
}
|
|
7775
|
+
}
|
|
7776
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
7777
|
+
finally {
|
|
7778
|
+
try {
|
|
7779
|
+
if (list_1_1 && !list_1_1.done && (_a = list_1.return)) _a.call(list_1);
|
|
7780
|
+
}
|
|
7781
|
+
finally { if (e_1) throw e_1.error; }
|
|
7782
|
+
}
|
|
7783
|
+
newList.map((/**
|
|
7784
|
+
* @param {?} el
|
|
7785
|
+
* @return {?}
|
|
7786
|
+
*/
|
|
7787
|
+
function (el) {
|
|
7788
|
+
el.extras['repeat'] = false;
|
|
7789
|
+
/** @type {?} */
|
|
7790
|
+
var size = list.filter((/**
|
|
7791
|
+
* @param {?} item
|
|
7792
|
+
* @return {?}
|
|
7793
|
+
*/
|
|
7794
|
+
function (item) {
|
|
7795
|
+
return el.location.latitude === item.location.latitude && el.location.longitude === item.location.longitude;
|
|
7796
|
+
}));
|
|
7797
|
+
/** @type {?} */
|
|
7798
|
+
var distance = 12 * size.length / 2.0;
|
|
7799
|
+
/** @type {?} */
|
|
7800
|
+
var radiansBetweenAnnotations = (Math.PI * 2) / size.length;
|
|
7801
|
+
if (!el.extras['repeat'] && size.length > 1) {
|
|
7802
|
+
/** @type {?} */
|
|
7803
|
+
var locationShare = Object.assign({}, el.location);
|
|
7804
|
+
for (var i = 0; i < size.length; i++) {
|
|
7805
|
+
/** @type {?} */
|
|
7806
|
+
var heading = radiansBetweenAnnotations * i;
|
|
7807
|
+
size[i]['repeat'] = true;
|
|
7808
|
+
/** @type {?} */
|
|
7809
|
+
var newLocation = MarkersService.calculateLocationFrom(locationShare, heading, distance);
|
|
7810
|
+
response.polyLines.push({
|
|
7811
|
+
path: [
|
|
7812
|
+
{
|
|
7813
|
+
latitude: Number(locationShare.latitude),
|
|
7814
|
+
longitude: Number(locationShare.longitude)
|
|
7815
|
+
},
|
|
7816
|
+
{
|
|
7817
|
+
latitude: Number(newLocation.latitude),
|
|
7818
|
+
longitude: Number(newLocation.longitude)
|
|
7819
|
+
}
|
|
7820
|
+
]
|
|
7821
|
+
});
|
|
7822
|
+
size[i].location = newLocation;
|
|
7823
|
+
}
|
|
7824
|
+
}
|
|
7825
|
+
return el;
|
|
7826
|
+
}));
|
|
7827
|
+
response.markers = list;
|
|
7828
|
+
return response;
|
|
7829
|
+
};
|
|
7749
7830
|
/**
|
|
7750
7831
|
* @private
|
|
7751
7832
|
* @param {?} entity
|