|We don't bite newbies here... much|
Perl Mongers Google Earth Tourby brian_d_foy (Abbot)
|on Jan 26, 2007 at 06:42 UTC||Need Help??|
Randal has been playing around with Aperture to organize his photos on his MacBook then upload them to Flickr. It has a nifty feature to geotag images based on the current view in Google Earth.
I figured that must be using AppleScript, so I tried creating a Mac::Glue glue for it:
That worked. The glue isn't that interesting. I can get the data for the current view, which is what Aperture does:
That gives me a hash:
I want to set the view though. But what to set it too? How about flying through all of the Perl Mongers locations? I can get those from the Perl Mongers XML file. Once I extract the latitude and longitude I pass it back to setviewinfo. If I wanted to get really fancy I could then use savescreenshot to save the view.
You might have to make that sleep a little longer if you have a slower network connection, and maybe you want to loop around the setviewinfo to start farther up (that number is in meters) and zoom in.
Have fun :)
brian d foy <firstname.lastname@example.org>
Subscribe to The Perl Review