Sorry. You have to register then login to submit a marker. After you login if you zoom out and click on the US it gives an error, but if you click on Mexico it doesnt...
On May 4, 11:11 am, "[email protected]" <[email protected]> wrote: > On May 4, 10:05 am, Ivan <[email protected]> wrote: > > > Hi, > > > Does anyone know why my geocoder below gives an error when clicking on > > a point that is on the US? > > > I click anywhere on the map of Mexico and this works well to return > > the country code. > > When I click on the US I get an error. > > I don't get any errors when I click on the US. > > > > > My site ishttp://www.belizemapia.com/index4.html > > > Register then login then submit and click on the map on US or Europe > > for the error. > > Why do I have to login? If you post an example that doesn't require > login and exhibits the error, I may investigate further. > > -- Larry > > > > > > > Function is below. > > > function showAddress(point) { > > > var geocoder = new GClientGeocoder(); > > > geocoder.getLocations(point, function (result) { > > if (result.Status.code == G_GEO_SUCCESS) > > { > > // Loop through the results, looking for the one with Accuracy = > > 1 > > for (var i=0; i<result.Placemark.length; i++) > > { > > var accuracy = result.Placemark[i].AddressDetails.Accuracy; > > if (accuracy == 3) { > > var north = result.Placemark[i].LatLonBox.north; > > var south = result.Placemark[i].LatLonBox.south; > > var east = result.Placemark[i].LatLonBox.east; > > var west = result.Placemark[i].LatLonBox.west; > > var countrybounds = new GLatLngBounds(new GLatLng > > (south,west), new GLatLng(north,east)); > > } > > thecountry = result.Placemark > > [i].AddressDetails.Country.CountryNameCode; > > } > > } > > else{ > > thecountry="00"; > > } > > parent.document.getElementById("country_codebx").value = > > thecountry; > > > }); > > > }- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
