macdevcenter.com
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

Dissecting a Dashboard Virtual Earth Widget
Pages: 1, 2, 3

Deploying the Widget

With all these pieces in place, all that remains is to actually install the Widget. This is accomplished by a simple double-click on the virtualearth.wdgt directory from the Finder. You will be prompted to confirm that you'd like to install this Widget, which then takes you to the Dashboard. You're prompted again to confirm you want this Widget, after which you should finally have it.

figure 3

Well, give it a try! It should look something like this:

figure 4

Notice that I can perform searches using the built-in search controls. If you have a Mighty Mouse or other scroll mouse, you can zoom in and out using the scroll wheel. And of course you can pan around the map, switch to Aerial or Hybrid, and generally do everything you normally can using Virtual Earth.

The Future

Where can we take our Virtual Earth Dashboard Widget from here? A basic next step might be to include resize capability, although I am not sure if the MapSearchControl offers us this feature. We could also implement a mashup by pulling in some external data and mapping it against our Widget. We could investigate the AllowSystem property list key and the widget.system() call to use external applications to gather information. Don't forget Dashboard Widgets can closely integrate with Apple-specific applications via plugins as documented here.

It is important, of course, not to get carried away and to remember Apple's recommendations regarding whether your Widget is really growing a bit too gnarly for the elegant Dashboard.

Final Thoughts

I hope you enjoyed this brief tour under Dashboard's hood. Of course, if such a rich Web 2.0 control as Virtual Earth can live happily inside the Dashboard, you should be pretty excited about the possibilities. The sky is the limit, and the cleanliness and elegance of the Dashboard as an AJAX programming environment will make it easy for you.

Don't forget to check out more Dashboard Widgets at Apple's download page.

Luke Burton chipped his teeth on C++, and has lately sought refuge in the beautiful world of scripting languages like Ruby and Perl.


Return to the Mac DevCenter