From fdc80d3b1eca6c95e95a07a21ddeb74de39cf81b Mon Sep 17 00:00:00 2001 From: christikaes Date: Sat, 3 Jun 2017 13:18:28 -0400 Subject: [PATCH] clean up unclustered points style --- .../components/map/mapgl/mapgl.component.ts | 9 +----- .../components/map/mapgl/style_parkabler.json | 31 ++----------------- 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/src/app/components/map/mapgl/mapgl.component.ts b/src/app/components/map/mapgl/mapgl.component.ts index 8cabaa5..f6f4bc8 100644 --- a/src/app/components/map/mapgl/mapgl.component.ts +++ b/src/app/components/map/mapgl/mapgl.component.ts @@ -110,14 +110,7 @@ export class MapGLComponent implements OnInit, OnChanges { this.zoomChange.emit(this.map.getZoom()); }); - this.map.on('click', 'unclustered-points-v2', function (e) { - new mapboxgl.Popup({offset: 25}) - .setLngLat(e.features[0].geometry.coordinates) - .setHTML(`Navigate`) - .addTo(this.map); - }.bind(this)); - - this.map.on('click', 'unclustered-points-v3', function (e) { + this.map.on('click', 'unclustered-points', function (e) { new mapboxgl.Popup({offset: 25}) .setLngLat(e.features[0].geometry.coordinates) .setHTML(`Navigate`) diff --git a/src/app/components/map/mapgl/style_parkabler.json b/src/app/components/map/mapgl/style_parkabler.json index 383d6e7..beff5f1 100644 --- a/src/app/components/map/mapgl/style_parkabler.json +++ b/src/app/components/map/mapgl/style_parkabler.json @@ -3984,32 +3984,7 @@ } }, { - "id": "unclustered-points-v2", - "type": "symbol", - "source": "spots", - "filter": ["!has", "point_count"], - "layout": { - "icon-image": "pin-v2", - "icon-size": 1, - "icon-offset": [0, -12], - "icon-allow-overlap": true, - "text-field": "{numspots}", - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Bold" - ], - "text-size": 20, - "text-offset": [-0.3, -0.6], - "text-anchor": "center", - "text-allow-overlap": true, - "visibility": "none" - }, - "paint": { - "text-color": "#ffffff" - } - }, - { - "id": "unclustered-points-v3", + "id": "unclustered-points", "type": "symbol", "source": "spots", "filter": ["!has", "point_count"], @@ -4024,13 +3999,13 @@ "Arial Unicode MS Bold" ], "text-size": 16, - "text-offset": [0.6, -1.7], + "text-offset": [0.6, -1.65], "text-anchor": "center", "text-allow-overlap": true, "visibility": "visible" }, "paint": { - "text-color": "#ffffff" + "text-color": "#3f51b5" } }, {