rubberbanding in bing maps + wpf
-
Monday, July 23, 2012 1:25 PMIs there any sample which I can use to select multiple push pins using rubberbanding (this is for bing maps+ wpf)
All Replies
-
Wednesday, July 25, 2012 8:37 AMOwner
By rubberbanding I am guessing you are either looking to create a polygon from a bunch of pushpins that is in the shape of a rubberband if it was streached around the pins. If this is the case then you want to look into creating Convex hulls.
Alternatively, if you want to be able to draw a polygon using a mouse and either drag points our allow the user to draw it themselves take a look at these resources:
http://www.go4answers.com/Example/problem-drawing-polylines-polygons-bing-33889.aspx
http://www.go4answers.com/Example/silverlight-map-control-polygon-draw-194773.aspx
Once you draw the polygon you can do a point in polygon search against your point data. This isn't built into the Bing Maps control, nor should it be. You can create this functionality by either making use of the SQL spatial libraries which can be added as a dll to the WPF project or by repurposing the code found here:
http://msdn.microsoft.com/en-us/library/cc451895.aspx
http://rbrundritt.wordpress.com
- Proposed As Answer by Richard_BrundrittMicrosoft Employee, Owner Wednesday, July 25, 2012 8:38 AM
- Marked As Answer by Richard_BrundrittMicrosoft Employee, Owner Thursday, August 02, 2012 8:25 AM

