You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
I tried to add a line using LineLayer and I got different results on different devices! On my device, Galaxy A3-2017, this was fine and the line was drawn correctly but on many other devices such as: Nexus 5X, Asus Zenphone, Huawei honor, ... this was not working and no line where drawn. Here's my code:
List<Point> points = new ArrayList<>();
for (LatLng coord : getCoords()) {
points.add(com.mapbox.geojson.Point.fromLngLat(coord.getLongitude(), coord.getLatitude()));
}
LineString lineString = LineString.fromLngLats(points);
GeoJsonSource geoJsonSource = new GeoJsonSource("source", lineString);
mapboxMap.addSource(geoJsonSource);
LineLayer layer = new LineLayer("id", "source");
Float[] dashArray = new Float[1];
dashArray[0] = 1f;
layer.setProperties(
PropertyFactory.lineCap("round"),
PropertyFactory.lineJoin("round"),
PropertyFactory.lineWidth(7f),
PropertyFactory.lineColor("#09baba"),
PropertyFactory.lineOpacity(1f)
,PropertyFactory.lineDasharray(dashArray));
mapboxMap.addLayer(layer);
Expected behavior
A simple map with a line drawn on it:
Actual behavior
A simple map:
Configuration
Device models: Nexus 5X with android 8, Huawei honor with android 5, Asus Zenphone
Mapbox SDK version: 6.5.0
The weird thing is, this was OK in previous versions of Mapbox SDK such as 6.1.0.
The text was updated successfully, but these errors were encountered:
Potentially this is similar to the line flickering (considering timeline this issue surfaced). I hope this is fixed with #12982. @amir169 would you be able to test out v6.6.0-beta.1 and see if this fixed your issue?
I tried to add a line using LineLayer and I got different results on different devices! On my device, Galaxy A3-2017, this was fine and the line was drawn correctly but on many other devices such as: Nexus 5X, Asus Zenphone, Huawei honor, ... this was not working and no line where drawn. Here's my code:
Expected behavior
A simple map with a line drawn on it:
Actual behavior
A simple map:
Configuration
Device models: Nexus 5X with android 8, Huawei honor with android 5, Asus Zenphone
Mapbox SDK version: 6.5.0
The weird thing is, this was OK in previous versions of Mapbox SDK such as 6.1.0.
The text was updated successfully, but these errors were encountered: