Author: Cătălin Bulancea
For all the Oracle Forms users out there…have you wondered lately what are the key features of Oracle Forms 11g?
Of course, you can read it all from here
. With the increased utilization of Java, web technologies (HTML5) and integration strategies, Oracle Forms 11g tries to keep up with the New. And I feel it succeeds in doing just that!
While integrating Forms with HTML controls is nice, the integration of Oracle Forms with a map displays a spectacular result! It’s time for the main character in this play to step on the stage: Oracle Fusion Middleware MapViewer! See more here
What would an integrated application look like? Let’s suppose you’re a company with multiple offices that provide different services based on the location and office type. Displaying that info in an HTML table doesn’t look very appealing to the customers, while they get lost in the tons of information.
Why not displaying all the office locations on a map? When a customer clicks on a location, an information window provides all necessary information at the first glance. May be also a thumbnail of an image representing the office, as well as a link to a web resource giving even more information.
How is this done?
First, make sure you have an Oracle Database 11g (18.104.22.168 minimum) with Oracle Spatial or at least Oracle Multimedia (which includes Oracle Locator) installed.
Then, you need to have Oracle Forms 11g and install Oracle FMW MapViewer on top of it.
Download MapViewer from here and then install the Mapviewer.ear according to the documentation.
Oracle FMW MapViewer comes with a demo application called MVDEMO (please note that this web resource is not assured to be available 24x7) which is a great way to get you started! After importing the MVDEMO sample data into your database, deploy MVDEMO.war onto a WebLogic Server and configure the data source in the MapViewer Administration Console:
jdbc_host="<YOUR DB HOST>"
jdbc_sid ="<DB SID>"
The samples page will be accessible at this URL:
In Oracle Forms formsweb.cfg configuration file, you add a section as below:
parameter which takes a custom file built on the template basejpi.htm
, called jsmap.html
This is how we display the map, centering it at Oracle Munich office:
mapview = new MVMapView(document.getElementById("map"), baseURL);
//Oracle Munich office
var mpoint = MVSdoGeometry.createPoint(11.56, 48.13, 8307);
mapview.addCopyRightNote("&2014 Powered by Oracle ©2010 GfK GeoMarketing");
If you are asking yourselves where does osmBasemap
come from, this is a custom map tile layer based on the tile configuration. For more details, check out Jayant's post
is the URL where Mapviewer was installed:
<div id="map" style="left:0px; top:0px; width:1250; height:763"></div>
Another example is creating a Feature of Interest (FOI) on the map with the longitude and latitude coordinates given inside the Forms application:
The Forms application eventually looks like this:
Application features used for this demo:
- Zoom in, zoom out from both map and the Forms application
- Pan up, down, left, right from both map (navigation panel) and the Forms application
- Overview map on the right bottom corner with the possibility to move the map
- Scale bar on the left bottom corner of the map
- Copyright note on the right bottom corner
- Features of Interest:
- When hitting "Create FOI" button an image is created on the map at the longitude and latitude coordinates specified as parameters.
When clicking the image an Information Window with Oracle is opened and you can navigate to the webpage
- Hit Remove FOI to delete the feature of interest (needs the id of the FOI)
- Alternatively, you can create other FOIs by specifying different coordinates
- Custom themes: (In Germany appear when selecting the checkboxes "On mouse over" the airports or highways, you'll see their name.)
Feel free to try it out and enhance your Forms application with a nice map.
Any feedback is highly appreciated.