cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

geolocation from postcode

jhutson
1-Visitor

geolocation from postcode

Hi All,

Just  a quick enquiry. Has anyone managed to convert a postcode property into geolocation coordinated for use in the google map widget?

I'm hoping there is something obvious I have missed as I have been scouring the internet for suggestions and am getting nowhere.

many thanks

James

3 REPLIES 3
riaanl
7-Bedrock
(To:jhutson)

James, 

The process of converting street addresses and zip codes to geographic coordinates is called geocoding.  There are a number of free and paid webservices/APIs available on the internet (Google, Yahoo, Bing, etc) that will perform the conversion. 


You could use the services in the ContentLoaderFunctions resource to POST to external webservices.  Once you receive the response, you could parse the response for the coordinates and subsequently apply the coordinates to your model/mashups.


Regards,

Riaan



sbeckers
2-Explorer
(To:jhutson)

We're also doing something like this, so I think this should work: http://pastebin.com/22dnQPPz

The key is to set the country and postal_code in the components field, if you just use address you will get locations with the input post code as street number etc.

jhutson
1-Visitor
(To:jhutson)

Fantastic, thanks for your help guys. much appreciated.

Announcements


Top Tags