Just figured out a solution also.

Basically, I'm just using the javascript geocoder then pushing that
value into a form field where we're posting it to the database.  Note
that you have to use setTimeout to give the Google server time to
respond:

  <script src="http://maps.google.com/maps?
file=api&amp;v=2.x&amp;key=ABQIAAAAvIjEakkmm-
EurjFnU5tBTRRJUD9vj8SLOqYRkMQVYd6-Xn0fFxR9sqKM_MmqaTrAVKAGA8K-UA78Ig"
type="text/javascript"></script>
    <script type="text/javascript">

    var map = null;
    var geocoder = null;
        var newPoint = null;

    function initialize() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(30.617038, -96.34679), 11);
        geocoder = new GClientGeocoder();
      }
    }

    function showAddress(address) {
      if (geocoder) {
                newPoint = geocoder.getLatLng(address,function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
                          map.addOverlay(marker);
                          marker.openInfoWindowHtml(address);

                          newPoint = point;
            }
                        return rPoint;
                        return newPoint;
          }
        );

                newPoint = newPoint;
      }
    }

        function formFill(form){
                var geocoder_addy = form.street.value;
                geocoder_addy = geocoder_addy + " , " + form.city.value + " , " 
+
form.state.value + " , " + form.zipcode.value;

                showAddress(geocoder_addy);

                setTimeout('document.listing_form.geocode.value = 
newPoint;',500);
        }

On Jul 16, 3:34 pm, Andrew Leach <[email protected]>
wrote:
> On Jul 16, 8:12 pm, Barry Hunter <[email protected]> wrote:
>
> > First point of
> > contact is probably Pamala Fox - and just mentioning her name should
> > be enough get the thread noticed.
>
> Er... yes, but it's Pamela. She may not answer to anything else :-)
>
> Andrew
--~--~---------~--~----~------------~-------~--~----~
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