Hi,
I am trying to integrate OpenStreetMap in my Silverlight application using XamMap. But the map is not rendering on the page.
Here is my XAML:-
Here is my code behind:-
Any suggestions?
Hi huabing,
Could you try to show an image from the OpenStreetMap server, e.g. <Image Source="http://tile.openstreetmap.org/1/0/0.png" />.
If the image cannot be shown then it might be an issue with Silverlight's URL Access Restrictions.
Regards,
Ivan Kotev
I have the same problem. Did you solve the problem?
I tried the methods in the replies. no lucky.
Thanks !
If it does seem like you are having cross-scheme issues, please also see this series of posts: http://community.infragistics.com/forums/t/44635.aspx
More information about URL Access Restrictions in Silverlight can be found here: http://msdn.microsoft.com/en-us/library/cc189008%28VS.95%29.aspx and http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx
Hope it helps.
Hi chandra123,
The code seems to be fine. You might experience this kind of issue if the Silverlight application is not hosted in a Web site and uses automatically generated debug page.
OpenStreetMapTileSource downloads images from a Tile server and when you run the Silverlight app from a local file a URL access restriction is violated – “Cross-scheme”. Try to host the application in a Web site or enable it to run out of browser. You could also try to show a random image from the web, e.g. <Image Source="http://tile.openstreetmap.org/1/0/0.png" />.
Please let me know if it works.
Best Regards,