Oracle Forms 10g- Using Static Google Maps with HTTP geocoding service
Here is an update with the files for implementing a javabean that displays a static google map for a given location.
In a number of back-end applications, users as well as entities are registered with their address information. In some cases, it is desired to provide a visual representation of this address information.
A free service that is provided by Google allows us to obtain the map for a given address as well as additional info such as directions from a given point to this address.
This is a bit difficult to implement in Oracle Forms 10g since the Google API is based on Javascript. In those cases where Javascript is blocked or not possible, Google provides another service which is called Google Static maps.
What this service provides is a static image of the map based on the address information. This can be sufficient in a number of Forms applications.
In this note, we provide a javabean that will display the static map in addition to the latitude and longitude corresponding to the address provided by the user (or fetched from a table).
First, we will use the Google Maps HTTP geocoding service to retrieve the latitude and longitude. Then, we use this data to fetch the static map from the Google static map service.

This javabean can be used either with the SUN JRE or Oracle Jinitiator. It has been tested with Jinitiator 1.3.1.22 and 1.3.1.29.
Download the jar, java file, sample FMB and the technical note
Please note that the javabean has also been submitted to the Pluggable Java Component & JavaBean ’s library website maintained by Francois Degrelle.
Make A Comment: ( 31 so far )
31 Responses to “Oracle Forms 10g- Using Static Google Maps with HTTP geocoding service”
Sven Smets
January 8th, 2009
Hi Sven,
From the Google Static Map website, I have this info regarding the image size:
Image Sizes
Images may be retrieved in sizes up to 640 by 640 pixels. The size parameter takes a string with two values separated by the x character. 640×640 is the largest image size allowed.
So I guess, it causes problems with the size you selected.
I will test the bean with different sizes and will report the results here.
Thanks
degenio_mhafod
January 8th, 2009
Yes, the size is causing your loss of connection. I will make a change so that the size is checked when the bean is instantiated.
Hafed
January 8th, 2009
I updated the size handling. Please see changelog.txt for the changes. Use the above link to download the new version. Thanks.
Hafed
January 12th, 2009
Dear Sir / Madam ,
I have checked the gmap form in oracle. Can it be possible to enable dragging facility in this.
Thanks
Amit
January 19th, 2009
Hi Hafed,
I already done it with your Installing the JAR,
When I is exec.. this form, it show the error msg “FRM-13008: Cannot find JavaBean with name ‘oracle.forms.jv.StaticGMap.’ “.
Is there any others step I miss it?
Venassa
January 30th, 2009
@Venassa: did you follow the technical note. Most likely, you did not include the jar name in the formsweb.cfg file. There is a line there that starts with archive_jini. You should include gmap.jar there.
Also, make sure that you are using the right one at runtime. For example, if you have a number of named config, gmap.jar should be added to the config you are using at runtime.
Hafed
January 30th, 2009
Hi Hafed,
Appreciate your answer.
It’s a great help to me for resolving
my problem.
Thank you again.
Venassa
February 2nd, 2009
Dear Hafed,
Thanks for the great bean.
I have a question. Google map cover “user created content” in http://maps.google.com.
Can I utilize this feature in your bean ?
Because by utilizing this feature I am able to view the mostly location which I want.
Regards
Fahed
February 14th, 2009
First of all this is an excellent Bean!. However, I have a problem in that when I add any extra text to search on I get a Legal Problem exception. I used:
10+downing+street,+,+UK,+funeral directors&output=csv&1|10||true|false||ABQIAAAAE3WfGRybLGo3GgMf9MvRERQo7gT_lO3wObmJAt4dnZGByIpzGxREhPKSCS7cMD3bG-c2bxqrq-KZxQ
Do you know why this is and is there a workaround?
keni robson
February 26th, 2009
Hi. Thnx for your JB.
Hafed, how can i use LATITUDE & LONGITUDE instead ADDRESS. It is possible?
Thnx. Good luck!
observer
February 27th, 2009
It is a good news, Hafed. Thnx. I will wait as long as nesessary!
observer
February 27th, 2009
hi
i want to run or implement java beans in developer 10g
please someone send me steps regarding that?
my email is smalipaki@yahoo.com
thanx in advance
Ali
March 9th, 2009
can anybody tell me about ‘how to put image in oracle forms builder 6i’
sreeramgarapati
April 21st, 2009
I have tried running this but
no luck yet. I downloaded the
zip file and put the gmap.jar
in my forms/java directory.
Also put it in my archive in
the formsweb.cfg but when I
run the form and press the
button nothing happens. What
could be the issue?
Syed
June 9th, 2009
Everything works now as expected. I think the issue had to do with the signed version of the JAR file. But thanks a lot.
Syed
June 10th, 2009
hi Hafed ,
pl,how can i use this Java bean in oracle forms6i .
mudd
June 13th, 2009
hello sir,
My name is Aamir, i am working as Oracle Developer in Doha, Qatar.
Actually sir, i need your help, i wanted to get the static map through longitude and latitude.. i am not using location and anything else. we got address with Google longitude and latitude. Kindly help me with this matter as i am facing problem understanding this java bean.
Thanks and Regards,
Aamir Arif
aamir_ocppk@hotmail.com
Aamir
June 13th, 2009
This does not seem to be in line with http://code.google.com/intl/fr/apis/maps/terms.html
10.8 use the Static Maps API other than in an implementation in a web browser.
So to be used with ‘care’.
Mario
July 16th, 2009
Hello, Everybody
Thanks for the great bean
I’ve implemented it, but when i complier it get this error
Error geocoding from Google. java.net.UnknowHostException: maps.google.com
Could you help me how to configure this error ? who know how to configure please send email to me.
that’s a very very kind of your
thank you very much..
ps : i’am waiting for answer….
jaroanchai
August 20th, 2009
Hi, I’ve implemented it in my application and it worked fine until a few days ago. I now get the error : Error geocoding from Google. java.io.IOException: Bad Key. It’s on a tabbed canvas. When I go to another tab and back I see the map. What could that be?
Sascha
October 25th, 2009
Hi Hafed
I’m facing the following error: “Error geocoding from Google. java.io.IOException: Legal problem”.
Here is my URL:
http://maps.google.com/maps/geo?q=Bahnhofstrasse,+Wien,+&output=csv&|17|satellite|true|false|ABCDMYKEY
Do you know why this is and is there a workaround?
Simon
Simon
December 10th, 2009
Very nice
Arif
February 4th, 2010



Hi Hafed,
Thanks for the great bean.
I’ve implemented it in an existing form and it works fine if I don’t make the map/bean area too big. When I enlarge it, let’s say 800×600 pixels, it crashes (and even for smaller sizes). I loose my connection to the application server.
Any ideas why this can happen ?
Kind regards,
Sven