Archive for the ‘Google Earth’ Category

Where in the world are people looking? part 1

Friday, February 29th, 2008

As some may know this site serves a number of Network Links for Google Earth, for a long time I have thought it would be fun to map the data from that, but finally got round to trying it. This is still work in progress, so the current images are very much easly tests, but shows promise, hopefully can make some better visualizations – maybe even as KMZ :)

‘Lookat’ point v1: (click for 145k version)

View In Google Earth (don’t forget to try adjusting the tranparency slider!)

Shows some interesting patterns, there are a number of lines on the map, and definitily appears to be flight lines, I suspect this is from people leaving tours on loop, and a fudging a networklink to refresh periodically. Not sure how else to explain such repeatable loops – can a large number of visitors really be all following the same route? I’ll investigate this more in follow up map(s).

But WHAT is that point in the middle of the Atlantic?

Update: this is from about 900k hits from aug-nov ’07 – still processing the rest of the data!

Update 2: More maps here, all maps seem to to show the same overall pattern which is slightly puzzling, eg the IPs graph suggests that many users are following these flight lines. : short (network) links for KML

Wednesday, February 27th, 2008

For a project wanted to create a small script to make generation of network link wrappers to KML content easy, but then I thought could have it create ‘short’ urls, ala, to make reuse easy. But then thought if going to that trouble might as well make it a full blown mini application, so I give you :: Short Links to KML content

I think it turned out pretty well (esp for just an evenings hacking) – it even has an element of ‘design’ – which is saying something! : short (network) links for KML

So if you want to create a network link wrapper with the minimum of fuss, and might enjoy having it as a short url, then give it a go.

Of course there are still a few things that could be done, but will leave these for another day…

  • Auto discover the ‘title’
  • Intelligence for ‘My Map’s – eg support multiple pages, and maybe some other KML types.
  • Actually make the admin page useful – display stats (they are stored already) , and edit the link
  • A public gallery of popular/new etc links – maybe even some sort of search – esp if we can do rudimentary indexing of the content (when fetch the title)
  • Support for named links eg could choose
  • Complete the support for the various network link options – particulaly making it easier to select the appropriate settings.
  • Maybe even support for forwarding the link by email (and/or sending the admin link to yourself)
  • Any thing you can think of :) – let me know!

(static) Google Maps in Google Earth…

Thursday, February 21st, 2008

Now that Google have just announced a brand spanking new NON JS Maps API, to be able to display maps with a simple img tag, similar to the Chart API. Well I thought it would be fun to re-purpose the
FlashEarth code to create a network link to display Google Maps in a popup balloon on Google Earth. Not totally sure the utility, but sure is fun (until the novelty wears off!)

Open in Google Earth

Hopefully needless to say the map inside the balloon is static and non draggable.

Update to clarify: You get to draw 1,000 maps daily, which is probably plenty, but go over that and the maps will stop working for you.

Update: as alluded to in the official post, you can use the static API to load a quick map, while the rest of the page loads, then at the last minute change it into a dynamic map. A series of demos showing various ways of lazy loading!

Publish your KML via Google

Thursday, January 31st, 2008

Lately I have have been playing a lot with displaying KML files on various properties of Googles, and I thought it was about time I bookmarked the useful pages for my own reference – Firefox has them in the recent list now, but in 2 months time? Anyway in the end thought it would only take bit longer to collate them in a webpage, and make them dynamic links, so without further ado:

Useful links for publishing a KML via Google

ViewFlip for Google Earth

Thursday, January 24th, 2008

Remembering back to the good ol’ pre SpaceNavigator days, when Google Earth was stuck in ‘Earth Based’ mode, and I created ViewFrom, have created a new version that uses the <Camera> functionality to do it more accurately, but at the same wrapping it in a networklink for ease of use…

Google Earth LayerViewFlip (recent GE 4.2+ required)

… open opening this you should get an arrow in the middle of view. Click it and choose to either Flip! (swap position*) or Look Around (which gives you a folder of viewpoints to look out from the point of the arrow). So a sort of basic ‘User Based’ movements, which really (IMHO) should be part of part of the default GE installation – without needed addons.

*There is a few oddities with this – but mostly works. Also you will get a bunch of features in your Temporally Places – GE doesn’t seem to be able to load a KML that just changes the view (which there is no need to show in the Places there are no features)

Update: 25th Jan, Thanks to a suggestion from Frank Taylor the “lookaround” groups are now available at multiple altitudes, nothing new to download, its all done by magic. (let me know if other heights would be useful)

Export all MyMaps to Google Earth

Monday, January 7th, 2008


Update, 2nd August 2008

Suddenly it seems that the KML export from My Maps no longer pages like it used to, basically making this script redundant – which was always the intention!

So if your file has under 1000 features, then just use the link ‘View in Google Earth’ to get all the data. If you want the
actual data you can change the ‘output=nl’ to ‘output=kml’ to get the KML data rather than a Network Link to it.


Oh dear, I think I should stay away from the Google Maps Group, following a post (about saving directions to MyMaps) on there a few days ago, realised the KML export is paginated, but there doesnt seem to be a way to get at the following pages directly. It flummoxed me for a while until guessed at the params to get the additional pages, success.

