How to: Use the Google Maps API geocode service in Servoy

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

How to: Use the Google Maps API geocode service in Servoy

Postby agiletortoise » Wed Jan 02, 2008 8:19 pm

I've posted a small module that demonstrates how to utilize the Google Maps API geocoding services from within Servoy, using HTTP REST calls.

You pass in an address string, and get back a lot of useful information including longitude/latitude, postal codes, county, etc.

Google Maps conveniently will provide JSON formatted results, so it's quite easy to parse and use in Servoy.

Download the module here:

http://greg.agiletortoise.com/software/ ... d_geocode/

It's got a test form that demostrates usage, but you will need to signup for a Google Maps API key, which you can do here:

http://code.google.com/apis/maps/signup.html

Enjoy...

greg.
Greg Pierce
Agile Tortoise
SAN Developer
http://www.agiletortoise.com
User avatar
agiletortoise
 
Posts: 278
Joined: Wed Oct 12, 2005 3:26 pm
Location: Texas, USA

Postby bcusick » Wed Jan 02, 2008 9:09 pm

Greg - THANKS very much for taking the time to code this terrific example! It's very handy - and it's a great example of how easy it is to use Web Services from within your Servoy application.

NICE STUFF!
Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Re: How to: Use the Google Maps API geocode service in Servo

Postby Robert Huber » Tue Jul 22, 2008 9:44 am

Hi Greg

Thanks for the example. I am wondering to what URL did you bind the Google maps API key? Obviously, I like to run it on one of our internal server, and this server does not have a domain name, just an IP address. And it is also not freely accessible as stated in the license term.
Does it matter to which URL the API key is licensed or can it just be the companies URL?

Best regards, Robert


agiletortoise wrote:It's got a test form that demostrates usage, but you will need to signup for a Google Maps API key, which you can do here:

http://code.google.com/apis/maps/signup.html

Enjoy...

greg.
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Postby agiletortoise » Tue Jul 22, 2008 5:38 pm

It does need to resolve to the machine being used to make the calls, or you get an unauthorized client message, I believe. I'm not positive about that, however.

greg.
Greg Pierce
Agile Tortoise
SAN Developer
http://www.agiletortoise.com
User avatar
agiletortoise
 
Posts: 278
Joined: Wed Oct 12, 2005 3:26 pm
Location: Texas, USA

Postby Robert Huber » Tue Jul 22, 2008 5:49 pm

But to what URL did YOU bind the key? I mean, the internal server running the Servoy application server normally does not function as a host web server at the same time, does it?
So I am wondering whether I should use the servers IP address, because as developer we have to develop and test first before we deploy the application, don't we?

Best regards, Robert



agiletortoise wrote:It does need to resolve to the machine being used to make the calls, or you get an unauthorized client message, I believe. I'm not positive about that, however.

greg.
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Postby agiletortoise » Tue Jul 22, 2008 5:59 pm

Actually, thinking about it, for the geocoder calls, I believe anything will work just fine.

It is, of course, technically a violation of the usage terms if you are using it on a purely internal app. But, they'll let you do it as long as you stay within the allowed number of requests per time period.

You run into the enforcement issue if you are actually display and manipulating maps in a browser interface.

greg.
Greg Pierce
Agile Tortoise
SAN Developer
http://www.agiletortoise.com
User avatar
agiletortoise
 
Posts: 278
Joined: Wed Oct 12, 2005 3:26 pm
Location: Texas, USA


Return to How To

Who is online

Users browsing this forum: No registered users and 7 guests