angular-ui / angular-google-maps

AngularJS directives for the Google Maps Javascript API
http://angular-ui.github.io/angular-google-maps
2.52k stars 1.07k forks source link

maps.places not defined #1836

Open mohamed-ahmed opened 8 years ago

mohamed-ahmed commented 8 years ago

despite using

.config(function(uiGmapGoogleMapApiProvider) {
    uiGmapGoogleMapApiProvider.configure({
        //key: 'mykey',
        v: '3.20', //defaults to latest 3.X anyhow
        libraries: 'places'
    });
})

in

uiGmapGoogleMapApi.then(function (maps) {
    console.log(google.maps);
    console.log(google.maps.places);
});

(version 2.3.2)

maps.places is not defined.

Not sure what the problem could be.

Cojomax99 commented 8 years ago

👍 having the same issue. All other libraries load except places.

Cojomax99 commented 8 years ago

Fixed it! I'm not sure if this is the case for you, but in my case I was defining a config for uiGmapGoogleMapApiProvider in more than one file. The other config did not load 'places' and was overwriting the config I thought was being used (but was not at all). So, if you're defining the config for this more than once, try not doing that and see what happens!