WP7Contrib – Bing Maps REST Service Wrappers

Are you using or thinking about using Bing Maps REST Services in your application ? Finding issues with performance with the wsdl endpoints ? Would prefer to use a REST approach ?

Well, look no further, there is now a simple way for you to do all of the above…

For those folks out there that are building location based apps for WP7 or those that are thinking about one we are very excited to announce the first release of the Bing Maps Rest API wrapper classes that have recently been added to the WP7Contrib (WP7C). Unfortunately, it has taken some time to develop mainly due to the iceberg like API. When I first had the idea a simple prototype proved that it was possible along with some shout outs to those folks on Twitter to see who was taking advantage of the services it became obvious very quickly that this was a feature people were using or wanted to use. Based on some of the feedback it was apparent that people were building their own wrappers and hand cranking the client side requests, responses and classes to hold data. This is great but I wanted a more generic and reusable set of components that all WP7 developers  can take advantage of, like the majority of developers we want a simple non-intrusive mechanism for incorporating the different features that these services provide into your apps.

When I originally started out using the Bing services I hooked up to the wsdl endpoints but I have always been uncomfortable using this approach especially when we have the WP7C Resource Client at our disposable which provides a simple Rx mechanism for dealing with request response for talking to endpoints. I was also concerned with the bulky and heaviness of this approach, sure it works and works well on a Silverlight browser app or .Net apps. However, as obvious as it may sound we don’t have that sort of processing power on the device. So, a lighter more performant approach was required ensuring that we can take advantage of the location based services on the device and incorporate this with Bing services REST API.

First before we start to dig into the services I want to give a quick overview of each of them :-

  • Route Service – provides clients with the ability to calculate a route from a Geo Coordinate location to another. There are a number of different variants that are catered for here including; a Point of Interest; and also major travel routes.
  • Imagery Service – provides clients with the ability to request different types of imagery. There are a number of different variants that are catered for here including; centre point Geo Coordinate location, for a particular route; and for a particular area by providing North East and South West Geo Coordinates that specific the area the client is interested in.
  • Location Service – provides clients with the ability to search in your immediate/local area for shops, bars, facilities etc
  • Search Service – provides clients with the ability to search a particular area for a variety of different amenities that the client is interested in.

Each of these different scenarios have been built and illustrated in the Bing Maps project that can be found in the Spikes folder of the WP7C, now I am sure that there are more scenarios and if you have any these we would be very interested in hearing from you. What these samples show are the basics that you need in order to incorporate them into your apps. The other very important note is that for ease of building the samples I have used a Pivot control as this was the simplest way for me to test the service wrappers were working as expected but also for me to group them together, I am strongly against putting map controls into both Pivot or Panorama controls as the User Experience is simply wrong. However, there is an exception to the rule here and that if you are using a static map via the Imagery Service as this is essentially an image.

So, exciting news, and we are certain that this new Bing Maps REST API wrapper will help make developers lives less painful when building location based applications, we are therefore very excited to hear about any of the apps you eventually build using these. Also, if you have any suggestions or feedback on the implementation or additional features that you would find useful please contact me so that we can discuss.  Over the next couple of articles I will dig into each of the services in the spikes folder of WP7C and link off to Ollie who has some deep dive articles to help supplement the introductory blogs.


Be Sociable, Share!


One Response to “WP7Contrib – Bing Maps REST Service Wrappers”

  1. […] WP7Contrib – Bing Maps REST Service Wrappers (Rich Griffin) […]

Leave a Reply