Skip to content

Commit

Permalink
clean up unclustered points style
Browse files Browse the repository at this point in the history
  • Loading branch information
christikaes committed Jun 3, 2017
1 parent 1145b9d commit fdc80d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 36 deletions.
9 changes: 1 addition & 8 deletions src/app/components/map/mapgl/mapgl.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(`<a class="cta" href="http://maps.google.com/maps?daddr=${e.features[0].geometry.coordinates[1]},${e.features[0].geometry.coordinates[0]}" target="_blank">Navigate</a>`)
.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(`<a class="cta" href="http://maps.google.com/maps?daddr=${e.features[0].geometry.coordinates[1]},${e.features[0].geometry.coordinates[0]}" target="_blank">Navigate</a>`)
Expand Down
31 changes: 3 additions & 28 deletions src/app/components/map/mapgl/style_parkabler.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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"
}
},
{
Expand Down

0 comments on commit fdc80d3

Please sign in to comment.