Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to create custom maps in Apex4.0 ?

RoesJun 30 2010 — edited Aug 10 2012
I want to use the custom maps in Apex4.0.
How do I add my own map to use ?
I want to use it to display process data from a production process .

Thanks

Comments

Hi,

The APEX 4.0 map suite can be extended to include additional maps, if you wish. Any additional .amap files would need to be generated using the AnyChart Flash Map Converter - http://www.anychart.com/products/anymap/converter/ - to convert ESRI Shapefiles (*.shp) into .amap files. We currently ship with AnyChart's suite of 300 .amap files, all of which are available for selection in our wizards. These map files can be found in the /images/flashchart/swf/maps folder of your APEX install. New maps could be added under this folder, and can then be referenced via custom XML on the Map Attributes page. If you intend on generating additional maps, then I would recommend that you review AnyChart's Map Converter Usage Tutorial - http://www.anychart.com/products/anymap/converter/help/tutorial.html. AnyChart's documentation lists a number of site from which you can download Shapefiles, which can be converted to .amaps.

To use a new .amap file in an application, you can do the following:

1) Add the new .amap file to the /images/flashchart/swf/maps/europe folder.
2) Create a map page in your application, and then edit the map.
3) On the Map Attributes page, in the "Map XML" region, set "Use Custom XML" to Yes.
4) In the Custom XML region, change the <map_series> tag to reference your new .amap file, say europa.amap:

+<map_series source="*europe/europa.amap*" id_column="ATLAS_P" labels_display_mode="RegionBounds">+

5) Click Apply Changes, to save these settings.
6) Edit the Map Series query to reference column information specific to the .amap file.
For example, I followed AnyChart's tutorial to generate a new europa.amap file, which is based on the Europa Shapefile, that I downloaded from one of the sites listed in the AnyChart documentation. While using the AnyChart Map Converter, I selected the columns that I wish to be used for grouping regions (see http://www.anychart.com/products/anymap/converter/help/tutorial.html#grouping). The europe.amap file has a column called 'ATLAS_P', which contains country names that I can reference in my SQL query, in order to associate data with those unique points on the map. The Map series query can then be updated to something similar to the following:

SELECT NULL LINK, COUNTRY Region, PEOPLE Populations
FROM (
SELECT 'Ireland' country, 4203200 people
FROM dual
UNION ALL
SELECT 'U.S.S.R.' country, 307896743 people
FROM dual
UNION ALL
SELECT 'Sweden' country, 61113205 people
FROM dual
UNION ALL
SELECT 'France' country, 8210281 people
FROM dual)

where the country values correspond with data stored in the ATLAS_P column of the .amap file.

NOTE: the column and data information associated with each AnyChart .amap file is stored in the wwv_flow_flash_map_regions table. I would recommend that while converting your Shape Files, take note of the selected columns associated with your new .amap file e.g. ATLAS_P, and also the data e.g. 'France'. In order to associate data with points on your map, you must reference valid data stored in your map.

7) Click Apply Changes, to save this new query.
8) Run the map, and note your new map is now being used, with various regions with associated data from the map query highlighted on the map.

If you wish to simply reference the new .amap file from somewhere else on your file system, you would need to update the <settings> tag in your Custom XML to include the following:

+<settings>+
+<animation enabled="false"/>+
+<maps path="C:\europa.amap" path_type="Absolute" />+
+</settings>+

where the new <maps> tag is providing the location of the .amap file.


I hope this helps.
Regards,
Hilary
954129
Hi Hilary

I've converted my ESRI shapefiles into .amap format with the id_column being block following your instructions on the way you did it. However I've ran into some problems.

When I edit the map XML
<map_series source="custom/block.amap" id_column="block" labels_display_mode="RegionBounds">
..I get the following error "error loading file http://127.0.0.1:8080/1/flashchart/swf/maps/custom/block.amap"

So then I tried to edit the XML further
<settings>
<animation enabled="false"/>
<maps path="C:\custom\block.amap" path_type="Absolute" />
</settings>
...and I get the following error "Flash Security Error:
AnyChart can not be launched due to Flash Security Settings violation.
Please refer to Security Error Article in AnyChart Documentation to fix this issue"


Error loading file:
http://127.0.0.1:8080/apex/apex_uitl.flash?p=101:24;7796246766118370:FLOW_FLASH_CHART5_R6219613890840822_en

I'm not sure what the next moved is...I've tried using the MAP xml that was generated from anychart when the shapefiles were converted but it also has an error "XML parser error: element not defined"

Can you help me? Your help will be appreciated.

Edited by: Nelz on Aug 10, 2012 8:34 AM
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 3 2012
Added on Jun 30 2010
2 comments
2,280 views