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)
Google Maps [www.google.com]
I still go mountain climbing and photo shooting without GPS, but the Google Maps API looked too interesting to be ignored. The API allows a site to control, interact with, and extend Google Maps. After a little programming, you can now track my hikes via satellite.
As an example, take the Schinder. The map link on the trail page will take you to a satellite map centered on the mountain. All interesting locations in the area are marked, and clicking the markers will give you information about each location. You can also view a list of all locations.
This cannot replace a hiking map. But it gives a nice spatial view of the trails database, which previously could only be navigated by browsing discrete, and sometimes arbitrary regions.
The Google Maps API and OpenACS made it very easy to implement this custom application on top of Google Maps. The geographic coordinates and all additional information for the locations are stored by this site, and integrated into the map with a few JavaScript lines. Defining a new location involves not much more than clicking on a map - you don't even have to know the difference between latitude and longitude. If you are interested in the source, let me know.
23:23, 25 Jul 2005 by Carsten Clasohm Permalink | Comments (0)
How to Disable Javascript in Adobe Reader 7 under Linux [kb.adobe.com]
This week, a buffer overflow vulnerability has been discovered in Adobe Reader 5.0.10. For Linux users, the only fix is an upgrade to version 7.
Unfortunately, Adobe Reader 7 can execute Javascript inside PDF documents, which is used by some authors to track readers. Javascript can be disabled with the menu item Edit - Preferences - JavaScript, but everytime you exit Acrobat Reader, it will ask you to reenable Javascript. To get rid of this annoying warning, do the following:
cd ~/.adobe/Acrobat/7.0/JavaScripts rm glob.settings.js ln -s /dev/null glob.settings.js
Update 11 Jul 2005: After upgrading from Adobe Reader 5 to 7, you also need to change your Mozilla or Firefox configuration. Instructions for Fedora Core can be found in the Fedora Core 4 Linux Installation Notes.
20:35, 08 Jul 2005 by Carsten Clasohm Permalink | Comments (0)
Greasemonkey Script for IT Conversation Shows [greasemonkey.mozdev.org]
Here's my first Greasemonkey script which improves a Web site's usability.
itconversations-download.user.js modifies the details page for shows on IT Conversations so that you can download the MP3 with one click.
Because Greasemonkey scripts are only executed after the page has been loaded completely, and the IT Conversation pages use their own Javascript to slowly display ads, using this Greasemonkey script only makes sense when you block the ads with Privoxy or a similar tool.
Update 18 Aug 2006: The Greasemonkey script no longer works, as the IT Conversations index page is now dynamically built with Javascript.22:07, 07 Jul 2005 by Carsten Clasohm Permalink | Comments (0)
| July 2005 | |||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
Request notifications