Archive for March, 2007

Smooth Zooming on a Google Maps with a SpaceNavigator

Tuesday, March 27th, 2007

A quicky: Nice little tweak of the 3Dconnexion control of a Google Map demo, thanks to an undocumented parameter it turns out it is possible to enable the Smooth (continuous) Zoom function from code, so now a new demo that has it enabled :)

As before IE only and required all sorts of hoop jumping to enable the activeX – but hopefully it worth it – still want to try the bookmarklet approach of loading this into any map.

3DConnexion on 2D Google Maps…

Thursday, March 22nd, 2007

Thanks to Frank for letting us know about the new SDK for the 3DConnexion devices, including the SpaceNavigator, I’ve been waiting for this for a while as wanted to try it for websites like Google Maps. Even nicer is the SDK includes a Javascript demo – so makes developing for Google Maps Easy!

Enough already, I want to see the Demo!

WARNING: Internet Explorer – and you might have to enable ActiveX controls to run. Do so at your own risk! I won’t intentionly do anything bad, but can’t promise that 3DConnexion won’t (but doubtful they would either) – Recommend you add Nearby to your trusted sites and then allow controls to run in the trusted zone.

Or just download the file to your local drive. (right click the above link and select Save As) and run it from a local file – didn’t have to jump thought the hoops to get it to run there!

Todo: The zooming isn’t as slick as it could be (possibly) and would be nicer to have more control of the speed. Also the silly (depending on your point of view!) warnings from IE7, which I wonder if there is a better way of loading the objects to make it more compatible.

Feeding GeoRSS and KML content to your Google Maps API based Map!

Thursday, March 22nd, 2007

All hail the new GGeoXml class, just introduced into the Google Maps API! Now you can easily (usually 1 or 2 lines!) add content that you have in KML/Z or GeoRSS to a Google Map in your API page.

This is the same functionality that has been on the main Maps site (well the GeoRSS support is new!) for a while: nice for this to migrate to the API.

TIP: to try it don’t forget to use &v=2.x in your api loader to get the latest version that includes the GGeoXml.

To celebrate here is a Geograph Demo – following some testing will make it an official feature.

Geograph Superlayer v2

Thursday, March 15th, 2007

Following the recent introduction of the Superlayer to explore Geograph Photographs in Google Earth, have updated so that transitions between ‘levels of detail’ are much nicer, as well as sporting new custom icons!

If you have previously downloaded it then you should get the update automatically – otherwise right click the superlayer in My Places and select ‘refresh’ to fetch the latest version. It seems sometimes GE doesn’t reload the styles – so if all you see is a mass of yellow push-pins, restart GE and it should then return to nice circles and blue camera icons.

Or just download it here:

Geograph Superlayer (Google Earth Version 4+ REQUIRED)

Geograph SuperLayer for Google Earth

Monday, March 12th, 2007

If you have Google Earth version 4 and broadband then you might be interested in clicking this link:

· Geograph SuperLayer · Geograph Superlayer - click to load into Google Earth

By opening the above link you should be able to view the whole Geograph image collection directly in Google Earth. This has been possible in a number of ways for a while, but this does so in a much more compelling way (i.e. a single small download!).

This exploits the new Region functionality of GE4 to only fetch and load detail as you zoom in, in this way the view starts depicting a course overview of the current coverage, zooming in reveals more detail until pictures themselves become visible. (the ‘Super’ is adopted from Google’s term of SuperOverlays – overlays that load via nested regions)

In particular this is all pre-compiled and compressed, so should be fairly quick to download and is friendly as possible on bandwidth. Overall the layer consists of 102,965 files at 450MB compressed so there is a lot of data available, however you will download a lot less than this, probably on the region of a couple hundred files totalling about 2MB in a typical session.

As a small refinement, when a icon represents a single photo (a camera icon) if a view direction is stored the icon will have the top point in the appropriate direction. Also once the thumbnail is visible you can double click the thumb and the View will rotate to orientate the photo correctly!

Also this is only the first version, hot off the presses, so it not perfect yet, in particular would like to use Geograph specific icons (any Graphic Designers reading???), for example to give more feedback to the user on squares with many images, and view direction – also GE sometimes gets confused at the amount of detail available – plan to experiment to see if something can do about that.

… Hopefully users of GE3 should degrade nicely to use the View-based refresh method of viewing the dataset.

Oh and yes this is the little kml project I mentioned, see also other ways of loading geograph data into Google Earth or Google Maps via KML files.

KML writing PHP Class

Tuesday, March 6th, 2007

For a little project working on for Geograph (btw Second Birthday today!), that will end up producing quite complex (and repetitive) KML, I decided to take the plunge and create my own abstraction class.

There are already a few of these about, but I wanted something with just enough abstraction so don’t need xml in the php code, but without too much complexity, or a whole new syntax to learn. So the final output is basically a generic XML creation system, but tailored to KML generation, with a number of convenience methods for common bits of KML, (like outputting the right headers). This don’t do any schema enforcement, and assumes a good working knowledge of kml.

Anyway as the code is already GPL, thought would mention it here in case it useful to someone else.

Get the base class here (from the Geograph SVN repository)

There is also another file here, which extends basic the functionality, this is more specific to Geograph, but could still be useful.

And a few demo’s/tests used during development:

Demo1 – (view running demo – by default displays the KML, option to open in GE)
Demo2 – (view running demo)

And for a real world use of the code (been in active use for a week now)

Eagle eyed viewers might notice it claims kml2.0 but then goes on to allow use of 2.1 features. Yes I know this is ‘bad’ but is with reason. I have found to my expense that using 2.1 as the version actually has a few undesirable effects, eg making the Document visible in My Places tree, can’t mix and match styleUrl and style (to have common style but with a unique icon), and a few other subtle things. Whereas GE seems to allow the new features in a 2.0 kml file, I guess this is the GE equivalent to quirks and strict mode. (disclaimer: it’s a while since I tested this, so might be old news, I really should run some real world tests to confirm this is still the case)

Google Earth Version Stats (Mar’07)

Tuesday, March 6th, 2007

A while ago I compiled statistics of the versions of Google Earth in use in the wild (well technically accessing network links at nearby.org.uk) – well an updated version is now available.

For comparison here is the version from last Sept.

Conclusion: GE3 is definitely on the way out, but still actively used. A large number of people haven’t updated their GE4 for a while, and there might be a new version coming out sometime soon.

Update: It turns out my simplistic test for useragents beginning with kh_ missed off Mac and Linux clients – so here is a another updated version that does include such clients. Thanks to a commenter on Gearthblog for spotting this!
(I could rerun the above reports but see little point)

Update 2: It seems the new version was incorrectly calculating the total for Mac/Linux users – updated the link in the update above to correct this.