Skip to main content

Posts

Showing posts with the label WP7 WP7Contrib Bing Maps Polygon Development

Drawing shapes on top of Bing Maps in a WP7 app

Before I complete the ' How many pins can Bing Maps handle in a WP7 app... ' set of posts . I wanted to show how I'm drawing shapes on top of the Bing Maps control in WP7. This is based around using the MapPolygon class in the Microsoft.Phone.Controls.Maps namespace, more info on MSDN . Basically this will drawn lines betweens the geo-locations defined in the collection exposed by the Locations property. You're also able to define other properties such as fill colour, stroke thinkness, opacity. With these you have the ability to really customize any polygon you render over the map control. I'm going to show how I achieved the following screen shots and how this is all based around using the well known Haversine formula with only the centre location of the visible bounding rectangle of the Bing Maps control: A couple of things to note, UI design is not my forte (as @RichGee will tell you) so the following is more about how to achieve it th...