JavaScript Google Map not rendering in Angular view after hosting

I am using Angular.js in my MVC 5 project. There is a Google Map using in my Angular view, please see the Google Map directive in app.js.

myApp.directive('googlemap', function ($compile) {
return {
    controller: function ($scope) {
        var map;

        this.registerMap = function (myMap) {
            var center = myMap.getCenter(),
              latitude = center.lat(),
              longitude = center.lng();
            //zoom = center.zoom();

            map = myMap;
            $scope.latitude = latitude;
            $scope.longitude = longitude;
            $scope.zoom = map.getZoom();
        };

        $scope.$watch('latitude + longitude', function (newValue, oldValue) {
            if (newValue !== oldValue) {
                var center = map.getCenter(),
                  latitude = center.lat(),
                  longitude = center.lng();
                if ($scope.latitude !== latitude || $scope.longitude !== longitude)
                    map.setCenter(new google.maps.LatLng($scope.latitude, $scope.longitude));
            }
        });
    },
    link: function (scope, elem, attrs, ctrl) {
        var mapOptions,
          latitude = attrs.latitude,
          longitude = attrs.longitude,
          //controlTemplate,
          //controlElem,
          map;

        // parsing latLong or setting default location
        latitude = latitude && parseFloat(latitude, 10) || 43.074688;
        longitude = longitude && parseFloat(longitude, 10) || -89.384294;

        mapOptions = {
            zoom: 8,
            disableDefaultUI: true,
            center: new google.maps.LatLng(latitude, longitude),
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };

        map = new google.maps.Map(elem[0], mapOptions);

        //var marker = new google.maps.Marker({
        //    position: myCenter,
        //    animation: google.maps.Animation.BOUNCE
        //});

        //marker.setMap(map);

        //$scope.zoom = map.getZoom();

        ctrl.registerMap(map);

        //controlTemplate = document.getElementById('whereControl').innerHTML.trim();
        //controlElem = $compile(controlTemplate)(scope);
        //map.controls[google.maps.ControlPosition.TOP_LEFT].push(controlElem[0]);

        function centerChangedCallback(scope, map) {
            return function () {
                var center = map.getCenter();
                scope.latitude = center.lat();
                scope.longitude = center.lng();
                scope.zoom = map.getZoom();
                if (!scope.$$phase) scope.$apply();
            };
        }
        google.maps.event.addListener(map, 'center_changed', centerChangedCallback(scope, map));
    }
};});

I use this directive in my html

<div class="col-sm-10" style="height:200px;" googlemap latitude="43.074688" longitude="-89.384294"></div>

It works fine in local host. After host this page in web server, map not rendering correctly and it shows error:

enter image description here

I have already Google Map API key and there is no Referrers in Developer

console

enter image description here

Edit:

controller

function RouterCtrl($scope, $http, $routeParams) {

var _RouterId = $routeParams.routerid;

$scope.models = {
    LocationName: $scope.LocationName,
    RouterID: $scope.RouterID,
}

$scope.SaveRouter = function () {

    var Router = {
        Id: 0,
        Location: $scope.LocationName,
        Latitude: $scope.latitude,
        Longitude: $scope.longitude,
        SerialNumber: $scope.RouterID,
    }

    $http.post("Router/Create", { model: Router }).success(function (data) {
        alert('success');
    });

}

// End 

// Router List link

$scope.RoutersList = function () {
    window.location.href = '#/listrouter';
}}RouterCtrl.$inject = ['$scope', '$http', '$routeParams'];

I am missing controller declaration in app.js.

DotWiFi.controller('RouterCtrl', RouterCtrl);

This is the refer script for Google Map.

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaS*************************">    </script>
Answer:1

I have seen an impressive mapping example on http://jerusalem.com/map#!/tour/the_way_of_the_cross/location/abu_jaafar, Does anybody how a similar animation on the drawn path of the points can done ...

I have seen an impressive mapping example on http://jerusalem.com/map#!/tour/the_way_of_the_cross/location/abu_jaafar, Does anybody how a similar animation on the drawn path of the points can done ...

I'm working on a moderately-complex Bookmarklet that works just fine in Chrome, but I can't get it to work in Firefox. When I run my Bookmarklet in Firefox it redirects to a new page that only says ...

I'm working on a moderately-complex Bookmarklet that works just fine in Chrome, but I can't get it to work in Firefox. When I run my Bookmarklet in Firefox it redirects to a new page that only says ...

I've a website with the google maps api which is loaded asynchronous. But this throws a errer: google is not found. My code is: <script> function initialize() { var mapOptions = { zoom: ...

I've a website with the google maps api which is loaded asynchronous. But this throws a errer: google is not found. My code is: <script> function initialize() { var mapOptions = { zoom: ...

  1. google maps marker icons
  2. google maps marker color
  3. google maps marker label
  4. google maps marker size
  5. google maps marker api
  6. google maps marker cluster
  7. google maps marker icon size
  8. google maps marker title
  9. google maps marker options
  10. google maps marker label position
  11. google maps marker tooltip
  12. google maps marker svg
  13. google maps marker click event
  14. google maps marker infowindow
  15. google maps marker images
  16. google maps marker events
  17. google maps marker style
  18. google maps marker hover
  19. google maps marker text
  20. google maps marker url

I have the following demo data. var demoData= [{"EntryGroupDate":"November 2013", "DisplayName": "Hans Meier (November)", "EntryGroupDateSort": 11}, {"...

I have the following demo data. var demoData= [{"EntryGroupDate":"November 2013", "DisplayName": "Hans Meier (November)", "EntryGroupDateSort": 11}, {"...