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

ColdFusion.Map.getMapObject

Last update:
May 18, 2026

Description

Gets the Google map component. You can manipulate the map using supported Google Map APIs.

Function syntax

ColdFusion.Map.getMapObject("name")

See also

History

ColdFusion 9: Added this function

Parameters

Parameter
Description
name
Specifies the value of the name attribute of the cfmap tag.

Returns

This function returns the Google map component. The map type can be map, satellite, or hybrid.

Example

<h3>This is an example of the Map.getmapObject function. Click the HTML button labeled "GetMap" to get the map object and set the center to Palo Alto.</h3> 
 <script> 
 function getMapObject() 
 { 
 var mapObj = ColdFusion.Map.getMapObject('mapID'); 
 mapObj.setCenter(new GLatLng(37.4419, -122.1419), 13); 
 } 
 </script> 
 <h3>MAP 1</h3> 
 <cfform name="map01"> 
 <cfinput type="button" value="getMapObject and setCenter" name="htmlbutton" 
 onclick="javascript:getMapObject()"> 
 </cfform> 
 <cfmap name="mapID" 
 centerAddress='201 S. Division St. Suite 500 Ann Arbor, MI 48104' 
 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