angularjs-google-maps icon indicating copy to clipboard operation
angularjs-google-maps copied to clipboard

google is not defined

Open bobbyziom opened this issue 7 years ago • 6 comments

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

bobbyziom avatar Apr 13 '17 14:04 bobbyziom

It seems like an issue of grunt builder. This repository does not use grunt at all.

allenhwkim avatar Apr 13 '17 14:04 allenhwkim

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?

See error here

bobbyziom avatar Apr 14 '17 16:04 bobbyziom

Please take a look at README.md FAQ section. It will help you. image

If not helpful, please post your example using plunker. You can create a plunker example easily by visiting https://ngmap.github.io.

allenhwkim avatar Apr 14 '17 22:04 allenhwkim

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.

bobbyziom avatar Apr 14 '17 22:04 bobbyziom

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.

allenhwkim avatar Apr 14 '17 22:04 allenhwkim

@bobbyziom I made this plunker. Please check if it solves your problem.

felipeloge avatar May 25 '17 20:05 felipeloge