Whatever message this page gives is out now! Go check it out!

ColdFusion.Map.addMarker

Last update:
May 18, 2026

Description

Adds a marker to the map.

Function syntax

ColdFusion.Map.addMarker(name, markerObj)

See also

History

ColdFusion 9: Added this function

Parameters

Parameter
Description
name
Specifies the value of the name attribute of the cfmap tag.
markerObj
Specifies the marker object for a given address. The following are the associated properties: latitude, longitude, address, title, markercolor, markericon, address, markerwindowcontent, and showmarkerwindow

Returns

This function does not return a value.

Example

<h3>This is an example of the Map.addmarker function. Click the HTML button labeled "Add marker" to set the marker to the specified Address.</h3> 
 <script> 
 var markerObj={ 
 address: '201 S. Division St. Suite 500 Ann Arbor, MI 48104' 
 }; 
 function addmarker(){ 
 ColdFusion.Map.addMarker('mapID', markerObj); 
 } 
 </script> 
 <h3>MAP 1</h3> 
 <cfform name="map01"> 
 <cfinput type="button" value="Add marker" name="markerbutton" 
 onclick="javascript:addmarker();"> 
 </cfform> 
 <cfmap name="mapID" 
 centerlatitude=42.261 
 centerlongitude=-87.717 
 displayscale=true 
 doubleclickzoom="true" 
 overview=true 
 scrollwheelzoom=true 
 tips="My Map" zoomlevel="4"> 
 </cfmap>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page