@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.
@@ -3343,9 +3343,9 @@
3343
3343
  */
3344
3344
  function (open) {
3345
3345
  if (open) {
3346
+ this.changeFilter.emit({ type: 'init', payload: { filter: null, value: null } });
3346
3347
  this._render.setStyle(this._ref.nativeElement, 'visibility', 'visible');
3347
3348
  this._render.setStyle(this._ref.nativeElement, 'opacity', '1');
3348
- this.changeFilter.emit({ type: 'init', payload: null });
3349
3349
  }
3350
3350
  else {
3351
3351
  this._render.setStyle(this._ref.nativeElement, 'opacity', '0');
@@ -7758,6 +7758,87 @@
7758
7758
  response.markers = list;
7759
7759
  return response;
7760
7760
  };
7761
+ /**
7762
+ * @param {?} list
7763
+ * @return {?}
7764
+ */
7765
+ MarkersService.prototype.buildNewSpider = /**
7766
+ * @param {?} list
7767
+ * @return {?}
7768
+ */
7769
+ function (list) {
7770
+ var e_1, _a;
7771
+ /** @type {?} */
7772
+ var response = { markers: [], polyLines: [] };
7773
+ /** @type {?} */
7774
+ var newList = [];
7775
+ try {
7776
+ for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) {
7777
+ var listElement = list_1_1.value;
7778
+ newList.push({
7779
+ id: listElement.id,
7780
+ location: listElement.location,
7781
+ price: listElement.price,
7782
+ currency: listElement.currency,
7783
+ url: listElement.url,
7784
+ extras: {}
7785
+ });
7786
+ }
7787
+ }
7788
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
7789
+ finally {
7790
+ try {
7791
+ if (list_1_1 && !list_1_1.done && (_a = list_1.return)) _a.call(list_1);
7792
+ }
7793
+ finally { if (e_1) throw e_1.error; }
7794
+ }
7795
+ newList.map((/**
7796
+ * @param {?} el
7797
+ * @return {?}
7798
+ */
7799
+ function (el) {
7800
+ el.extras['repeat'] = false;
7801
+ /** @type {?} */
7802
+ var size = list.filter((/**
7803
+ * @param {?} item
7804
+ * @return {?}
7805
+ */
7806
+ function (item) {
7807
+ return el.location.latitude === item.location.latitude && el.location.longitude === item.location.longitude;
7808
+ }));
7809
+ /** @type {?} */
7810
+ var distance = 12 * size.length / 2.0;
7811
+ /** @type {?} */
7812
+ var radiansBetweenAnnotations = (Math.PI * 2) / size.length;
7813
+ if (!el.extras['repeat'] && size.length > 1) {
7814
+ /** @type {?} */
7815
+ var locationShare = Object.assign({}, el.location);
7816
+ for (var i = 0; i < size.length; i++) {
7817
+ /** @type {?} */
7818
+ var heading = radiansBetweenAnnotations * i;
7819
+ size[i]['repeat'] = true;
7820
+ /** @type {?} */
7821
+ var newLocation = MarkersService.calculateLocationFrom(locationShare, heading, distance);
7822
+ response.polyLines.push({
7823
+ path: [
7824
+ {
7825
+ latitude: Number(locationShare.latitude),
7826
+ longitude: Number(locationShare.longitude)
7827
+ },
7828
+ {
7829
+ latitude: Number(newLocation.latitude),
7830
+ longitude: Number(newLocation.longitude)
7831
+ }
7832
+ ]
7833
+ });
7834
+ size[i].location = newLocation;
7835
+ }
7836
+ }
7837
+ return el;
7838
+ }));
7839
+ response.markers = list;
7840
+ return response;
7841
+ };
7761
7842
  /**
7762
7843
  * @private
7763
7844
  * @param {?} entity