The ColdFusion Sample Application
|
71
The ColdFusion sample application sends a request to the page
featureInfo.cfm
in the Feature Info frame. As this page is parsed, the map is
cleared, a feature_info request is sent to Autodesk MapGuide LiteView, and
the XML result is captured.
featureInfo.cfm
has a custom embedded Java tag that represents the parseXml
Java class (not a Java servlet). The Java class uses the XML, a style-sheet vari-
able, and Xerces and Xalan to parse XML and XSL to create an HTML stream.
The custom tag embeds the HTML, which describes the feature information,
directly in the page. After the ColdFusion page is loaded completely, the
onload
tag calls the JavaScript function,
showMapSelected():
function showMapSelected(layer,id)
{
var selectFeatureRequest = "map.cfm?FEATURELAYER=" + escape
(layer) + "&ID=" + id + "&BBOX=<cfoutput>#Form.bbox#
</cfoutput>&MODE=identify";
parent.map.document.location = selectFeatureRequest;
}
<body onload = "showMapSelected(getLayer(),getId())">
The function
showMapSelected()
sends a request to
map.cfm
, which formulates
the correct request to show the selected feature on the map.
The custom Java tag, embedded in the page, handles XML received by the
CFM in response to a feature_info request. When the ColdFusion server reads
this tag, it executes a small Java class method that accepts XML and a style
sheet as input and returns HTML to the ColdFusion page.
The following diagram shows the process of requesting feature information.
Содержание 15606-011408-9330 - MAPGUIDE R6.3 SITE LIC-UPG R6
Страница 1: ...April 2004 Autodesk MapGuide LiteView Developer s Guide ...
Страница 12: ...8 Chapter 1 Introduction ...
Страница 38: ...34 Chapter 2 Understanding Requests ...
Страница 90: ...86 Chapter 4 Configuring and Using the Sample Applications ...