Bing Maps Silverlight CTP: Plot/Edit Pushpin data via a ChildWindow

4. August 2009

Silverlight_BingMaps_CTP_EditPushpintsWithChildWindow Recently I posted an example of using the Web.Maps.VE Bing Maps ASP.NET AJAX Server Control with the AjaxControlToolkit ModalPopup Extender over at the Simplovation Blog. Writing that example was rather simple since those two components/libraries are both written on top of ASP.NET AJAX and work extremely well together. This did however get me thinking about how to implement this same type of functionality using the Bing Maps Silveright Control CTP, and now that Silverlight 3 is out and it has a ChildWIndow control, this is actually really simple to implement using Silverlight as well.

This was written for the Bing Maps Silverlight CTP Release.

Download Example Code: Silverlight_BingMaps_CTP_EditPushpinsWithChildWindow.zip (235.44 kb)

To the right you can see a screenshot of this code sample in action. The screenshot in the back is just displaying the plotted “pushpins” as red squares, with tooltip being displayed over the pushpin located in Seattle, WA. The front screenshot is displaying the “Edit” dialog using the ChildWindow control.

Before you hit Run (F5) on this Example Code, you will need to have the Bing Maps Silverlight Map Control SDK CTP Installed.

If you want to see how to use the Silverlight 3 ChildWindow control, I recommend you take a look at Jeff Prosise’s “Silverlight 3’s New Child Windows” post.

Also, if you want to see how to work with the Bing Maps Silverlight Control CTP, then you may want to take a look at the following links:

Bing Maps, Silverlight ,

Comments

8/6/2009 8:07:19 PM #
I'm not able to display the map with the image(pushpin) after following the "Adding Images to the Map (aka “Pushpins”)" sample. I'm using Visual Web Developer 2008 Express Edition w/.NET 3.5 SP1. The error I got after F5 is... "Line: 453
Error: Sys.InvalidOperationException: ImageError error #4001 in control 'Xaml1': AG_E_NETWORK_ERROR". I placed my bit map image in the same location as the .xap file. I've tried two different images already, a png and a bmp.
8/7/2009 11:10:19 PM #
Rick Mean, the image file (png, bmp, whatever) needs to be place within the Silverlight application as a Resource, then it'll be able to find it as the example shows. I don't exactly remember off hand if it needs to be a Resource or Embedded Resource, try one then the other if it doesn't work.
9/24/2009 6:13:02 AM #
Chris -
I was wondering if you know how to fix a bug in your sample code.  When I run it, click a point, and the child window pops up, if you use the mouse wheel, the map ends up zooming under the child window.  I'm having this problem in an app of mine, and noticed that your sample has the sample issue.

Thanks,
-Damien