O'Reilly logo

Head First Rails by David Griffiths

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. REST and Ajax: Taking things further

image with no caption

It’s time to consolidate your mash-up skills.

So far you’ve seen how you can add Google Maps to your web apps to clearly show spatial data. But what if you want to extend the functionality that’s already there? Keep reading, and we’ll show you how you can add more advanced Ajax goodness to your mash-ups. And what’s more, you’ll learn a bit more about REST along the way.

Too many incidents!

With the improved user interface, the number of visitors to the Head First Climbers site has soared. The trouble is, so many incidents are being logged that there are too many for people to easily read through them.

image with no caption

The index page of the site displays the information in two ways.

  1. At the top of the page is a detailed list of incidents with latitudes and longitudes. The trouble is, lots of people scroll past this to get to the map at the end of the page.

  2. On a map showing a cut-down amount of detail when you click on an incident. The problem here is not all the data is shown on the map.

Neither of these are entirely satisfactory. It’s hard to locate the incidents from the list, and that’s why we added a map. But the map doesn’t display all of the data available. So what should we do?

The map could show more details

The ideal solution would be to make the map do ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required