I am using Mapbox library and planning to upgrade to ngx-mapbox-gl to simplify the code
Here is the code for showing ripple at specified lat lng, it also needs mapGrahpicView to add MapCircleView ( i am thinking upgrading to ngxmapboxgl will avoid using this)
export const ripple = (color: Color, lngLat: mapboxgl.LngLat, mapView: MapGraphicView) => {
if (document.hidden) {
return;
}
const ripple = new MapCircleView()
.center(lngLat)
.radius(0)
.fill(null)
.stroke(color.alpha(1))
.strokeWidth(1);
// we need view on the map canvas!
mapView.appendChildView(ripple);
const radius = rippleRadius(8);
const tween = Transition.duration<any>(5000);
ripple.stroke(color.alpha(0), tween).radius(
radius,
tween.onEnd(function() {
ripple.remove();
})
);
};
I am using Mapbox library and planning to upgrade to ngx-mapbox-gl to simplify the code
Here is the code for showing ripple at specified lat lng, it also needs mapGrahpicView to add MapCircleView ( i am thinking upgrading to ngxmapboxgl will avoid using this)
Please advise