Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now

Loading Google maps with markers onto a page


From:

ColdFusion 9 New Features

with Daniel Short

Video: Loading Google maps with markers onto a page

ColdFusion is about making hard things easy. And this is just one more example of ColdFusion making it almost too easy, to add very powerful functionality to your applications. While getting a simple Google Map on to a page has never been terribly difficult, ColdFusion makes it possible in just one line of code, and then goes on to make a completely trivial to add markers and other advanced functionality to your Google Maps. Now the first thing you need before you start using Google Maps is a Google Maps API key. So to get that we are going, to go to Safari, and I will open a new tab and go to google.com/apis/maps/signup.html.
Expand all | Collapse all
  1. 4m 30s
    1. Welcome
      53s
    2. Using the exercise files
      3m 37s
  2. 7m 49s
    1. Adding managing and comparing servers
      5m 26s
    2. Monitoring server health
      2m 23s
  3. 22m 10s
    1. Setting the default data source and SMTP
      5m 6s
    2. Getting programmatic debugging and exception handling
      5m 54s
    3. Reviewing the new onCFCRequest method
      5m 29s
    4. Using ApplicationStop()
      2m 24s
    5. Working with Server.cfc and onServerStart
      3m 17s
  4. 17m 45s
    1. Using ternary and chained operations
      5m 46s
    2. Using New and Import
      4m 2s
    3. Reviewing CFScript enhancements
      7m 57s
  5. 20m 23s
    1. Building with implicit getters and setters
      4m 26s
    2. Working with LOCAL scope in functions
      4m 35s
    3. Serializing objects
      6m 6s
    4. Writing components in CFScript
      5m 16s
  6. 19m 27s
    1. Getting started with ORM
      5m 51s
    2. Logging ORM activity
      2m 13s
    3. Saving objects to the database
      6m 10s
    4. Defining table relationships
      5m 13s
  7. 16m 59s
    1. Caching page fragments
      5m 29s
    2. Managing the cache
      4m 48s
    3. Working with in-memory files using VFS (RAM disks)
      6m 42s
  8. 12m 39s
    1. Working with Excel spreadsheets
      4m 56s
    2. Working with Word documents
      4m 4s
    3. Working with PowerPoint presentations
      3m 39s
  9. 28m 59s
    1. Loading Google maps with markers onto a page
      4m 53s
    2. Adding a Flash movie with the built-in FLV player
      2m 14s
    3. Using multi-file upload control
      6m 7s
    4. Building a progress indicator
      3m 37s
    5. Working with accordion layouts
      3m 19s
    6. Showing information with data grid enhancements
      5m 1s
    7. Informing users with Confirm Alert and Prompt dialog boxes
      3m 48s
  10. 9m 8s
    1. Accessing IMAP accounts
      6m 31s
    2. Working with the new array functions
      2m 37s
  11. 15s
    1. Goodbye
      15s

please wait ...
Watch the Online Video Course ColdFusion 9 New Features
2h 40m Intermediate Oct 05, 2009

Viewers: in countries Watching now:

In ColdFusion 9 New Features, author and developer Dan Short has gathered together the important updates and improvements in this dynamic web application. Dan showcases the new ColdFusion Builder application throughout the course, using it to work through the new language and CFScript enhancements in this release. He shows how to use the new Server Manager to compare servers and create server groups, as well as monitor server health through notifications. He also explains the new integration with Office applications, building Excel, Word, and even PowerPoint files on the fly from ColdFusion. Finally, he covers the important new Object Relational Mapping feature and how to use the built-in Flash Player. Exercise files accompany this course.

Topics include:
  • Using new implicit Getters and Setters in ColdFusion Builder
  • Utilizing RAM disks using VFS
  • Managing the system cache to boost site/application performance
  • Learning the new ternary and chained operations
  • Loading detailed Google maps with markers and notations onto a web page
Subjects:
Developer Web
Software:
ColdFusion
Author:
Daniel Short

Loading Google maps with markers onto a page

