I am working on upgrading an old android app that uses Mapbox from SDK 4 to SDK 6.1.3. I must change the color of the markers to match the bus route colors in the city. I can not find a code that works for this version of SDK.
Can any one help?
I am working on upgrading an old android app that uses Mapbox from SDK 4 to SDK 6.1.3. I must change the color of the markers to match the bus route colors in the city. I can not find a code that works for this version of SDK.
Can any one help?
Your map box init in onCreate
map = mapboxMap;
mapboxMap.addPolygon(generatePerimeter(new LatLng(trackLat, trackLong), 0.200, 64));
Your Method
private PolygonOptions generatePerimeter(LatLng centerCoordinates, double radiusInKilometers, int numberOfSides) {
List<LatLng> positions = new ArrayList<>();
return new PolygonOptions()
.addAll(positions)
.fillColor(Color.GREEN)
.strokeColor(Color.YELLOW)
.alpha(1f);
}