Working with the ADF DVT Map Component

The map component provided by the ADF Faces DVT set of components is one that we are always ending up using in key demos - simply because it is so nice looking, but also because it is quite simple to use.

So in case you need to show some geographical data, or if you just want to impress your manager, here is a little video that shows you how to create two types of maps.

The first one is a color themed map - where you show different states with different colors based on the value of some data point there. The other is a point theme - basically showing specific locations on the map. For both cases I'm using the Oracle provided mapviewer instance at http://elocation.oracle.com/mapviewer.

You can find more information about using the map component in the Web User Interface Developer's Guide here and in the tag doc and components demo.

For the first map the query I'm using (on the HR demo schema in the Oracle DB) is:

SELECT
    COUNT(EMPLOYEES.EMPLOYEE_ID) , Department_name , STATE_PROVINCE
FROM
    EMPLOYEES,     DEPARTMENTS,     LOCATIONS
WHERE employees.department_id=departments.department_id
and Departments.location_id=locations.location_id
GROUP BY Department_name,    LOCATIONS.STATE_PROVINCE


Comments:

Hi Shay,

Thanks for the quick demo on the DVT Map. Is it possible to show the Satellite view on the map component instead of Map View? - Just like Google map, trying to enable the options like "Map View", "Satellite View" in the DVT Map component, but could not find a base map name for the Satellite option.

Thanks,
Jeba.

Posted by Guest on December 15, 2011 at 03:33 AM PST #

Jeba,
I believe that the mapviewer guys added support for layering Google maps see:
http://oraclemaps.blogspot.com/2009/10/google-maps-tiles-in-mapviewer-app.html
http://docs.oracle.com/cd/E14571_01/web.1111/e10145/vis_omaps.htm#BACDBCBI
So you should be asking this on their discussion forum.

Posted by Shay on December 15, 2011 at 03:43 AM PST #

Hi Shay,

is it possible to develop new charts for ADF DVT?

Cheers,

Daniel

Posted by Daniel on May 04, 2012 at 04:41 AM PDT #

Daniel - can you elaborate on what specifically you are looking for?
Are you looking to build a new type of chart that DVT doesn't provide right now? Which one?

Posted by Shay on May 04, 2012 at 10:09 AM PDT #

Basically, charts in OBIEE (therefore DVT) are just fine but what if I need to produce the following chart: http://bit.ly/L9TdOh ?
Since we need to produce industry-specific dashboards... it would be great to be able to use some new charts...

Posted by Daniel on May 04, 2012 at 04:08 PM PDT #

Hi Daniel - I don't think we have a mechanism in place to allow you doing this. I guess you'll need to use some other software solution to generate the image of the graph and then bring it into your ADF Faces application using an af:image component.

Posted by Shay on May 04, 2012 at 04:29 PM PDT #

Hi Shay,

Thanks for the post.

Can we use the "http://elocation.oracle.com/mapviewer" fro production?
we have a requirement to show the information as a pins on the map and user can select a pin and see the information of that pin, as you have shown in the second example.

My another question is, will this behave same in mobile browser? Can we get the zoom in/out and selecting a particular point on map and displaying a tabular info on mobile browsers?

Thanks,
Ravi

Posted by guest on August 02, 2012 at 08:10 AM PDT #

Ravi, you shouldn't be using the elocation server for your production system. For production you'll want to have a local installation of MapViewer on your WebLogic server - get it here:
http://www.oracle.com/technetwork/middleware/mapviewer/overview/index-090261.html

As far as running on mobile devices - The map component is certified on iOS browser see for example:
http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADFFacesTouch/ADFFacesTouch.html
Official Android support is planned for a future patch/version

Posted by Shay on August 02, 2012 at 10:32 AM PDT #

How to add new thematic map or floor plan to use in adf dvt:map ?

Posted by guest on September 29, 2012 at 08:51 PM PDT #

guest - a quick google will bring you to our tutorial on adding Thematic Map:
http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_58/jdtut_11r2_58_4.html

Posted by shay on October 05, 2012 at 10:24 AM PDT #

Sorry, but my question is not how to use the component, but how to add new "custom" thematic map or my own map or my own floor plan. I need to use another country map or another floor design.

thanks in advance.

Posted by guest on October 05, 2012 at 11:32 AM PDT #

guest, we haven't exposed the ability to add your own image for a map to the public yet - this is planned for an upcoming patch.

Posted by Shay on October 05, 2012 at 11:37 AM PDT #

Hello Shay!

Thanks for the tutorial, it was very useful!!!
I'm having a problem that some of the map toolbar buttons are not working... You can check on the Oracle Rich Client demo here:
http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx#%2Fcomponents%2Fmap.jspx

At least here the following buttons are not working (you click and the cursor doesn't change):
- Area
- Distance
- Point Selection
And all the specific forms selector in toolbar...

Do you know how to solve this? Or I'm doing something wrong?

Thanks in advance,
Renan.

Posted by Renan on October 28, 2012 at 11:10 AM PDT #

Renan - seems to be a bug introduced in 11.1.2.3 - I reported it and it should be fixed in the next version. If this is a show stopper for you, please work with Oracle support to escalate and get a patch.

Posted by shay on October 31, 2012 at 10:59 AM PDT #

Hello Shay!

This is very nice post. I want to know, how to get the information of Latitude and Longitude using oracle elocation. I want to store Latitude and Longitude information of difference cities in database.

Regards,
Shaheer Badar

Posted by Shaheer badar on February 28, 2013 at 02:52 AM PST #

The Oracle MapViewer can also provide you with geolocation information in the URL - http://elocation.oracle.com/geocoder/gcserver
You can ask further question on the MapViewer server forum - https://forums.oracle.com/forums/forum.jspa?forumID=727

Posted by Shay on February 28, 2013 at 03:48 PM PST #

Shay, when I tried this exercise using the 11.1.1.7, I am just getting the map and not the color. I got this error in jdev console. DVT-26005: theme "mapColorTheme1" cannot be displayed: row 10 with id=dvt_geomap10 does not have a location value

What does this mean?

Posted by guest on June 05, 2013 at 06:24 PM PDT #

I drag and arop the employeeview1 into panelbox.I want to display the map image(google map).I want to create geographic map it showing the error as
"Failed to retrieve data from MapView server,Please check your map URLs "

Posted by guest on December 02, 2013 at 11:16 PM PST #

guest - you should check the URL you provided for your mapserver and your proxy settings in JDeveloper.

Posted by Shay on December 03, 2013 at 10:20 AM PST #

Shay,

I tried to replicate the same in Jdev 11.1.1.7 and getting following error

java.lang.NullPointerException
at oracle.adfinternal.view.faces.bi.renderkit.geoMap.GeoMapRenderer.encodeColorStyle(GeoMapRenderer.java:2743)

The page just shows the map without any data imposed on it.
Tried with BAR GRAPH themes with different schema but getting same error.

Thanks.

Posted by Hemant on December 07, 2013 at 10:33 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today