Google Maps - user to pinpoint a location?

I've built a site which uses Maps API for displaying events across the globe (300+ of sport events), so yes, it's possible. The geocoding works really well in general (just as on the Maps site). I've used it with a Map display where the user can drag a marker to adjust the exact location, then saved the coordinates.In this way, you won't really need a 'did you mean?

'-type box.

There is nice example of what you want digitalinspiration.com/community/locatio... Using code like this: var map = null; var geocoder = null; function initialize() { if (GBrowserIsCompatible()) { map = new GMap2(document. GetElementById("map")); map. AddControl(new GLargeMapControl()); map.

AddControl(new GMapTypeControl()); map. SetCenter(new GLatLng(37.4419, -122.1419), 14); map. EnableScrollWheelZoom(); geocoder = new GClientGeocoder(); GEvent.

AddListener(map, "click", clicked); } } function showAddress(address) { if (geocoder) { geocoder. GetLatLng( address, function(point) { if (!point) { alert("We're sorry but '" + address + "' cannot be found on Google Maps. Please try again."); } else { map.

PanTo(point); } }); } } function clicked(overlay, latlng) { if (latlng) { geocoder. GetLocations(latlng, function(addresses) { if(addresses.Status. Code!

= 200) { alert("reverse geocoder failed to find an address for " + latlng.toUrlValue()); } else { address = addresses. Placemark0; var myHtml = address. Address; map.

OpenInfoWindow(latlng, myHtml); } }); } } Should be what you're looking for.

– JohnB Jan 2 at 20:50 code.google. Com/intl/cs-CZ/apis/maps/documentation/javascript/… – Marek Sebera Jan 2 at 20:55 Ok, this is really weird, I can see everything to street level on every other place i've looked (using the top link you gave me), but can't see it in Israel. Can you?

– JohnB Jan 2 at 21:32 I see an Israel street map on maps.google. Com, you probably have to find right overlay ID. – Marek Sebera Jan 2 at 12:55.

I recently wrote and open-sourced an SDK for Google's Geocoding API which should making working with the API a bit easier. Note that this is for the v3 API, whereas in the code above you're referencing the v2 API (which is now deprecated) The API itself will auto-correct typos in the input. So if you wanted to make sure that the user entered a location that was actually a street address, you'd do that like so (with my SDK) $service = new GoogleGeocodeServiceV3( new CurlCommunicator() ); $response = $service->geocode( '123 Any Street, USA' ); if ( $response->isValid() && $response->hasResults() ) { // Is it a street-level result?

If ( $response->assertType( GoogleGeocodeResponseV3::ACT_STREET_ADDRESS ) ) { // Street-level address found } else { // Not a street-level address } } If their typo was so egregious that the API didn't find anything, than $response->hasResults() would return false (or, count( $response ) would be 0).

Thanks! – Or W Jan 9 at 13:22 The lat/lng information is part of the response as well, and available through the SDK. The documentation has more info.

– Peter Bailey Jan 10 at 6:57.

I've built a site which uses Maps API for displaying events across the globe (300+ of sport events), so yes, it's possible. The geocoding works really well in general (just as on the Maps site). I've used it with a Map display where the user can drag a marker to adjust the exact location, then saved the coordinates.

In this way, you won't really need a 'did you mean?'-type box.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions