
849
DEVELOPING
COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Las
t
upda
te
d 8/5/2010
<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:
The format of the returned data depends on how you get the data:
Use the
showmarkerwindow
attribute to control the display of the window.
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:
Parameter name
Description
cfmapname
The name of the map.
cfmaplatitude
The latitude value for the location, in degrees. This value is set as the center of the map.
cfmaplongitude
The longitude value for the location, in degrees. This value is set as the center of the map.
cfmapaddress
The address of the location, which is set as the center of the map.
Bind type
Return value
CFC
A ColdFusion structure. ColdFusion automatically converts the structure for return to the caller.
Alternatively, you can return a JSON representation of the structure.
URL
A JSON representation of a structure. No other body contents is allowed.
JavaScript
A JavaScript object.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...