Contact us: info@exonya.com or (+7 812) 982-2514

  • Русский
  • English

EXONYA
Custom software development, web-design, SEO, SMM

Bing Maps Silverlight control and problem with Bird’s eye and Streetside modes – solution for the issue

Written by EXONYA on . Posted in Software Development

In one of our projects we’re using Bing Maps Silverlight control. It allows us to use all features of Bing Maps in our project and in the same time it allows to use Silverlight. The purpose of our project is to show objects from the customer’s DB on the map of United States. And one of the coolest features of the Bing Maps is one special view mode – Bird’s Eye. Bird’s eye is the unique view mode – it allows to see buildings not from the rooftop but from some angle – like birds can see it. And it looks very cool.

But when we started to use the control we met with a problem known to every developer who used Bird’s eye in the Bing Maps Silverlight control. Bird’s eye mode is some kind of extension over the standard control and it resides in the Bing Maps Silverlight Control Extended Modes Beta v0.5.0.0 SDK. Here in the name of the SDK you can see “Beta” word and that’s the problem. Problem that it not polished enough as it’s in the beta stage. And the problem we met is an exception – I’m talking about “System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.TypeLoadException: Could not load type ”Microsoft.Maps.Plugins.ConfigurationService” from assembly ”Microsoft.Maps.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c70bd40282823787”. When we add new reference to the Bird’s eye DLL we start to get the exception mentioned above and right after that application crashes… In the same time without those DLLs application works good. So we decided that the reason of the problem is lying in the extended mode DLLS.

I tried to find a workaround and I found it for the Silverlight 3 (there are my messages about it) but when we switched project to the Silverlight 4 application still crashed. We switched extended modes off but after few months Bird’s eye mode started to work again! And yesterday, I suddenly started to receive exactly the same exception I received before. And it was really bad news as our customer likes Bird’s eye mode and we definitely have to find a solution for that… Fortunately, again I started to searching for some solution for that problem and I found the same topic I already used to post my messages about the problem with Bird’s eye mode. I’d like to thank user Jeff S – really big thanks you for your post! After that I have some ideas about where to find a solution. I ran Fiddler (it’s some development tool – must have for all web-developer!) and I decided to see what requests is being sent by Bing Maps Silverlight control when it has extended modes attached. I ran our project, opened a page where Bing Maps Silverlight control is located, switched Bird’s eye mode on and…I saw some strange request that goes to http://dev.virtualearth.net/webservices/v1/MapControlConfigurationService/MapControlConfigurationService.svc/binaryHttp . In the request body (Fiddler – thanks for that!) I saw one strange thing – it was an address of the additional XAP file, that is requested by the Bing Maps Silverlight control (or by Bird’s eye mode). I downloaded the additional XAP-file locally to my desktop, unpacked it and I took a look into the content of the file. And what I found there – there was 3 additional DLLs: Microsoft.Maps.Plugins.dll, Microsoft.Maps.PluginContainer.dll и Microsoft.Maps.Plugins.Internal.dll . I just added them into the our project and… voila! Application started to work without the exception I mentioned above! So as a solution for the issue I described above I can recommend to use those three DLLs.

I’ve uploaded archive that contains all three DLLs – feel free to use it!

Tags: , , , , , , , , ,

EXONYA

Software Development Company, Custom Software Development, Offshore Programming, Software Outsourcing