angularjs-google-maps
angularjs-google-maps copied to clipboard
google is not defined
As instructed I'm trying to resize the map, as there are grey boxes shown.
NgMap.getMap().then(function(map) {
var center = map.getCenter();
google.maps.event.trigger(map, "resize");
map.setCenter(center);
});
But get: 'google' is not defined
in grunt builder
It seems like an issue of grunt builder. This repository does not use grunt at all.
So, I managed to get the google object there. But the resize operation doesn't work. Still doesn't fix the problem with gray zones. Any suggestions?
Please take a look at README.md FAQ section. It will help you.
If not helpful, please post your example using plunker. You can create a plunker example easily by visiting https://ngmap.github.io.
NgMap.getMap().then(function(map) {
var center = map.getCenter();
google.maps.event.trigger(map, "resize");
map.setCenter(center);
});
Doing this in the controller. Doesn't help at all.
Of course not,
If not helpful, please post your example using plunker. You can create a plunker example easily by visiting https://ngmap.github.io.
If I cannot reproduce your problem, I cannot be much helpful. So, please help me to reproduce your issue using a plunker example.
@bobbyziom I made this plunker. Please check if it solves your problem.