Try http://mapperz.googlepages.com/reverse_with_ads.html
marker is draggable too. change this in your code map.setCenter(new GLatLng(51.6803008,-. 997383), 15); to 51.6803008,-8.997383 map.setCenter(new GLatLng(51.6803008,-8.997383), zoomlevel) That should get you on Ireland. Mapperz http://mapperz.blogspot.com/ On Jun 9, 2:50 pm, Kieran <[email protected]> wrote: > hi guys, I'm a little new to all Google Aps and all. > I have used the example given that allows you to Reverse Geolocate by > clicking on a map, this returns a pointer with the deails of that > position. Perfect, only one thing. When I for example click on Certain > areas ini Ireland (where I'm From), it Jumps to Cork City, 60 odd > miles away. Heres the Code I am using for it. Any input would be > greatly Appreciated > > <script type="text/javascript"> > > var map; > var geocoder; > var address; > > function initialize() { > map = new GMap2(document.getElementById("map_canvas")); > map.setCenter(new GLatLng(51.6803008,-.997383), 15); > map.setUIToDefault(); > map.enableGoogleBar(); > GEvent.addListener(map, "click", getAddress); > geocoder = new GClientGeocoder(); > > } > > function getAddress(overlay, latlng) { > if (latlng != null) { > address = latlng; > geocoder.getLocations(latlng, showAddress); > } > } > > function showAddress(response) { > map.clearOverlays(); > if (!response || response.Status.code != 200) { > alert("Status Code:" + response.Status.code); > > } else { > place = response.Placemark[0]; > point = new GLatLng(place.Point.coordinates[1], > place.Point.coordinates[0]); > marker = new GMarker(point); > map.addOverlay(marker); > marker.openInfoWindowHtml( > > '<b>orig latlng:</b>' + response.name + '<br/>' + > '<b>Reverse Geocoded latlng:</b>' + place.Point.coordinates > [1] + "," + place.Point.coordinates[0] + '<br>' + > '<b>Status Code:</b>' + response.Status.code + '<br>' + > '<b>Status Request:</b>' + response.Status.request + '<br>' > + > '<b>Address:</b>' + place.address + '<br>' + > '<b>Accuracy:</b>' + place.AddressDetails.Accuracy + '<br>' > + > '<b>Country code:</b> ' + > place.AddressDetails.Country.CountryNameCode); > } > } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
