At last nights Orange County ColdFusion Users Group meeting (occfug.org) I presented on the topic of integrating the Google Maps API into a ColdFusion application. I made a custom tag for the presentation that generates a Google API powered map, and I am posting it here for all the people that wanted access to the source code.
The cf_gMap custom tag is used to generate the map and you can add markers to the map by using the cf_gMapMarker tag. In the future I want to add the ability to specify custom icons for the markers but I have not had time for that yet. Also, this tag currently only works with ColdFusion 8 because I used the cfajaxonload function to initialize the map, but that can be easily modified if anyone wants it to work with older versions of ColdFusion. If you have any other suggestions for additional functionality that might be useful, please leave a comment below.
I have been contributing to a similar project started by John Blayter - Perhaps we should pool our resources...
http://www.blayter.com/john/cf_googlemap/
I don't have any time to work on this further right now, but I may do some more with it over the summer since it looks like people are pretty interested in it. I'm not sure if it is RIAForge worthy at this point, but once I have time to add a little more functionality to it, I may consider putting it up there.
do you know where i might find some?
http://checkoutcfc.riaforge.org/
You can also read the tutorial by Scott Pinkston:
http://www.scottpinkston.org/blog/index.cfm/2007/2...
And if that doesn't help you might try commenting on his blog =). Unfotunately, I don't really have any experience with google checkout as of yet so I can't be much help.
I have modified the tag somewhat so that it now has an optional attribute "FitAllPoints" which performs automatic scaling/zooming of the Google Map.
It will Scale/Zoom the map and auto-center the map based on the marker points that are used on the map. Very handy when you're displaying lots of different points.
You can download the tag here:
http://www.itsflying.com/customtags/gMap.zip
Once again thanks for the tag, and I hope this change is useful for you/others.
Cheers,
Chris
Great update to the tag. I've taken the liberty to add a few
more features to it -
- It now does markers or polylines or both
- In the "bubble" when you click on a marker it does the
reverse geo lookup, pulling up the street address
for coordinates
-- I have one glitch here, probably with variable scope
in javascript. If you have a suggestion, see:
http://www.experts-exchange.com/Programming/Langua...
- I want to add color choices & marker choices for the markers
and for the polyline
Once I get it working, I'll post a link to the revised tags
Thanks
Chris Ulrich
http://www.DirectResponseGroup.com
Steve
Do leave a message on here
[email protected]
This functionality is not built into my tag, however a simple solution would be to have your print button open a new window that just displays the map and prints it.