Skip to content

Commit

Permalink
Remove GeoJson sources onDestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
danesfeder committed Dec 6, 2018
1 parent e8efc00 commit eed90a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ void onDestroy() {
for (Layer arrowLayer : arrowLayers) {
mapboxMap.removeLayer(arrowLayer);
}
mapboxMap.removeSource(arrowHeadGeoJsonSource);
mapboxMap.removeSource(arrowShaftGeoJsonSource);
}

private List<Point> obtainArrowPointsFrom(RouteProgress routeProgress) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ void onDestroy() {
for (Layer routeLayer : routeLayers) {
mapboxMap.removeLayer(routeLayer);
}
mapboxMap.removeSource(routeLineSource);
mapboxMap.removeSource(wayPointSource);
}

private void drawRoutes(List<FeatureCollection> routeFeatureCollections) {
Expand Down

0 comments on commit eed90a3

Please sign in to comment.