android - adding barriers in arcgis sdk is generating the same path -


i have program gives me route when point @ 2 red markersenter image description here

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.enter image description here

your nafeature spital reference must same ur mapview spital reference. try na.setspitalreference(mapview.getspitalreference)


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -