A Javabean to handle Google Maps
By francois degrelle on Friday, March 27 2015, 15:34 - PJC - Javabean - Permalink
Purpose
Here is a Java bean that allows to have an enhanced Web Browser able to display and handle Google maps.
It is a full Web browser that can handle Javascript.
The enhanced Web browser JAR comes from the JDIC sourceforge project.
The implementation class of the Bean Item
oracle.forms.fd.GMapBrowser
The methods you can call
- Get the Forms Window
Set_Custom_Property( 'BL.BEAN', 1, 'INFOBEAN', '' ) ;
This mathod
is used to retrieve the Forms window that handles the webBrowser, then
synchronize its position when the windows is moved.
This must be the first property set (in the When-New-Form-Instance trigger).
SET_HTML_CONTENT
SET_JAVASCRIPT
- Set the URL/File
Set_Custom_Property( 'BL.BEAN', 1, 'SET_URL', 'url | file_name' ) ;
e.g. :
Set_Custom_Property('BL.BEAN', 1, 'SET_URL', 'http://www.developpez.com/' ) ;
Set_Custom_Property('BL.BEAN', 1, 'SET_URL', 'd:/mypage.htm' ) ;
- Set the border of the bean
Set_Custom_Property( 'BL.BEAN', 1, 'SET_BORDER', 'true | false' ) ;
When
you want to use this bean to display a Flash image (*.swf), you would
probably prefer not to have any border bounding the image.
In this case, set the border to false.
- Basic navigation
Set_Custom_Property( 'BL.BEAN', 1, 'SET_NAVIGATION', 'back | forward | refresh' ) ;
The sample dialog
. Download the gmapbrowser.zip file
. Unzip the files
. copy the JDICplus.jar and GMapBrowser.jar files in the <ORACLE_HOME>/forms/java directory
. Edit your /forms/server/formsweb.cfg file to add these 2 jar files to the archive tags
. Add the 2 .dll files jdicArc.dll and jdicWeb.dll (from the JDICplus-0.2.2-bin-win32.zip file) to your Windows/system32 directory
. Open the GMapBowser.fmb module (Oracle Forms 10.1.2)
. Compile all and run the module
The .jar files must be signed
The GMapBrowser.jar and JDICplus.jar files provided with the .zip file are already signed