Adobe COLDFUSION 9 Manual page 854

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
<br>
<cfoutput>
<table>
<tr>
<td bgcolor='red'><h4><font color='white'>URL Bind Example</font></td>
</tr>
</table>
Map Name: #cfmapname#<br>
Latitude, Longitude: (#DecimalFormat(cfmaplatitude)#,#DecimalFormat(cfmaplongitude)#)<br>
Address: #cfmapaddress#<br>
</cfoutput>
The following table provides details of the parameters:
Parameter name
cfmapname
cfmaplatitude
cfmaplongitude
cfmapaddress
The format of the returned data depends on how you get the data:
Bind type
CFC
URL
JavaScript
Use the
showmarkerwindow
The following example uses a bind expression and a CFC to populate dynamic data using a CFC bind expression. The
CFML page contains the following:
<br>
<cfmap
centeraddress="Hobart, Tasmania, Australia"
name="map1"
type="map"
tip="Hobart, Tasmania, Australia"
zoomControl="small3d"
markerbind="cfc:maps.getMapData({cfmapname}, {cfmaplatitude}, {cfmaplongitude},
{cfmapaddress})"
showmarkerwindow = true>
<cfmapitem name="m1" address="Taj Mahal, Agra, India" tip="Taj Mahal, Agra, India">
<cfmapitem name="m2" latitude="40.46" longitude="117.05" showmarkerwindow=true
tip="Great Wall of China, Bejing">
<cfmapitem name="m3" address="Stonehenge, England" tip="Stonehenge, England"
showmarkerwindow = false>
</cfmap>
The map.cfc is as follows:
Description
The name of the map.
The latitude value for the location, in degrees. This value is set as the center of the map.
The longitude value for the location, in degrees. This value is set as the center of the map.
The address of the location, which is set as the center of the map.
Return value
A ColdFusion structure. ColdFusion automatically converts the structure for return to the caller.
Alternatively, you can return a JSON representation of the structure.
A JSON representation of a structure. No other body contents is allowed.
A JavaScript object.
attribute to control the display of the window.
Last updated 8/5/2010
849

Advertisement

Table of Contents
loading

Table of Contents