-
Notifications
You must be signed in to change notification settings - Fork 519
google is not defined #506
Comments
Please try |
i have faced this issue before...and if i remember it correctly, it has something to do with how you added the script for google map...what i did was remove the
i faced this problem when trying to create an example in plunker..hope this can help |
Sorry guys, but nothing that you suggested really helps. Problem is inside ng-map.js itselft. When I inject NgMap inside my controller ng-map.js gets executed, as I understand, and like my error says, google variable is not defined, and it's not defined because there is no internet connection to get it. |
Hi all, I had the same problem, map-lazy-load worked for me! Thanks allenhwkim 👍 |
But the problem is inside ng-map.js I don't know why lazy-load added some CSS resources to my page, which add scrolls to my page! I wanted to use (and text) simple map, without lazy load and it returned an error |
simple trick. ngcontroller: if(typeof google == "undefined"){
$rootScope.mapEnable = false;
}else{
$rootScope.mapEnable = true;
} html <div ng-if="mapEnable" class="gmap_container" data-tap-disabled="true">
<ng-map zoom="12" center="{{item.gmap}}"></ng-map>
</div> |
Thanks @Jasman, but with your code, now my map is not shown at all! I wonder why does |
Hi guys Do I have to use "map-lazy-load"? Is the only one way? Thank you so much! |
I'm facing the same issue, left details on stackoverflow |
|
angular.js:14525 TypeError: Cannot read property 'PlacesService' of undefined "
|
I'm working on hybrid app using cordova, I've included your library in my project but there is one problem. Because this will be app for mobile it does not require internet connection, it can work without it, but the problem is when I got no internet connection ng-maps is firing error:
And it all would be fine, and I wouldn't be here if I can ignore it, but I can't. Angular is not finishing all bindings when that error fires up, so I get a lot of stuff inside double curly braces.
Error is fired up when I inject ng-maps inside a controller.
Is there any way you can make some kind of try/catch block when trying to access google variable
The text was updated successfully, but these errors were encountered: