Can not get libraries
Im trying to use heatmap layer but even I add 'visualization' to libraries;
.config(['uiGmapGoogleMapApiProvider', function (GoogleMapApi) {
GoogleMapApi.configure({
// key: 'your api key',
v: '3.17',
libraries: 'weather,geometry,visualization'
});
}])
I get error like;
TypeError: Cannot read property 'HeatmapLayer' of undefined
After I looking into network, I figured out that application does not load libraries from google url. The request was like that:
http://maps.googleapis.com/maps/api/js?sensor=false&libraries=drawing
So the problem is that, I cant customize that url from GoogleMapApi.configure. I could not find the reason. So help me :)
The whole point of uiGmapGoogleMapApiProvider is that it is fully customizable and overridable. All you need to do is specify the libraries you need to load to get the HeatMapLayer.
So yeah visualization should be loaded.
https://github.com/angular-ui/angular-google-maps/blob/master/example/assets/scripts/controllers/example.js#L12
Just like you showed above. Your not also loading google maps via your own script tag are you?
I am loading the api exactly you did, but when I looked at over network the api loads the following script;
http://maps.googleapis.com/maps/api/js?sensor=false&libraries=drawing
What ever I do, it doesnt change.
Can you produce an example doing it? Plunkr?
Okay I solved the problem, somewhere in the code, someone loads the static script. So there is no issue :)