Reimers.dk

.NET, AJAX and Google APIs brought together
Welcome to Reimers.dk Sign in | Join | Help
in Search

Silverlight Static Google Map Control

Last post 12-02-2009, 9:45 by jjrdk. 6 replies.
Sort Posts: Previous Next
  •  09-06-2009, 15:07 2734

    Silverlight Static Google Map Control

    Hello,

    I've downloaded this and tried it and it works very well. Thanks a million.

    One thing I see is that when I try to, load the project with Expression Blend (2 Service Pack 1) I get an error -

    "Method not found 'Void System.Windows.Media .Imaging.BitmapImage.ctor(system.uri)'".

    The workaround is of course to remove the control from the page, do the pretty pretty stuff, then put it back!

    Do you have an example page please for using the Open Street Maps control?

    Best Regards

    Bob

  •  09-06-2009, 16:45 2735 in reply to 2734

    Re: Silverlight Static Google Map Control

    I think the problem is that you are using Silverlight 2. The problem may be caused by a constructor that is not present in Silverlight 2. Try changing the SetImageSource method of the StaticMap class to use the empty constructor and then set the UriSource after.

    Regarding the OSM map control, then it is in fact the Bing Maps Silverlight control CTP. I created the OverlayManager which hooks into the map. Simply assign the map to manage to the OverlayManager and then use it to handle the display of overlays. 

  •  09-07-2009, 16:08 2736 in reply to 2735

    Re: Silverlight Static Google Map Control

    Thanks. I tried this:-

    //BitmapImage mapPicture = new BitmapImage(GetMapUri());

    // REM 07-Sep-09

    BitmapImage mapPicture = new BitmapImage();

    mapPicture.UriSource = GetMapUri();

    But it throws a similar error. I'm downloading Expression Blend 3 and will see what happens with that.

    Thanks very much.

    Bob

  •  09-07-2009, 18:50 2737 in reply to 2736

    Re: Silverlight Static Google Map Control

    Just confirming that the problem went away when Expression Blend 3 was installed.

    Bob

  •  09-07-2009, 19:21 2738 in reply to 2737

    Re: Silverlight Static Google Map Control

    I'm very surprised that it continues to throw the constructor exception even if you are not passing in the Uri in the constructor. Glad to hear that it works in Blend 3, that is what it was developed for.
  •  12-02-2009, 5:16 2886 in reply to 2738

    Re: Silverlight Static Google Map Control

    Just wondering how to download this control?

    zkalman

  •  12-02-2009, 9:45 2887 in reply to 2886

    Re: Silverlight Static Google Map Control

    If you go to the downloads section you will find that it is included in the Silverlight Utility Library.
View as RSS news feed in XML