Google Maps Source [www.google.com]

As promised, the source code for my OpenACS Google Maps application is now available. You can either browse it, or download your copy with Subversion. The repository URL is

http://www.clasohm.com/svn/clasohm.com/trunk/packages/google-maps/

The two most interesting aspects of my implementation are the UI for creating a location, and the way the map is displayed.

When I designed the application, I first had to find a way for getting the geographic coordinates for all those locations. Manually copying the coordinates from a desktop mapping application would have been too tedious, and Wikipedia does not have an entry for all the points I want to display.

Fortunately, the Google Maps API provides the means for a clever solution. Just embed a map in the form page, and use the click event to store the geographical coordinates of a mouse click in run-of-the-mill form text fields.

The source for this can be found in location-edit.adp and location-edit.tcl, and here is a screenshot.

Now that it is easy to enter a long list of locations, the next exercise is to include them in the map. You cannot display them all at once, because you do not want to clutter the map when it is zoomed out.

Solving this has become easy when Google added GMarkerManager to the Maps API.

In location-view.adp, I extract the locations from the XML provided by location-list.tcl, and pass them to the marker manager.

At the same time I switched to GMarkerManager, I started to use the Google Earth icons.

23:20, 30 Jul 2005 by Carsten Clasohm Permalink | Comments (1)

RSS

Archive

July 2005
S M T W T F S
         
7  8 
10  11  12  13  14  15  16 
17  18  19  20  21  22  23 
24  25  26  27  28  29  30 
31             
September 2008
July 2008
June 2007
May 2007
March 2007
January 2007
December 2006
September 2006
June 2006
April 2006
March 2006
February 2006
January 2006
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
January 2005
December 2004
November 2004
October 2004

Blog Categories

Hiking (5)
Desktop Linux (28)
Server Linux (5)
Palm (3)
Photography (5)
Politics (2)
Web Applications (15)

Notifications

Request notifications

Syndication Feed

RSS

Recent Comments

  1. Anonymous Visitor: Thanks
  2. Anonymous Visitor: AT&T U.S.
  3. Anonymous Visitor: All went well under CentOS 5.0 in Croatia (VIP network)
  4. Anonymous Visitor: tmp crypt not necessary
  5. Anonymous Visitor: Great article
  6. Anonymous Visitor: So it's not a Virus...
  7. Anonymous Visitor: Thanks! Helps also on Windows!
  8. Anonymous Visitor: Thank you
  9. Anonymous Visitor: Economic Incentives
  10. Anonymous Visitor: thank you