Mapbox Static Image path overlay not shown

28 Views Asked by At

Without path overlay, this is my image with 2 custom marker without path overlay:

In my android application, in Navigation activity, routeObserve, here 's my code:

List<Point> list = PolylineUtils.decode(routeProgress.getRoute().geometry(), 6);
            List<Double> coordinates = new ArrayList<>();
            for (int i = 0; i < list.size(); i++) {
                coordinates.addAll(list.get(i).coordinates());
            }
            Log.e("p_des_org",routeProgress.getRoute().routeOptions().coordinates());
            Log.e("p_geometry",routeProgress.getRoute().geometry());
            Log.e("p_point", list.toString());
            Log.e("p_coordinates", coordinates.toString());
            Log.e("p_poly", PolylineUtils.encode(list, 6));

and this is the output :
p_des_org:      
105.8287217,21.0163447;105.8317352,21.0195122

p_geometry:        wqvag@ysgzhEaa@kScBy@uL_GySgKiLoGsKsGqF}BiNsHuCwAyBgAePoGwCkAkGsNOm@cBsFqGqR}AgBiA}Ca@gAYu@oDsJ}AyEaA}Eg@{EW}DE{E?O

p_point:                
[Point{type=Point, bbox=null, coordinates=[105.828685, 21.016364]}, Point{type=Point, bbox=null, coordinates=[105.829011, 21.016909]}, Point{type=Point, bbox=null, coordinates=[105.82904, 21.016959]}, Point{type=Point, bbox=null, coordinates=[105.829168, 21.017178]}, Point{type=Point, bbox=null, coordinates=[105.829364, 21.017511]}, Point{type=Point, bbox=null, coordinates=[105.8295, 21.017724]}, Point{type=Point, bbox=null, coordinates=[105.829638, 21.017926]}, Point{type=Point, bbox=null, coordinates=[105.829701, 21.018047]}, Point{type=Point, bbox=null, coordinates=[105.829855, 21.018292]}, Point{type=Point, bbox=null, coordinates=[105.829899, 21.018367]}, Point{type=Point, bbox=null, coordinates=[105.829935, 21.018428]}, Point{type=Point, bbox=null, coordinates=[105.830071, 21.018703]}, Point{type=Point, bbox=null, coordinates=[105.830109, 21.018779]}, Point{type=Point, bbox=null, coordinates=[105.830359, 21.018913]}, Point{type=Point, bbox=null, coordinates=[105.830382, 21.018921]}, Point{type=Point, bbox=null, coordinates=[105.830504, 21.018971]}, Point{type=Point, bbox=null, coordinates=[105.830817, 21.019108]}, Point{type=Point, bbox=null, coordinates=[105.830869, 21.019155]}, Point{type=Point, bbox=null, coordinates=[105.830948, 21.019192]}, Point{type=Point, bbox=null, coordinates=[105.830984, 21.019209]}, Point{type=Point, bbox=null, coordinates=[105.831011, 21.019222]}, Point{type=Point, bbox=null, coordinates=[105.831197, 21.01931]}, Point{type=Point, bbox=null, coordinates=[105.831306, 21.019357]}, Point{type=Point, bbox=null, coordinates=[105.831417, 21.01939]}, Point{type=Point, bbox=null, coordinates=[105.831527, 21.01941]}, Point{type=Point, bbox=null, coordinates=[105.831622, 21.019422]}, Point{type=Point, bbox=null, coordinates=[105.831732, 21.019425]}, Point{type=Point, bbox=null, coordinates=[105.83174, 21.019425]}]

p_coordinates:
[105.828685, 21.016364, 105.829011, 21.016909, 105.82904, 21.016959, 105.829168, 21.017178, 105.829364, 21.017511, 105.8295, 21.017724, 105.829638, 21.017926, 105.829701, 21.018047, 105.829855, 21.018292, 105.829899, 21.018367, 105.829935, 21.018428, 105.830071, 21.018703, 105.830109, 21.018779, 105.830359, 21.018913, 105.830382, 21.018921, 105.830504, 21.018971, 105.830817, 21.019108, 105.830869, 21.019155, 105.830948, 21.019192, 105.830984, 21.019209, 105.831011, 21.019222, 105.831197, 21.01931, 105.831306, 21.019357, 105.831417, 21.01939, 105.831527, 21.01941, 105.831622, 21.019422, 105.831732, 21.019425, 105.83174, 21.019425]
p_poly:  wqvag@ysgzhEaa@kScBy@uL_GySgKiLoGsKsGqF}BiNsHuCwAyBgAePoGwCkAkGsNOm@cBsFqGqR}AgBiA}Ca@gAYu@oDsJ}AyEaA}Eg@{EW}DE{E?O

When i use above encoded polyline, static image had no error, but not shown path overlay i try with differents path parameter but not helping

(path-{strokeWidth}+{strokeColor}-{strokeOpacity}+{fillColor}-{fillOpacity}({polyline})

with path overlay:

How can i get static image with an encoded polyline string from routeProgress.getRoute().geometry()?

0

There are 0 best solutions below