Embedding a GoogleMap page in an Excel Task Pane


Another short subject, but worthy of a few remarks.

The GoogleMaps taskpane is implemented in a separate project, hopefully re-usable.  Now integrated.

The task pane is created in GeodesiX.Addin #27#, which also contains the event handlers. GeodesiX.Addin.Map is the task pane, and it contains an instance of the GoogleMap user control, which in turn contains an Internet Explorer control.

The GoogleMap control exposes 3 public methods:

  1. ShowFlight #28#, which loads GoogleMaps.FlightPath.htm.
  2. ShowLocation #29#, which loads GoogleMaps.Geocoder.htm.
  3. ShowRoute #30#, which loads GoogleMaps.Directions.htm.

Each of these methods simply builds the appropriate URL for the embedded IE control and navigates to it. The good part is that you can modify those HTM pages as you see fit if you want to change the display format. The bad part is that the javascript is not exactly trivial (but certainly a good exercise).

 Posted by on 2011/04/07 at 19:20

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>