Hello, I am currently using the gwt maps api (Google Maps 1.0 Library)
to code a hobby application that has a feature which searches for
places of interest.

I would like to be able to search for a place of interest using a
predetermined country.

For example

If I go here:

http://maps.google.com.au (The Australian Google Maps site)

and search for

"the esplanade hotel"

I get the all the "Esplanade Hotel"s in Australia.

This is what I want - plain and simple.

However if I use the Google Maps 1.0 Library and point my script (in
the module file) to the Australian google maps site:

<script src="http://maps.google.com.au/maps?
gwt=1&amp;file=api&amp;v=2&amp;key=<mygooglemapskey>" />


The geocoder returns results from all over the world (Phillapines/USA/
Puerto Rica/etc), and unfortunatley for us Australians - not the one I
was looking for.

Here is the sample code I am using

final Geocoder geocoder = new Geocoder();
geocoder.getLocations(address, new LocationCallback(){

                        @Override
                        public void onFailure(int statusCode) {
                                //this just means the list isn't filled.
                                final Listener<MessageBoxEvent> l = new 
Listener<MessageBoxEvent>
() {
                                        public void handleEvent(MessageBoxEvent 
ce) {

                                        }
                                };
                                MessageBox.alert("Address not found.", 
"Couldn't find the address
\"" + address + "\", did you type it correctly?",l);
                        }

                        @Override
                        public void onSuccess(JsArray<Placemark> locations) {

                        /* locations returned here are from all over the world
how do i restrict the search to just one country? */


                        }



                });


I have also tried setting the

 geocoder.setBaseCountryCode(".au");

and

 geocoder.setBaseCountryCode("AU");

however it makes no difference.

Any help is greatly appreciated!



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to