Google maps autocomplete API, How to modify the pac-container node that is inserted?

1,737 views
Skip to first unread message

Thien Pham

unread,
Mar 13, 2014, 3:16:31 PM3/13/14
to ang...@googlegroups.com
It seems that using Fastclick.js causes the issues the the Place Autocomplete Service from google maps. 

A fix is to add the 'needsclick' class to the dom nodes that is inserted from the autocomplete feature, however, I am unable to get access to the inserted nodes from the autocomplete service. I've tried writing a directive and get errors saying the node is undefined. I am trying to do this without Jquery so found this hack:

The hack works as I am able to modify any other dom element. I just can't modify .pac-container and its child elements.

Thien Pham

unread,
Mar 13, 2014, 4:04:04 PM3/13/14
to ang...@googlegroups.com
Here is the plunkr. You can see I was able to add the class 'needsclick' to the the p.hello element but not the pac-container element.

Reply all
Reply to author
Forward
0 new messages