dji-sdk / Mobile-UXSDK-Beta-Android

Mobile Android UXSDK Beta
MIT License
96 stars 55 forks source link

Unable add the djiPolyline #61

Open Lucestbon opened 2 years ago

Lucestbon commented 2 years ago

DJIPolyline djiPolyline = mapWidget.getMap().addPolyline(new DJIPolylineOptions().addAll(_waypointList) .color(0xF7BA0B) .width(100) .visible(true) .zIndex(1000)); djiPolyline.setColor(0xF7BA0B); djiPolyline.setWidth(100); djiPolyline.setPoints(_waypointList); djiPolyline.setZIndex(1000);

I worve the code ,but these statements did not respond, and no lines appeared on the map. Could you tell me what caused it?

kenargo commented 2 years ago

I can say with certainty that DJIPolyline works when sent correct parameter.

You mentioned that line doesn't appear but is the return value null? Is there an exception?

One thing to keep in mind, calls like this must not be placed until the OnMapReadyListener callback is called.