Posted by & filed under Life Drawing.

After the detour with javascripts, Google Maps and perl scripts I am back to the drawing board. Here are some of my life drawings from the last month, I started experimenting with ink.


Posted by & filed under Flash, Web.

I have been working on a flash slideshow on and off and a couple of days ago I found which does almost everything I wanted but not quite, so I got action-scripting. To see a demo of what I have done click the play button below.

The original slideshow by Dominey has a nice feature of loading the image location and various fade-out and timer values from and XML file so that the user can control most things from the XML instead of going into Flash to change things. What I needed was a way of displaying a caption for each photo and then to fade-out these captions with the photos.

I have extended the XML schema for the slideshow to include the text for each caption and also the position where the text is to be displayed and its alignment in the textfield. There are also variables for controlling the font-size,font-colour and the width and height of the textfields that display the captions. Here is the XML file which controls the above slideshow:

It would be nice to be able to also specify the font from the XML file but since the font has to be embedded into the swf I don’t think that can be done. It would also be nice to have a way of masking/resizing the frame to better handle different size images, right now the slideshow is assuming the images are all the same size as the stage size in the fla, it still works for different size images but it will crop images or leave unsightly blank spaces around images.

Download the source:

Posted by & filed under Google Maps.

GPX Draw is now at a useable stage, although I find that when inserting points the tolerance can be too low when zoomed out, need to make it so that the tolerance is dependent on the zoom. I have used GPX Draw to create a GPX log of my Cycle Tour from Sydney to Melbourne.

The next step was to have a program read this GPX file and a bunch of images and work out the approximate GPS for each image. I tried PhotoLinker and gpsPhoto, PhotoLinker has a nice Mac interface but it wasnt doing the weighted averaging that I needed and gpsPhoto wasn’t doing any averaging at all, so I ended up having to modify gpsPhoto which is a perl script linking to a bunch of handy libraries like ExifTool, to do what I wanted it to do.

Here is the perl

I was very pleased to see some images show up on the map finally after all the hard work. Take a look here, this is going through the Google Map Module for Gallery2 but I have modified it a bit so that it displays my track as well as the photos.

There are some problems that I ran into, biggest one being that I had to significantly drop the detail of the track down so that the google map api was displaying the data in a reasonable amount of time. I found this to be pretty disappointing but maybe a newer API will handle large number of points in GPolyline more efficiently. A fix would be to figure out what is within the view port and only feed the API the points inside and around the viewport and not the whole dataset, but that would take a fair bit of programming.

Another problem is that it can get quite crowded with the icons for all the images, the Google Map Module has some grouping features but they dont seem to work for me. Once I figure out the best way to make it all run more efficiently I will had some of the longer more interesting Cycle Tours and photos.

Posted by & filed under Google Maps.

After 2 weeks of wrestling with the Google Map API and Javascript I have an alpha version of GPX Draw. As mentioned in my previous posts I have been looking for a way of geocoding my travel photos but unfortunately I did not have a GPS unit with me while I was travelling but I did keep a day by day diary and the photos are all timestamped hence the idea that if I was able to draw a route of my travels with time information at each point then I will be able to estimate the location where the photo was taken by looking at the timestamp of the photo and relating it to the route information in a GPX file.

You can have a look at what I have so far by clicking on the “GPX Draw Google Map” tab in the header of this page or going to the following location:GPX Draw. The application is orientated towards cycle touring but could be modified for other purposes. This is a preliminary version, I havent done that much testing on it yet so if you find bugs then let me know.

One of the problems that wasted a lot of my time was the fact that firefox on the Mac platform does not send a keydown event when the CTRL or SHIFT buttons are pressed. Originally I wanted to have the application switch to ‘add marker’ mode if the user was holding down the SHIFT key, once the SHIFT key is released the application would go back to ‘add point’ mode. This is very nice for the user and I was very happy with the way it was working on the Linux box but when I tried it on the Mac I found that no keydown events were being generated. After much hacking around and searching for a solution on the web, I ended up having to add a set of radio buttons for switching between modes. As a user friendly measure I have added hot keys (a,z,d) for switching modes (note that the mac does generate keydown events for normal keys but not the modifier keys).

