ColdFusion 9.0 Resources |
ColdFusion.Map.setCenterDescriptionSets the center of map to the address that you specify. Function syntaxColdFusion.Map.setCenter("name", centerConfigObject) See alsoColdFusion.Map.addMarker, ColdFusion.Map.getLatitudeLongitude, ColdFusion.Map.getMapObject, ColdFusion.Map.setZoomlevel HistoryColdFusion 9: Added this function Parameters
ReturnsThis function does not return any value. Example 1<h3>This is an example of the Map.setcenter function using latitude-longitude and address values</h3> <script> var centerLongLat={ latitude: 71.094224, longitude: 42.339641 }; var center={ address: '345 Park Avenue, san jose, CA 95110-2704, USA' }; function setcenter() { ColdFusion.Map.setCenter('mapID', centerLongLat); } function setcenterlatlong() { ColdFusion.Map.setCenter('mapID', center); } </script> <h3>MAP 1</h3> <cfform name="mapID"> Click this button to set the center using Latitude and Longitude. <cfinput type="button" value="setCenter using lattitude-longitude" name="buttn01" onclick="javascript:setcenterlatlong();"> <br>Click this button to set the center using Address. <cfinput type="button" value="setCenter using Address" name="buttn01" onclick="javascript:setcenter();"> </cfform> <cfmap name="mapID" centerlatitude=71.094224 centerlongitude=42.339641 displayscale=true doubleclickzoom="true" overview=true scrollwheelzoom=true tips="My Map" zoomlevel="4"> </cfmap> |