Wednesday, 13 January 2010

How to use Google Maps - Part 3

To host video, and to host our XML file, you'll need access to a web server that allows you to FTP upload files. If you already have a web site or a blog that allows you to upload files, you're set - you can upload all media and your XML there. Otherwise, there are still free web hosting services out there you can use in a pinch for making a few of these maps. Ye olde Angelfire is still kickin' it as a free service with 20MB of space. Yes, you have to navigate a minefield of opt-out checkboxes to get there but it takes all of about five minutes to set up a free account and upload your XML file, which you can safely link to from Google maps without incurring the evil spector of the sponsored ads (we tested this to be sure!). You could host some images and video there, as well, if you're only making one or a few maps. Or, ask around and get recommendations of other free web hosts — most are evil, but if you don't give them any real metadata about yourself you should be able to emerge unscathed.

Now, you've made and uploaded your media files to wherever they may roam. You'll need to know the fully-qualified URL of any media file you wish to link to, as well as your (coming next) XML file. That's as good a sequeway as any — let's dive in to the meat of this project: creating our XML file.

If you've seen HTML, XML looks pretty much the same: parameters surrounded by opening and closing tags. We'll show you an example of how to make two different waypoints, one with an associated image and one with associated video, and show you the minimal rest of the document structure. You can download the following example waypoints file by right-clicking and saving it to disk, then modifying it to make your own map. It includes one waypoint with an associated image and one with an associated video, matching the first two stops on our Ithaca map.

Here's what the entire XML file looks like with only one waypoint — all the stuff between the tags defines the waypoint. The stuff before and after is just the "shell" of the entire document.

No comments:

Post a Comment