Then a post on there today, made me realise others are coming against this problem, so in traditional hackers** style, here is a little utility to create a multi page network link wrapper…

Export all MyMaps to KML

** follow the link for the definition I mean

Update: 18th Apr, we now download the first page of the map, 1) to get the number of items per page, it seems the link itself is no longer reliable, and 2) it means we can grab the title automatically :)
(note the download is discarded so I dont keep a copy of the data itself)

Export multi-destination (or dragged) route to Google Earth

Thursday, December 27th, 2007

Love keep adding destinations to your route, or even dragging the route to refine perfectly to your needs in the directions feature on Google Maps? But frustrated that this feature isn’t available in Google Earth?

… No, not implemented this feature for Earth (wouldn’t that be something!), but as a stop gap its a way to export your newly created directions on Maps, and open them in Google Earth! You get a freshly created folder containing each section as a separate route, ready for use as ‘one.

Multi Destination routing in KML for Google Earth

Google Earth Version Stats (Dec’07)

Friday, December 14th, 2007

 Only a quick post as its late, but just noticed this report had finished generating, took rather a long time, as just found our stats package has been mangling GE’s useragent string – anyway enough rambling, I know you just want to view the stats:

 Dec 2007 :: Google Earth versions accessing links on nearby

… make of that what you will – haven’t really drawn any conclusions from this…

(last set)

36 Blue Globes for your viewing pleasure.

Tuesday, November 13th, 2007

I notice Jonathan has finished uploading all 36 layers of the Blue Marble Next Generation imagery, that he has been processing for viewing in Google Earth. These are the full resolution imagery available, at an impressive 500m per pixel I believe, and preprocessed for reasonably quick loading – shouldn’t be *that* much slower than GE’s built in imagery.

This is a full set of 12 month variations for each of the original, topographic shading, and topographic & bathymetric shading variations of the original data.

If you haven’t already done so, load the layer now! Or if you already have it simply right click the top most ‘reference’ item and click Refresh.

… could be wrong, but think this is the first time that all layers are available for easy viewing in Google Earth.

Serving Google Earth static content with Apache

Tuesday, November 6th, 2007

This could probably be classed as technical post (gosh!), and is probably only of interest if involved in hosting content to be displayed in Google Earth or Maps etc.

I’ve been meaning to write this up for a while, basically a set of tips for setting up Apache 2.X for hosting content for Google Earth. The same tips can probably be used for other webservers but won’t begin to look at the various ways it could be configured… Also these could easily be placed in httpd.conf, but using .htaccess as the example as thats probably easier, and not all hosting providers allow access to the file. Much of the stuff here originates from YSlow, but adopted for what I know about Google Earth.

These settings assume you not going to change the content much, so is good for serving up large static content, or the ‘chrome’ for a large layer. Regally updated content is likely up be output from a script anyway so that can setup its own headers, I’ve also done quite a bit of work on getting PHP to output good headers, so will post that in a follow up post.
First and foremost is setting up the MIME type, to ensure the Google Earth is launched when a user clicks a link, so these lines are added to the .htaccess file:

AddType application/ kml
AddType application/ kmz
AddType application/xml dae

Next is the Expires header, which tells a UserAgent how long it can cache the content, we set nice future dates, which mean in the main the content will stay cached for a while, potentially saving quite a bit of bandwidth.

ExpiresActive On
ExpiresByType application/ "access plus 30 days"
ExpiresByType application/ "access plus 30 days"
ExpiresByType application/xml "access plus 30 days"
ExpiresByType image/jpeg "access plus 180 days"

I’ve included JPG here, as it’s often used with GE, esp. how with the introduction of PhotoOverlay. The same idea can of course be extended if you use png files for example.
Now Apache out of the box supports sending Last-Modified headers, which means conditional GETs can be made later, which will only return 304 Not Modified. I’ve seen suggestion to turn off Last Modifed headers (if you have far future Expires as above) – but after testing, I would NOT recommend this.

Next is Etags, now YSlow recommends disabling these in most cases, and Apache useually comes with them on, and can easily be misconfigured, esp. on clustered hosting, so they need to be turned off. I’ve dithered on this one for a while, it seems silly to disable a feature that could potentially be useful, however the clincher here is that I don’t think GE will use them, and besides we can save a few bytes be not sending them in the first place.

FileETag none

I’ve no evidence if it helps, but if you have enabled on the fly GZip compression, then you might get a small boost by turning if off. As GE doesnt support HTTP-GZip compression, and KMZ and JPG are both well compressed. The only small benefit might be if you have a KML based loader, that might get downloaded by the browser in which case it can GZip’ed. So turn it off globally in this folder, but turn it back on for KML:

AddOutputFilterByType DEFLATE application/

As a final tip, the following allows you to upload a index.kml file and it will be served as the index for a directory, doesn’t help performance, but useful in a few cases,

DirectoryIndex index.kml index.html index.php

Get all of the above in one file ‘ere, use or don’t use at will :)