tangram-es
tangram-es copied to clipboard
Polygon Marker not rendering on Android platform
I am unable to draw polygon markers on android platform.
TO REPRODUCE THE ISSUE, FOLLOW THESE STEPS: For testing, add following code at the end of onMapReady
List<LngLat> points = new ArrayList<>();
points.add(new LngLat(-86.146462, 43.323819));
points.add(new LngLat(-59.808978, 57.079742));
points.add(new LngLat(-56.569699, 30.237251));
points.add(new LngLat( -100.305132, 33.068604));
HashMap<String, String> properties = new HashMap<>();
Marker shapePolygon = mapController.addMarker();
shapePolygon.setStylingFromString("{style: polygons, interactive: true, color: red, order: 5000}");
List<List<LngLat>> lnListList = new ArrayList<>();
lnListList.add(points);
Polygon polygonGeom = new Polygon(lnListList, properties);
shapePolygon.setPolygon(polygonGeom);
RESULT:
No Polygon Marker
EXPECTED RESULT:
Polygon Marker should be drawn
ENVIRONMENT:
- Tangram version: 0.12.0
- Platform: Android
OTHER:
However I can draw polygon on linux platform using following code:
Tangram::LngLat coords[4];
coords[0]= {-86.146462, 43.323819};
coords[1]= {-59.808978, 57.079742};
coords[2]= {-56.569699, 30.237251};
coords[3]= { -100.305132, 33.068604};
polygon_marker = map->markerAdd();
map->markerSetStylingFromString(polygon_marker,polygonStyle.c_str());
int counts[1] = {4};
map->markerSetPolygon(polygon_marker,coords,counts,1);
Hey thanks for the report. Can you include any logs from Tangram when this happens on Android? Also, what is the Android device and OS version that you're using?
I have checked it on 3 devices and 2 AVDs now.
- Samsung J7 SM700H with 6.0.1
- Samsung J5 SM500H with 6.0.1
- Oppo A71 with 7.1.1
- AVD Nexus 5x API-23
- AVD Pixel 2 API-27
@matteblair Any update on it?