-
1 Jun 2012 6:23 AM #1
Unanswered: How to get google.maps.places.Autocomplete working on iOS?
Unanswered: How to get google.maps.places.Autocomplete working on iOS?
We want to use the google.maps.places.Autocomplete functionality in a Sencha app. It's working on Chrome/PC and Safari/OSX. But on a iOS (tested v5.1) it is not working properly: if you type something in the box and taps on one of the suggestions in the suggestion box (generated by google) then the selected suggestion is not taken: the suggestionbox disappear and nothing happens. It looks like some blur/focus event of Sencha is fired before google can/will handle the touchstart (?) event. To reproduce we have created the folowing testcode (removed Sencha text field and Map and uses plain input box but placed in a Sencha container):
app.js:
app/view/MyContainer.jsCode:Ext.Loader.setConfig({ enabled: true }); Ext.application({ views: [ 'MyContainer' ], name: 'GMap', launch: function() { Ext.create('GMap.view.MyContainer', {fullscreen: true}); } });
If you use this without Sencha it works.Code:Ext.define('GMap.view.MyContainer', { extend: 'Ext.Container', alias: 'widget.myContainer', config: { html: '<div> <input id="searchTextField" type="text" size="50"> </div>', listeners: [ { fn: 'onContainerInitialize', event: 'initialize' } ] }, onContainerInitialize: function(component, options) { var input = document.getElementById('searchTextField'); var autocomplete = new google.maps.places.Autocomplete(input); } });
Does anyone know how to make this work on iOS? Any suggestion where to look ?
-
26 Jun 2012 10:07 AM #2
did you find a solution to this?
did you find a solution to this?
I'm banging my head against the wall with this one as well, have you managed to get anywhere?

-
27 Jun 2012 12:30 AM #3
-
27 Jun 2012 4:41 AM #4
-
27 Jun 2012 5:09 AM #5
How are you currently working around it? Or are you not and you're just not allowing the auto address validate?
-
27 Jun 2012 6:05 AM #6
We postponed it, working on other functionalities. But we have to pick it up again in the near future and see if we can solve it or working around it......
-
29 Jun 2012 11:19 PM #7
I'd be very interested to hear where you end up with this, I'm currently contemplating writing my own textbox/selectbox that places requests manually on keyup (basically re-inventing the wheel) which is bound to be less efficient and clunky
-
8 Jul 2012 10:50 PM #8
-
14 Aug 2012 11:05 AM #9
Any update
Any update
Hey ivo_centric have you guys figured this out yet? we are running into the exact same problem...having to use the search keyword functionality that Google provides, but that is infinitely worse than autocomplete. Its a workaround, but I'd rather not --
-
3 Feb 2013 6:06 AM #10
You can get Google Places Autocomplete to work with Sencha by setting the viewport's 'autoBlurInput' config value (from viewport/Default.js) to false in your Ext.application() (or Ext.setup()) statement.
Change viewport/Default.js as below
Ext.application({
viewport: {
autoBlurInput: false
}
});
Note that autoBlurInput is market as private so use at your own risk.


Reply With Quote

