Developing Mobile Applications with Virtual Earth Web Services

Richard Brundritt and Robert McGovern from Infusion Development just got their "Developing a Mobile Application Using Virtual Earth Web Services" technical article published on MSDN and it’s available for your reading and plagiarizing pleasure.

Excerpt: "The constraints of mobile device applications are very different than the traditional web or desktop applications. Unlike a desktop or web application, the screen real estate is very compact and the controls are limited in functionality. These constraints force you to rethink your user experience. Simply building a form with a bunch of buttons isn’t very useful on most mobile devices. In addition, the occasionally connected nature of the device is problematic for any application that relies on web connectivity. Because you can’t guarantee whether the device will have or maintain a connection, the standard practice is to minimize the amount of network traffic expected. Similarly, network connections to mobile devices (even 3G) are slower and more bandwidth constrained than normal broadband. This puts an even larger emphasis on reducing network traffic.

Given these constraints, the first question about architecture involves how the application will be deployed and used. If you are building a consumer application for individual users, you want the entire application contained on the mobile device. However, if you are building for an enterprise, you might consider a three tier application where you can control the security of your credentials and your bandwidth on a server, and minimize the footprint of the mobile application. If you take the three tier approach, you also have to consider what the middle tier will be. You can use some sort of service (for example, build a WCF layer that encapsulates Virtual Earth) or build a mobile enabled web application. The choice of architecture depends heavily on how you intend to use the application and the constraints of your target devices."

This is a great article for Windows Mobile developers to get cracking on some code with Virtual Earth Web Services. Also, Richard Brundritt is on the Virtual Earth Support Team handling many of the toughest problems from our customers and writes a great developer blog on Live Spaces which is definitely worth the read if you’re bored with me.

CP

Join the conversation

3 comments
  1. Anonymous

    Bing is  a  really  overlord!!    support Bing~~

  2. FastEddie_D

    This is a great article and really appreciate the code sample and step by step instructions.

    In regards to the architecture, I've got a general question regarding a three tiered solution.

    In the article, they say …

    "However, if you are building for an enterprise, you might consider a three tier application where you can control the security of your credentials and your bandwidth on a server, and minimize the footprint of the mobile application. If you take the three tier approach, you also have to consider what the middle tier will be. You can use some sort of service (for example, build a WCF layer that encapsulates Virtual Earth) or build a mobile enabled web application. The choice of architecture depends heavily on how you intend to use the application and the constraints of your target devices.”

    To that end, rather than create a Mobile Web app, I've attempted to create a Web Service in which my credentials are stored (which then references / calls the Virtual Earth services).  This service then returns the uri (based on size, format, location, specified) or perhaps a bitmap image with a formatted map (scaled / with pushpins etc…).  

    In essence, I'm attempting to create a single layer that could be used by either my desktop "Smart Client", Mobile Smart Client, or Windows Mobile Web application.

    My app has a series of "location points (lat/long)" stored in a dataset to which I'd like to use Geocoding to show on map or translate to an address assuming internet is reachable.

    Given that I hope to market this product, I'm confused if this is a suggested / legal use of the bings map service and whether I am overstepping my bounds.

    In my experiments so far, I get a blank image with a single pushpin with the logo at the bottom right.  Perhaps an error in my code in translating from C# to VB :} or perhaps my client doesn't have credentials to view?  see uri below…

    api.tiles.virtualearth.net/…/GetMap.ashx{token}

    Any insight as to best way to design would be much appreciated.

  3. gspyrou

    @FastEddie_D

    In your Uri the (lat,lon) is set to (0,0) in the ppl parameter  , you need to set that to the coordinates you want to display

    e.g

    api.tiles.virtualearth.net/…/GetMap.ashx

    George

Comments are closed.