Sunday, August 26, 2007

More Google Sky Tupperware

My quick hack yesterday where I PLASTIC enabled Google Sky generated a lot of email and encouragement. It also got me thinking about where to go next. However today's adventure in Tupperware I lay entirely at John Taylor's feet, it was his idea, although I must admit I hit myself squarely on the forehead and said "Doh!" when he suggested it...


More Google Sky tupperware...

Unfortunately yesterday's code only allowed Google Sky to listen for incoming ivo://votech.org/sky/pointAtCoords messages. Which isn't really as much fun as sending messages back out. I couldn't see an easy way to do that, but John could,

As for sending points out of Google Sky... you could add a URL to a marker so that when the user clicks on it in Google Sky it opens a web page. In our case we could have it pointing at a local web server that converts it into a PLASTIC message. - John Taylor

Of course that'd work just fine, so I quickly modified yesterday's code to do just that. Now when you send a PLASTIC message into Google Sky the <Description> tag in the Placemark has a link which, when clicked, will call back to the facade application's embedded webserver and allow you to send a PLASTIC message back to the Hub. This means we now have bi-directional control, both in and out, of Google Sky with PLASTIC.

I've uploaded the source code again, but please don't look at it too carefully, it's getting to be quite embarrassing how poorly it's written. I don't normally break object encapsulation like I've done here, but I was really keen to get this working. I've been putting off writing a "proper" Perl PLASTIC module for a while now, looks like Google Sky might be the thing that finally makes me do it...

Anyway, enough for today. Time to sit down and down this properly now I've proved to myself it's possible.

No comments:

Post a Comment