I need your help in fixing the problem and understanding what the error is and how to fix it. I am trying to display the google map with help of Google Maps API in Ember.js but getting this error below please take a look and help.
Error while processing route: search google.maps.Attribution is not a constructor TypeError: google.maps.Attribution is not a constructor
at Class.setupController (http://localhost:4200/assets/places-finder-app.js:1151:26)
at Class.setup (http://localhost:4200/assets/vendor.js:42767:12)
at callHook (http://localhost:4200/assets/vendor.js:61048:38)
at _handlerEnteredOrUpdated (http://localhost:4200/assets/vendor.js:62643:7)
at handlerEnteredOrUpdated (http://localhost:4200/assets/vendor.js:62655:7)
at setupContexts (http://localhost:4200/assets/vendor.js:62610:9)
at finalizeTransition (http://localhost:4200/assets/vendor.js:62819:7)
at http://localhost:4200/assets/vendor.js:62217:14
at tryCatch (http://localhost:4200/assets/vendor.js:63470:14)
at invokeCallback (http://localhost:4200/assets/vendor.js:63485:15)
ember.debug.js:26513 TypeError: google.maps.Attribution is not a constructor
at Class.setupController (search.js:14)
at Class.setup (ember.debug.js:32172)
at callHook (ember.debug.js:50453)
at _handlerEnteredOrUpdated (ember.debug.js:52048)
at handlerEnteredOrUpdated (ember.debug.js:52060)
at setupContexts (ember.debug.js:52015)
at finalizeTransition (ember.debug.js:52224)
at ember.debug.js:51622
at tryCatch (ember.debug.js:52875)
at invokeCallback (ember.debug.js:52890)
Here is the file where I am getting error from at Attribution and markerPlace. app/routes/search.js
export default Ember.Route.extend({
setupController: function(controller) {
controller.setProperties({
selections: {
markerOptions: {
animation: google.maps.Animation.DROP,
anchorPoint: new google.maps.Point(),
attribution: new google.maps.Attribution(),
icon: 'beachflag-8f33bab9b0c154462489b35140f29fae.png',
label: 'A',
optimized: true,
place: new google.maps.MarkerPlace(),
position: new google.maps.LatLng(),
shape: new google.maps.MarkerShape(),
title: 'string',
zIndex: 999
}
}
});
}
});
Aucun commentaire:
Enregistrer un commentaire