windows phone 7 - How to create a buffer and determine what is inside the buffer of a mapPolyLine? c# -


i'm trying create buffer around mappolyline determine if there's inside mappolyline. below code mappolyline:

    private void routeservice_calculateroutecompleted(object sender, calculateroutecompletedeventargs e)      {          // if route calculate success , contains route, draw route on map.             if ((e.result.responsesummary.statuscode == bingmaprouteservice.responsestatuscode.success) & (e.result.result.legs.count != 0))             {                 // set properties of route line want draw.                 system.windows.media.color routecolor = colors.blue;                 solidcolorbrush routebrush = new solidcolorbrush(routecolor);                 //mappolyline routeline = new mappolyline();                 app.routeline.locations = new locationcollection();                 app.routeline.stroke = routebrush;                 app.routeline.opacity = 0.65;                 app.routeline.strokethickness = 5.0;                   // retrieve route points define shape of route.                 foreach (location p in e.result.result.routepath.points)                 {                     app.routeline.locations.add(new geocoordinate(p.latitude, p.longitude));                  } 

how coordinates of buffer of mappolyline (using bing map api without arcgis extension)?

well, think of way: buffer in gis polygon. way it's going useful see if points inside or not able create shape (whether display or not) , run whatever point-in-a-polygon analysis available you. (i don't know if bing maps offers functionality). ideally, i'd go drawing arcs @ endpoints (using them arcs' centers), join them line segments following contours of polyline). need determine slope , intersection each polyline point this. or better put, intersections lines offset distance (whether in screen coordinates or mercator) polyline points. once that's done, may have suitable polygon, although point-in-polygon code i've worked not work arcs. you'd need approximate straightline segments.

i feel pain on 1 not want encumber app arcgis dlls, despite functionality. , realize barebones outline of needs done. set out do.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -