Angular + JQM + AngularUI (Google Maps) #160

Closed
mvand opened this Issue Apr 4, 2013 · 4 comments

Projects

None yet

2 participants

@mvand
mvand commented Apr 4, 2013

I need to use google maps in my mobile app, and i have naturally chosen AngularUI with its Map feature to handle this.

I have just tried the example provided on the website of AngularUI, and i got this exception when the info window has to been displayed as map overlay ( function openMarkerInfo() ):

Uncaught TypeError: Expecting a function in instanceof check, but got TypeError: Cannot call method 'appendChild' of null (11:39:17:677 | error, javascript)
at formatError (js/lib/angular.js:5665:26)
at (js/lib/angular.js:5685:23)
at forEach (js/lib/angular.js:136:18)
at (js/lib/angular.js:5684:11)
at (js/lib/angular.js:4784:18)
at Scope.$apply (js/lib/angular.js:8075:11)
at $rootScope.$apply (js/lib/jquery-mobile-angular-adapter.js:284:27)
at (js/lib/angular-ui.js:34:17)
at jQuery.event.dispatch (js/lib/jquery-1.9.0.js:3045:9)
at elemData.handle (js/lib/jquery-1.9.0.js:2721:28)
at jQuery.event.trigger (js/lib/jquery-1.9.0.js:2957:12)
at jQuery.fn.extend.triggerHandler (js/lib/jquery-1.9.0.js:3645:24)
at (js/lib/angular-ui.js:267:17)
at R.trigger (https://maps.gstatic.com/intl/fr_fr/mapfiles/api-3/12/6c/main.js:19:206)
at SI.(anonymous function).e (:27:297)
at (:57:35)
at R.trigger (https://maps.gstatic.com/intl/fr_fr/mapfiles/api-3/12/6c/main.js:19:206)
at J.Ud (:25:472)
at J.Hl (:25:403)
at (https://maps.gstatic.com/intl/fr_fr/mapfiles/api-3/12/6c/main.js:9:329)
at R.trigger (https://maps.gstatic.com/intl/fr_fr/mapfiles/api-3/12/6c/main.js:19:206)
at J.rj (:57:197)
at (https://maps.gstatic.com/intl/fr_fr/mapfiles/api-3/12/6c/main.js:20:219)

The info window isn't displayed when you click once on the marker and this exception is thrown. But if you click a second time on the marker, then the info window is displayed, it's weird.

@tbosch
Contributor
tbosch commented Apr 5, 2013

Hi,
thanks for reporting. Haven't tried using Angular-UI together with the adapter.
Could you provide a jsfiddle or a plunk starting with the templates in the README.md of the adapter?

Tobias

@mvand
mvand commented Apr 5, 2013

http://jsfiddle.net/X7geu/3/

For your test, click on the map to put a marker, then click on this marker once to get the error and click again to view the info window.

@tbosch
Contributor
tbosch commented Apr 19, 2013

Hi,
sorry, have been busy these days... Will look at it next week...

Tobias

@tbosch
Contributor
tbosch commented Apr 24, 2013

Hi,
just pushed a commit that fixes your problem. Your jsfiddle does no more throw an error.

Thanks for providing!
Tobias

@tbosch tbosch closed this Apr 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment