CFGoogleMaps
Use the CFGoogleMaps cfc to create custom Google maps.

Creating a map is as simple as instatiating the object, then calling the init function and outputting the map.

<html>
<body>
<cfscript>
//Create the object cfgm = CreateObject('component','cfgooglemaps');
//Pass the init function your google key and the //lat and lon on which the map should be centered cfgm.init('INSERT GOOGLE MAP KEY',38.898748,-77.037684);
</cfscript>

<cfoutput>
<!--- Now just output the map --->
#cfgm.getMap()#
</cfoutput>
</body>
</html>

If you want to add markers (pushpins) to the map, use the AddMarker function:

cfgm.addMarker(38.898748,-77.037684);

You can also use the addMarkerByAddress function:

cfgm.addMarkerByAddress('1600 Pennsylvania Ave., Washington, DC');

Take a look at the code for more examples.

Take a minute and let me know how you're using the cfc. Also, keep an eye here for updates.

Direct Link for the CFC CFGoogleMaps

BlogCFC was created by Raymond Camden. This blog is running version 5.1.003.