android - adding barriers in arcgis sdk is generating the same path -
i have program gives me route when point @ 2 red markers
i wanted make road not available can alternate path, added code create barrier on road polygon po=new polygon(); point p1=new point(4102363.9071817156,857772.619643); point p2=new point(4102416.5557467686,857799.2401230272); point p3=new point(4102436.1589281,857744.31787604); po.startpath(p1); po.lineto(p2); po.lineto(p3); graphic ba_gr=new graphic(po,null); nafeaturesasfeature na=new nafeaturesasfeature(); na.addfeature(ba_gr); params.setpolygonbarriers(na);
still getting same path, can tell me made mistake or if there way create barrier? parms routeparameters , polygon @ position.
your nafeature spital reference must same ur mapview spital reference. try na.setspitalreference(mapview.getspitalreference)
Comments
Post a Comment