ColdFusion is about making hard things easy. And this is just one more example of ColdFusion making it almost too easy, to add very powerful functionality to your applications. While getting a simple Google Map on to a page has never been terribly difficult, ColdFusion makes it possible in just one line of code, and then goes on to make a completely trivial to add markers and other advanced functionality to your Google Maps. Now the first thing you need before you start using Google Maps is a Google Maps API key. So to get that we are going, to go to Safari, and I will open a new tab and go to google.com/apis/maps/signup.html.

On this page you will get some information about Google Maps and you will need to agree to their terms of service. And then provide a website URL that you are going to be using for your application. In this case, we are doing localhost: 8500 and I'll click Generate API Key. And I get a nice long string that I am going to put into my application. I have two different ways I can do this. The first is directly to the ColdFusion Administrator. On the Settings page, if I scroll down to the bottom there is a Google Map API Key field.

And I need to paste API Key in here and click Submit. Every application on the server will then use this Google Map API Key by default. Now an API Key is only good for specific domain, so if you are running multiple domains off the same ColdFusion server, this is not the place to specify it. So I am going to undo and instead go back to CF Builder and in the Chapter8 folder, open Application.cfc. At the top with the rest of our settings, we are going to add, cfset this.googlemapkey=, and put in our Key.

Now this Key will be used for every Google Map on this particular application. So let's get our map running. I am going to go to googlemaps.cfm. And you will see I have a cfmap tag with a centeraddress attribute. And I am just putting the center of the map at the lynda.com offices here in Ventura, California. So let's go to the browser because this doesn't preview well inside CF Builder and let's go to that page. And there we have it. Our Google Map is all ready to use.

It has all the right zoom controls, pan controls. I can switch to Satellite or Hybrid mode. Everything is fully functional with just one line of code. But the default of the map isn't all that pleasant. We're way out here where we can see the entire US whereas I would be rather be closer in. So back in CF Builder, we can start adding additional attributes on to the cfmap tag. The first one I am going to add is our zoomlevel. I will set the zoomlevel to 10. And I am also going to set some markerwindowcontent.

Now the markerwindowcontent is what shows when I click on the centeraddress marker. So we will say 'This is the lynda.com office.' Now if I go back to Safari and reload this page, you can see I am now zoomed in at a nice level. And if I click on the center marker, it says, 'This is the lynda.com office.' Now I can put whatever HTML I want in here, so I could put a picture of the lynda.com office and a little bit of description of how to get here. And there is more we can do with the cfmap tag as well.

For example, I go over here and let's add an overview to the map and let's show a border around the map and let's put a title on it. Now if I go back to Safari and reload, I will now get a nice title at the top, directions for Dan and now I have my little overview paned done here where I can scroll around. And I can collapse that overview into the corner if I need to.

But I can do more than just drop a single point on the map. Let's go back to CF Builder and we I am going to change our cfmap tag and add a new tag, cfmapitem. And we are going to say that its address is Oxnard, CA. And then we are also going to show some markerwindowcontent for that one as well. And I will close my tag, switch back to Safari and reload.

We now have my center marker and I also have a marker here in Oxnard. And if I click on that one I can see 'Your hotel is in Oxnard.' So believe it or not this is just scratching the surface of what you can do with Google Maps. ColdFusion adds hooks to allow you to set bind attributes on markers to fill content, it allows you to specify custom marker colors and icons, and a host of other features.

There are currently no FAQs about ColdFusion 9 New Features.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed ColdFusion 9 New Features.

Return to your organization's learning portal to continue training, or close this page.


OK

Upgrade to View Courses Offline

login

With our new Desktop App, Annual Premium Members can download courses for Internet-free viewing.

Upgrade Now

After upgrading, download Desktop App Here.

Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Start your FREE 10-day trial

Begin learning software, business, and creative skills—anytime,
anywhere—with video instruction from recognized industry experts.
lynda.com provides
Unlimited access to over 4,000 courses—more than 100,000 video tutorials
Expert-led instruction
On-the-go learning. Watch from your computer, tablet, or mobile device. Switch back and forth as you choose.
Start Your FREE Trial Now
 

A trusted source for knowledge.

 

We provide training to more than 4 million people, and our members tell us that lynda.com helps them stay ahead of software updates, pick up brand-new skills, switch careers, land promotions, and explore new hobbies. What can we help you do?

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.