Google Maps auto-complete not working on Windows Phone?

I use the AutoComplete Google Maps interface to automatically search for locations by user type. It works great on all the browsers I tested (Chrome, FireFox, iOS and newer Android devices), except for Windows Phone.

On a Windows phone, the places_changed event does not fire, and the text field does not automatically update, as in other browsers.

Here's a simplified script demonstrating with a single text field in a form:

<div class="container" style="padding: 40px">
    <label>Enter a location</label>
    <input id="location" value="" class="form-control" />
</div>

<script type="text/javascript"
        src="http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true&libraries=places">
</script>
<script>
    var el = document.getElementById('location');
    var autocomplete = new google.maps.places.Autocomplete(el);

    google.maps.event.addListener(autocomplete, 'place_changed', function () {                
            var place = autocomplete.getPlace();
            if (place.geometry.location)
                // delay setting the value - otherwise maps uses default always
                setTimeout(function() { el.value = place.name; }, 200);
        });
</script>

You can try this: http://embed.plnkr.co/kAwU0Fl97nEQr5HhxOTH/preview

( IE 11, , Windows Phone 8), Windows Phone , , , .

?

+3
1

- ? - Google Autocomplete Places , Windows Phone - Windows.

- Google Places Windows Phone 7.5, Windows Phone 7.8 Windows Phone 8.0

Windows Phone 7.5 ( ), 7.8 8.0 , , .

Windows Phone 8.1 ( , ).

, Windows Phone 8.1 . , Windows Phone 7.5/8 , "Internet Explorer 9" ( ), Windows Phone 8.0 "Internet Explorer 10" ( ). Windows Phone 8.1 "Internet Explorer 11".

2 , (8 ), Google , Windows Mobile IE Browser

Google https://code.google.com/p/gmaps-api-issues/issues/detail?id=6120

, Google - ?

: Google, FAQ Google Maps JavaScript API:

https://developers.google.com/maps/faq#browsersupport

Google iOS Android. API Javscript / Windows.

+3

All Articles