This repository was archived by the owner on Nov 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
This repository was archived by the owner on Nov 30, 2018. It is now read-only.
UUID - TypeError when init map ala Quickstart-style #632
Copy link
Copy link
Closed
Description
I used the information here - https://angular-ui.github.io/angular-google-maps/#!/use - to get a map. The map works but it gives a TypeError in the console, and the scrollWheel doesn't get removed.
Here's the information from the console:
TypeError: undefined is not a function
at Map.link (http://localhost:8005/js/angular-google-maps.js:7240:31)
at http://localhost:8005/js/angular-google-maps.js:7132:63
at nodeLinkFn (http://localhost:8005/js/angular.js:4258:13)
at compositeLinkFn (http://localhost:8005/js/angular.js:3858:15)
at compositeLinkFn (http://localhost:8005/js/angular.js:3872:13)
at nodeLinkFn (http://localhost:8005/js/angular.js:4252:24)
at compositeLinkFn (http://localhost:8005/js/angular.js:3869:15)
at compositeLinkFn (http://localhost:8005/js/angular.js:3872:13)
at publicLinkFn (http://localhost:8005/js/angular.js:3775:30)
at http://localhost:8005/js/angular.js:934:25 <google-map draggable="true" center="map.center" zoom="map.zoom" options="mapOptions" class="ng-isolate-scope ng-scope angular-google-map"> angular.js:5601
(anonymous function) angular.js:5601
(anonymous function) angular.js:4698
nodeLinkFn angular.js:4261
compositeLinkFn angular.js:3858
compositeLinkFn angular.js:3872
nodeLinkFn angular.js:4252
compositeLinkFn angular.js:3869
compositeLinkFn angular.js:3872
publicLinkFn angular.js:3775
(anonymous function) angular.js:934
Scope.$eval angular.js:7905
Scope.$apply angular.js:7985
(anonymous function) angular.js:932
invoke angular.js:2813
bootstrap angular.js:930
angularInit angular.js:906
(anonymous function) angular.js:14600
trigger angular.js:1693
(anonymous function) angular.js:1928
forEach angular.js:110
eventHandler angular.js:1927
My map-related content in app.js:
var app = angular.module('MapsApp', ['google-maps']);
app.controller("MapsCtrl", ['$scope', function($scope) {
$scope.map = {
center: {
latitude: 45,
longitude: -73
},
zoom: 8
};
$scope.mapOptions = {scrollwheel: false};
// *other code removed*
}]);
The related HTML:
<body ng-app="MapsApp">
<div ng-controller="MapsCtrl" class="wrapper">
<div class="map-area" id="map_canvas">
<google-map draggable="true" center="map.center" zoom="map.zoom" options="mapOptions"></google-map>
</div>
<!-- *other code removed-->
</body>
Upon changing the value at line 7240 in angular-google-maps.js from uuid.generate();
to a random string (I used 'AB' + Date.now() + 'cv'
) it works. So I guess there must be a problem with UUID.