How to limit google map results to preferred Country?

WebSpider 76 Reputation points
2021-07-22T08:27:15.167+00:00

hi guys.. my code is working. but how can I return Japan Places only?

    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&key=[API KEY]"></script>
    <script type="text/javascript">
        google.maps.event.addDomListener(window, 'load', function () {
            var places = new google.maps.places.Autocomplete(document.getElementById('<%=txtLocation.ClientID %>'));
            google.maps.event.addListener(places, 'place_changed', function () {
                var place = places.getPlace();
                document.getElementById('<%=txtAddress.ClientID %>').value = place.formatted_address;
                document.getElementById('<%=txtLatitude.ClientID %>').value = place.geometry.location.lat();
                document.getElementById('<%=txtLongitude.ClientID %>').value = place.geometry.location.lng();
            });
        });
    </script>
Windows for home | Windows 11 | Apps
Community Center | Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. rbrundritt 20,921 Reputation points Microsoft Employee Moderator
    2021-07-22T15:35:33.72+00:00

    Google Maps is not a Microsoft product.

    For Japan, consider using Bing Maps. It has better data than Google Maps there. https://learn.microsoft.com/en-us/bingmaps/

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.