I'm trying to upgrade my Bing Maps v7 to v8, and according to the documentation I should be able to swap the urls and it will work with possible minor issues.
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src='https://www.bing.com/api/maps/mapcontrol?branch=release'></script>
<body ng-app="myApp">
<div ng-controller="bingCtrl" ng-init="init()" ng-cloak>
<div id="mapDiv"></div>
</div>
<script>
var app = angular.module("myApp", []);
app.controller("bingCtrl", function($scope) {
$scope.map = null;
$scope.init = function() {
$scope.map = new Microsoft.Maps.Map(document.getElementById('mapDiv'));
};
});
</script>
</body>
</html>
I removed all the code to see if I could isolate the issue and I can with the code above. I get the following error. Any ideas why this isn't working?
TypeError: Cannot read property 'prototype' of null