Other problems I had were with pop calendars, until I found the following The DHTML / JavaScript Calendar which is ultimate javascript calendar, plus is it free.

At this stage I am going to start drawing test routes and feeding the generated GPX into PhotoLinker along with the photos to be geocoded.

Posted by & filed under Google Maps.

I have been diving into the Google Maps API for the last couple of days. After finding the nice Google map module for WordPress I started looking for a way of geocoding the photos that I took while travelling around the world on a bicycle.

One solution is to find the geocode for a photo by manually positioning it on a map, this would be very time consuming and tedious. The other solution is to use the time-stamp of the photograph (almost all digital camera write this into the EXIF data) and a track-log( which is a log kept by a GPS unit about where it was at what time) to calculate where the photo was take.

The good news is that most of my photos are timestamped, the bad news is that I didn’t have a GPS so I don’t have a track-log of where I went. But I did always draw on a map the route that I was taking and I kept a daily journal of the places I visited. So I did a search of the web for a program which would allow me to draw a track-log by hand then I could feed my photos and this track-log into some freely available photo-llinking program which would time-stamp the photos with the geocode.

I was amazed at the amount GPS stuff that is going on, there seems to be a revolution going on in that field, nevertheless I couldn’t find exactly what I was looking for so I decided to write my own Google Map application. It has been a steep learning curve but I am slowly getting there, here is a preliminary work-in-progress application as I start to build it up.

Posted by & filed under Google Maps.

I have been wanting to do a photo travelogue web page of the cycling tours that I have gone on for the past 5 years for a long while now. It has been on the back of my mind, bubbling away and yesterday I ran into a Gallery2 Module which makes what I wanted to do so much easier. It is based around the Google Map API and lets you enter longitude and latitude coordinates for each photo, the photo is then marked on a Google Map and clicking on it brings up a thumbnail of the image.

There is also a way of creating routes on the map, which I find very interesting I want to take all the entries from my travel diary and build up the routes that I cycled around the world. Right now I have only a couple of photos on the map and no routes but I am searching for a quick way of finding the coordinates of a town or a village for easy addition. Also it would be nice to have notes giving the date, kilometers travelled that day and the average speed.

I have added a tab called “Cycle Tours” in the header of the site or you can go to the Photo Map section from this link.

Posted by & filed under Web.

I didn’t think putting a Navigation Bar would be so hard. I have spent the better part of the last day and a half wrestling with WordPress and Gallery2 embedded to put in a tabbed navigation bar so I have a link to my Gallery. Most of the problems arise from the fact that the Gallery2 is embedded into the WordPress but WordPress doesn’t see it like that and makes the highlight on the gallery tab disappear when browsing albums.

I got very frustrated with trying to get wordpress to do the right thing for me so in the end I decided to hack it and do the highlighting myself. This method would probably not be suitable for a lot of people but it got me going, I am checking whether the URI is has “/v/” which is how URL rewrites work in Gallery2, before deciding that we are actually in the gallery embedded pages, this is very site specific so be aware.

I put the following code into my header.php and wpg2header.php

I added the following to my style.css and wpg2.css

Also thanks to Pud for helping me.

Posted by & filed under Flash.

I have been pretty busy the last week or so working on a couple of flash projects. The first one was a Sky Diving game for promoting “The Fray’s” new album, “How to save a life”. Studio Emotion contacted me to do some coding, debugging and testing on the game before the release, it was a good experience and I enjoyed working on the game even though the time available was very short. I will put a link here when the game gets released, the album is due 22nd of July.

The second project was a very small one regarding passing Query Strings into Flash. It is very easy, the tricky part is to make sure you add the following java code to the html so that the query string is read from the url and passed on to the flash object.

Once that is done you just change the query string name in the above code and also the swf file name and then you have access to the value of the query string with the following flash code:

.....= _level0.yourQueryString;

The other project that I am working on is a little slideshow swf which reads an array of text and some images and then animates the text while revealing the images. The idea was to just have a little script which you could plug any text or image into. The following is a work in progress with only 2 images for testing. The idea was to have a wave come in and bring the text in and then reveal the image as it went out again. I need to do more work on the wave, right now it looks more like a curtain than a wave and also I want to make the text rotate a bit as it is pushed by the wave.