I followed the example:
http://help.infragistics.com/Help/NetAdvantage/DV/2010.3/CLR4.0/html/xamWebMap_Add_Bing_Maps_as_Geo-Imagery_Data_Source.html
But the Silverlight application completely crashes when trying to load, without giving any explanation of why. Is this example outdated?
Hi terinfire,
Could you trace it to the line that throws it and post the exception message ? Can you confirm that you have a Bing Map key (http://www.bingmapsportal.com/) ? I believe the example is up to date, but please let us know if you have any issues with it.
Regards,
Ivan kotev
As stated above, I no longer have a crashing issue (that was a different issue). I have now found that the map is not displaying at all and that there are issues when following this tutorial, due to two end points in the ServiceClient references. I specify the basicHTTP one, and things seem to work, but no map is displayed. The callback occurs, but following that, nothing is displayed on the actual control.
Do you host your application in a Web Site? In that case, if you like, you can use the files I've attached () to create a sample application. Except for including the files in the Silverlight project, only the Service Reference to http://dev.virtualearth.net/webservices/v1/imageryservice/imageryservice.svc/mex should be added (it is called BingMapsImageryServRef in the sample) and change the BING_MAPS_SECRET_KEY to the one, you've obtained from the Bing Maps portal.
Thank you for the constructive comments on the help page article, they will be taken into consideration.
Best regards,Milana Zhileva
Milana,
This is the exact code I have already and am using. I'm trying to understand what kind of changes need to be made to the config's in order to replicate the map, according to some prior posts. I believe I've done everything to allow for cross-domain and client access policies... They appear to be the same as what others have used/posted.
Would you please try to show a simple image in your project, for example:
<Image Source="http://community.infragistics.com/themes/Infragistics/style/images/Infragistics-Community.png"/>
Knowing if the image is displayed correctly from the url could help to localize the issue.
Thanks,Milana Zhileva
I have managed to get it working now. It appears that the Bing Maps credentials were doing some funny things.
My issue now is that the MapNavigationPane does not appear to be doing anything. I've removed the InitializeMapCoordinates() code so that nothing is hard-set.
The fact that the MapNavigationPane's not working as intended is due to the removal of the InitializeMapCoordinates() function. It is needed to make a map with only Geo-Imagery datasource specified interactive (pannable, zoomable, etc.). However, if a shape file, for example, is added to the map, the function will no longer be necessary.
Hope that helps,Milana Zhileva
I found the issue -- the WindowRect was set before the WorldRect. So, for future note, anyone who is setting things up needs to do something like:
XamMap.WindowRect = XamMap.WorldRect = WorldRectYouCreated;
One of the things done in the InitMapCoordinates() function is changing map's WorldRect to a custom one. That's why the explicit setting of IsAutoWorldRect to false is needed. If this is omitted, the map still loads but it is not interactive.
It seems to have problems with the IsAutoWorldRect = false; when I set it to true OR false, the map doesn't load. When I comment it out the map loads... ideas?