Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/21/d38531796/htdocs/jose/smfforum/Sources/Subs.php on line 3825
Google Maps Address Auto Complete Inside Browser control

Author Topic: Google Maps Address Auto Complete Inside Browser control  (Read 1991 times)

0 Members and 1 Guest are viewing this topic.

Offline Douglas Martin

  • Newbie
  • *
  • Posts: 22
  • User-Rate: +0/-0
    • ProfiTouch
Google Maps Address Auto Complete Inside Browser control
« on: October 09, 2013, 03:16:04 AM »
My PB win app launches a browser control that I have used to  successfully display google maps with directions, etc. I am now trying to implement an Address Auto Complete feature.

The following HTML works fine when I open it in IE, firefox, Chrome, etc. If I open it using my PB app and the browser control I get the input box and can type an address but the dropdown list of potential matches never shows up.

Might have something to do with the google.maps.event.addDomListener(window, 'load', initialize);

Anyone have any suggestions for how to get this to work?

<!DOCTYPE html>
<html>
<head>
<title>Google Maps JavaScript API v3 Example: Places Autocomplete</title>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
<script type="text/javascript">
function initialize() {
var input = document.getElementById('searchTextField');
var options = {componentRestrictions: {country: 'us'}};

new google.maps.places.Autocomplete(input, options);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head> body>
<label for="searchTextField">Please insert an address:</label>
<input id="searchTextField" type="text" size="50">
</body>
Doug