Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
Geocoder - Maps for multiple Addresses

 

 


nmsinc
User

Oct 7, 2011, 2:44 PM

Post #1 of 4 (5144 views)
Shortcut
Geocoder - Maps for multiple Addresses Can't Post

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


robin
User / Moderator


Oct 11, 2011, 9:01 AM

Post #2 of 4 (4910 views)
Shortcut
Re: [nmsinc] Geocoder - Maps for multiple Addresses [In reply to] Can't Post

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


nmsinc
User

Oct 11, 2011, 10:37 AM

Post #3 of 4 (4905 views)
Shortcut
Re: [robin] Geocoder - Maps for multiple Addresses [In reply to] Can't Post

They are saved to one record!


robin
User / Moderator


Oct 12, 2011, 9:05 AM

Post #4 of 4 (4885 views)
Shortcut
Re: [nmsinc] Geocoder - Maps for multiple Addresses [In reply to] Can't Post

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:


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


Hope that helps,
Robin