Microsoft.Maps.loadModule with Angularjs

150 views Asked by At

I am using Microsoft.Maps.loadModule in a directive for AutoSuggest functionality. Problem is that script is loading async and my directive trigger before script is loaded... Can you provide me with some solutions on how to trigger Microsoft.Maps.loadModule function inside directive after script is loaded, or if there is some other solution I would really appreciate it.

Cheers!

1

There are 1 answers

0
Azad On BEST ANSWER

you can use a call back function to trigger after bingmap loaded.

$.getScript("http://www.bing.com/api/maps/mapcontrol?branch=release&callback=bingMapLoaded");

function bingMapLoaded(){
  alert('my bing map loaded');
}