Monday, November 9, 2009

Embed Google Map in your site using Coldfusion+Javascript or coldfusion9

If you are planing to add google map in your site and you are using coldfusion technology (what ever version it is), this blog is for you.

This will prove "Coldfusion make developer life easy".

Here i have given 2 approaches to embed google map in your site.

The first one is using coldufsion9 cfmap tag library
and the other one is using combination of javascript, coldfusion.
Please have a look into it and make suggestions to make it rich.


1. Generate google map key:

Go to the site "Sign Up for the Google Maps API"
and provide the site for which you are registering at the filed
My web site URL:
and click on Generate API key
you will get the google map key which can be used in the following cfmap example.

2. Know the Longitude and Latitude of the site which you want to render.

centerlatitude="latitude in degrees"
centerlongitude="longitude in degrees"

You have to know the centeraddress(The address of the location, which is set as the center of the map)

cfmap Example1:

<cfajaximport params="#{googlemapkey='ABQIAAAUCIwg8aLWw'}#" />
<cfset this.googlemapkey="ABQIApZi4-VoFLw">

<cfmap name="raghuMap

cfmap Example2:
<cfmap name="raghugmap"
tip="Raghu Map"

with the above example i located rendered karnataka
in india map google map in my site.

Awesome tag right!!
Thanks Coldfusion.

The same functionality using coldfusion(older versions of cf9)+javascript version will be
be updated sooon....

Thank you friends...

Please share your suggestions and user experience when you use cfmap feature.

Happy coding!

Raghuram Reddy Gottimukkula

Adobe Certified Advance Coldfusion Developer,

Software Engineer,


Bangalore Current Time :