Overlay data on maps using XSLT, KML, and the Google Maps API, Part 2, Transform and use the data
Produce a KML overlay document and display it in Google Maps and Google Earth
From the developerWorks archives
Date archived: May 13, 2019 | First published: September 09, 2008
In this two-part article series, you'll develop an application for a real estate brokerage to display all available apartment listings as clickable Placemarks on Google Maps. In Part 1, you created the first half of the application that collects the apartment listing information from the user, uses the Google Geocoder Web service to turn the street address into its geographical coordinates (longitude and latitude), and stores the coordinates in the database along with the address information. In Part 2, you will use this data to produce a KML overlay document and display it in Google Maps and Google Earth. First, you'll use stored procedures to produce XML from MySQL. Then with XSLT and a technique called Muenchian grouping, you'll transform the XML data into a KML document containing the overlay information—one Placemark for each apartment building. The pop-up balloon for each Placemark displays the available apartment listings in that building. Finally, you'll use the Google Maps API to display the KML overlay in a Google Map embedded within your own Web site.
This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some content, steps, or illustrations may have changed.