Bings Map REST service LINUX compatibility issue RRS feed

  • Question

  • I am currently using the REST services in the Bings map AJAX V7 to create a route between destinations determined in my applications UI. Everything has been working fine when testing in a windows environment. However, when trying to test in a LINUX environment it appears to have compatibility issues.

    When trying to launch the map I get the following errors:

    1. In IE I get a JavaScript error prompt stating: 'Microsoft' is undefined

    2. After closing the prompt, I get another messaging stating "Unhanded exception initializing state"

    After observing the code I see that the map entities appear to be declared as Microsoft objects, which brings me to the question - are the REST services even compatible with LINUX? and If so any solutions to fix this problem?

    Any suggestion would be great

    - Shawn

    Tuesday, November 20, 2012 6:27 PM


  • The REST services are completely platform-agnostic - they return JSON/XML (in the case of the routing, locations services), or PNG/JPG (in the case of the imagery service), so there is no question of "incompatibility" with different OS'es.

    The AJAX map control requires only HTML and Javascript, which, although pretty widely compatible, *are* handled differently across different browsers.

    The "Microsoft is undefined" error you describe generally occurs when you're trying to use a method of the AJAX control (such as instantiating a new map) before the library has fully loaded. This might result in errors occurring in one browser but not another, because of subtle timing differences or the order in which they load various resources. However, it can be corrected easily in your code by simply checking for the existence of the Microsoft object before trying to use any of the classes it contains. If you post the URL of your map we can easily confirm this.

    twitter: @alastaira blog: http://alastaira.wordpress.com/ | Pro Spatial with SQL Server 2012

    Tuesday, November 20, 2012 9:42 PM