Geocoder - Maps for multiple Addresses

By nmsinc - October 7, 2011

I have a listing form that saves multiple addresses and I have longitude and latitude fields set for the first address, what should the field names be for the other addresses so that the Geocoder to recognize them?

Thanks

nmsinc
nmsinc

Re: [nmsinc] Geocoder - Maps for multiple Addresses

By robin - October 11, 2011

Hey,

Does the form save all the addresses to a single record in CMS Builder, or are they separate records? For automatic geocoding, the Geocoder is set up to geocode latitude and longditude once for each record.

Thanks,
Robin
Robin
Programmer
interactivetools.com

Re: [nmsinc] Geocoder - Maps for multiple Addresses

By robin - October 12, 2011

That gets much more tricky if they are all one record because it's not automatic. But you can still find the latitude and longitude of any address with the geocodeAddress() function. Here is an example:

list($myLat, $myLng) = geocodeAddress( "1313 South Harbor Boulevard, Anaheim, CA" );
echo $myLat . " " . $myLng;


Hope that helps,
Robin
Robin
Programmer
interactivetools.com