Skip to content

Commit

Permalink
limit routeline GeoJSON to maxzoom 16 to avoid creating more clipping…
Browse files Browse the repository at this point in the history
… mask for high zoom levels
  • Loading branch information
kkaefer committed Oct 17, 2017
1 parent d8615f7 commit 7407d2c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ private void addSource(@Nullable DirectionsRoute route) {
// Determine whether the source needs to be added or updated
GeoJsonSource source = mapboxMap.getSourceAs(NavigationMapSources.NAVIGATION_ROUTE_SOURCE);
if (source == null) {
GeoJsonSource routeSource = new GeoJsonSource(NavigationMapSources.NAVIGATION_ROUTE_SOURCE, routeLineFeature);
GeoJsonOptions routeGeoJsonOptions = new GeoJsonOptions().withMaxZoom(16);
GeoJsonSource routeSource = new GeoJsonSource(NavigationMapSources.NAVIGATION_ROUTE_SOURCE,
routeLineFeature, routeGeoJsonOptions);
mapboxMap.addSource(routeSource);
} else {
source.setGeoJson(routeLineFeature);
Expand Down

0 comments on commit 7407d2c

Please sign in to comment.