allenhwkim / angularjs-google-maps

The Simplest AngularJS Google Maps V3 Directive
http://ngmap.github.io
MIT License
1.52k stars 517 forks source link

Google is not defined for custom markers only #808

Open elmargasimov opened 7 years ago

elmargasimov commented 7 years ago

@allenhwkim We currently lazy load the maps api in our application independently of NgMap (we use an almost identical approach to your GoogleMapsApi service). In order to share the instance of $window.google with NgMap, we fetch the instance in our controller and use ng-if to render the map directive once ready. This works fine, but when we use custom-markers, it throws an error saying google is not defined. Please help.

anurag619 commented 7 years ago

can you recreate your issue in a plunker ?