Setting the map type on a Google Map using ColdFusion

Readability

Setting the map type on a Google Map using ColdFusion

The fol­low­ing exam­ple shows how you can set the map type on a Google Map in Cold­Fu­sion by using the <CFMAP> tag and set­ting the type attribute to “map”, “satel­lite”, “hybrid”, “ter­rain”, or “earth”.








And the out­put of the <CFMAP> tag is as fol­lows:

The following example shows how you can set the map type on a Google Map in ColdFusion by using the <CFMAP> tag and setting the type attribute to “map”, “satellite”, “hybrid”, “terrain”, or “earth”.

<cfajaximport params="#{googlemapkey='YourGoogleMapsAPIKeyHere'}#" />
 
<cfparam name="URL.mapType" default="map" type="string" />
 
<div style="background-color:#EEEEEE; padding:5px; width:390px;">
    <a href="?mapType=map">map</a>
    <a href="?mapType=satellite">satellite</a>
    <a href="?mapType=hybrid">hybrid</a>
    <a href="?mapType=terrain">terrain</a>
    <a href="?mapType=earth">earth</a>
</div>
 
<cfmap name="map01"
        centeraddress="Hawaii"
        type="#URL.mapType#"
        zoomLevel="7" />

And the output of the <CFMAP> tag is as follows:

Leave a Reply

Your email address will not be published.