ColdFusion.Map.setZoomlevel

Description

Sets the zoom level of the map to the new value.

Function syntax

ColdFusion.Map.setZoomlevel("name", zoomLevelValue)

History

ColdFusion 9: Added this function

Parameters

Parameter

Description

name

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

zoomLevelValue

The value of the integer in the zoomlevel attribute of the cfmap tag.

Returns

This function does not return any value.

Example

<h3>This is an example of the Map.setzoomlevel function. Click the Set Zoom Level button to set the zoom level to 6.</h3> 
    <script> 
    function setZoom(zoomlevel) 
    { 
    ColdFusion.Map.setZoomLevel('mapID', zoomlevel); 
    } 
    </script> 
    <h3>MAP 1</h3> 
    <cfform name="map01"> 
    <cfinput type="button" value="Set Zoom Level" name="buttn04" 
    onclick="javascript:setZoom(6)"> 
    </cfform> 
    <cfmap name="mapID" 
    centerlatitude=42.094224 
    centerlongitude=72.339641 
    displayscale=true 
    doubleclickzoom="true" 
    overview=true 
    scrollwheelzoom=true 
    tips="My Map" 
    zoomlevel="4" > 
    </cfmap>