Archive for the ‘API’ Category

Geograph Javascript Playgrounds

Friday, July 1st, 2011


I often have little ideas for new ways to display images from Geograph, but its a pain building prototypes.

It usually involves finding some other part developed prototype or feature, that I can use as a template. Then have start up a code editor, and get connected to a server. Think of a name to call the file. Strip out the bits not needed for the new application. Then have to remind myself the APIs available. Work out how to call the APIs etc, etc, etc.

… well now I’ve began work on a platform to make this easier. Online code editor – quick forking of current projects. Easy wrapped access to relevant APIs, jQuery already loaded.

No more worrying about what to call the file, or making sure I keep backups of previous versions (should want to find a previous one!). This is all handled automatically. Setup to handle browser caching and invalidation on new versions. No worrying about stale code.

It’s primarily for my own use, but thought may as well open it up so others can use it build quick prototypes – or even fully fledged applications (based on Geograph images of course!).

The applications created all run client-side in browser – so utilizes the power of jQuery to create immersive and compelling interfaces.

Probably the best place to start is from a few of the early demos I built with the system:

Public Listed Applications

Please use them as starting points – or simply inspiration to build your own application! (They are not meant as complete applications!)

No special tools required – other than a browser. Firefox with Firebug, or Chrome (press F12!) recommended – to help catch javascript errors.

(note: it only wraps one Geograph API currently – loading all images in a gridsquare – more to be added)

Full UK postcodes in the API!

Friday, April 30th, 2010

Thanks to OS Opendata, the Nearby Converter API now can convert to and from full Unit UK postcodes!

So as not to break applications expecting Sector postcodes in the API, there is a new API endpoint:

http://api1.nearby.org.uk/api/convert.php

API requests against this domain will give the position of the full postcode, and also reverse geocode (return you the nearest) full postcode!

- The Original URL for the API is still available – and will continue to be. I’ve also taken the opportunity to add a version number to the URL. It’s been 4 years since I created this API, and learnt lots in that time, so should be able to create a better version 2 :) When introduce that don’t want to break compatibility.

Of course the ‘Coordinate Convertor‘ is now using CodePoint Open too – the end of having to pay a commercial provider!

(sorry this has taken so long, OS Opendata was introduced at the beginning of the month!, its been a busy month)

Will take the opportunity to duplicate the copyright message:

Contains Royal Mail data © Royal mail copyright and database right 2010.

As it serves as a useful thank you, for making this data available.

Geograph Mashup Challenge (new deadline!)

Saturday, February 27th, 2010

We are pleased to announce a developer challenge to build a cool Mashup using Geograph Data/Photos. The closing date for entries is 11pm 31st March 2010, extended until 11pm 30th April 2010.

The first prize is a Space Navigator, with 5 runner up prizes of a Geograph key ring!
Judging will be by a panel of judges and possibly a user vote on a the Challenge showcase web site (TBA).

The rules are simple:

  • Create a web site, mobile, or desktop application (or similar) that uses Geograph data
  • The application must be available for free
  • Of course free to mashup the information with other sources (in fact its encouraged!)
  • Welcome to submit multiple distinct mashups – but each needs to be substantially different.

Other than let your imagination and ingenuity run wild.

Geograph will provide to all entrants:

  • Live API to search/download Photo data – includes hosting for thumbnails only
    • (includes bespoke development at Developers discretion – will try to provide to all that ask within resource constraints)
  • Static Dumps of pretty much the whole Geograph Database (mysql format)
  • Torrent Downloads of a sample of 250,000 images
  • Potentially help with hosting if you don’t have available (please ask!)
  • All confirmed mashups will be showcased/linked on the Challange Website.

This is for Geograph British Isles, but if can incorporate Geograph Germany data too, all the better – what data is available may vary.

For inspiration, offer up my pithy attempt:
Geograph Photos on a OpenSpace Map

Entry Form!

(note this is not sponsored by 3dconnexion – its entirely Geograph run)

Google powers your GeoDatabase

Sunday, December 13th, 2009

Update: Dec 16th, Offical Blog post is out. And just for interest a TechCrunch post too.

Sometime recently* Google has added ‘geo-filtering’ and attribute filtering to the Google Maps Data API, I haven’t seen any announcement of this or other mention (if it was, it was below my radar), other than a tiny footnote in an Article about doing geo-queries on AppEngine.

Anyway for people not aware of the Google Maps Data API, its basically a programmatic access method to the ‘My Maps’ feature of Google Maps. So with the API you can use Google Maps as your Geo-Database. (Subject I believe to a limit of 10,000 features per ‘Map’, but can have many maps)

However it wasn’t all that useful, as all you could do was inject your data, or read it all back. But now that searching and filtering is possible, it makes the API a viable method store your data for a Google Maps API or similar mashup. As soon as you get beyond a trival number of markers, you need to store your data in a database, and being able to only fetch the features in the current viewport is a good way of only working with a small subset at once.

Curouslly, there doesn’t seem to be a ‘limit’; so a big bounding box, could potentially still access many features. But hopefully that will be rectified soon.
Update2: Seems there is a max-results : handy!

Geograph Images + Google Maps + Geocubes

Sunday, December 6th, 2009

Geograph Images as you Drag - Screenshot
Quite pleased with the latest update to the Geograph Clusters Map. This displays all geograph images on a interactive draggable Google Map. The clustering is powered by Geocubes :) .

However the most exciting part of the update, is the ‘Enable Photo Display’ button. Which once clicked, enables loading a selection of thumbnails as you drag and move the map. Zoom in close enough to see many blue pins for best effect. As you move again, more images will load; the ones shown should always be within the current map view. The data to show images again comes from the Geocubes API, although we load actual thumbnails via our own API.

is it ScenicOrNot?

Saturday, April 4th, 2009

ScenicOrNot

ScenicOrNot is a new mashup from the good people at mySociety – with the simple aim of finding the scenic spots across Great Britain; I’ve no idea what the super secret purpose of this site is, but they have promised to release the data, so it could be used in lots of exciting ways… 

 

Oh and of course the photos are sourced from Geograph British Isles.

Go rate a grid square now! Also at http://digg.com/u18iG

Between a rock and a hard place…

Monday, December 8th, 2008

This is going to be a long and rambley piece about licences and the updated updated Terms of Service of the Google Maps API – if either of those don’t interest you turn away now :)

Not that long ago Google updated the Terms of Service on Google Maps API – I guess mainly in responce to issues brought up on the Mail group, and elsewhere. As a result of that edit there where many concerns raised (and more)- and a further edit was made. (note, only linked to some of the blogs etc – follow links to read more) This was over a week ago, but due to non online commitments haven’t really had a time to follow this up. You can read my early reaction here, which has been edited in to Mikes post.


Below is the main section that is still causing concern, quoted in its entirety:

11. Licenses from You to Google.

11.1 Content License. Google claims no ownership over Your Content, and You retain copyright and any other rights you already hold in Your Content. By submitting, posting or displaying Your Content in the Service, you give Google a perpetual, irrevocable, worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publicly perform, publicly display and distribute Your Content through the Service and as search results through Google Services. This license is solely for the purpose of enabling Google to operate the Service, to promote the Service (including through public presentations), and to index and serve such content as search results through Google Services. If you are unable or unwilling to provide such a license to Your Content, please see the FAQ for information on configuring your Maps API Implementation to opt out.

11.2 Brand Features License. You grant to Google a nontransferable, nonexclusive license during the Term to use Your Brand Features to advertise that you are using the Service.

11.3 Authority to Grant Licenses. You confirm and warrant to Google that you have all the rights, power and authority necessary to grant the above licenses.

To be honest still unsure how I feel about this section, and finding it very hard to vocalise (well to put to pixels) the concerns. I certain its not compatible with a number of situations where the Maps would otherwise be ideal, but that I guess is real life – just need to move on an find something that is more suitable. But its still gauling to have invested so much in Google Maps API to have it all disappear in puff of legal smoke, I guess its now going to be“Once Burnt, Twice Shy” as they say.

(more…)

Use Google Maps API to display data? Your data has been POWNED

Thursday, November 13th, 2008

If you use Google Maps API to display data on our website, then beware; new Terms of Service have been introduced. And it doesn’t look good…

Basically its laid out pretty clearly (see section 11.1) that if you use the API to display *your* data, then you grant Google a irrevocable licence to do as it sees fit with your data.

Sure it says “You retain copyright and any other rights you already hold in Your Content. ” – first, to soften the blow, but then goes on to say “[to] publicly perform, publicly display and distribute Your Content… ” (click the above link to see the full text) – I dont see how that is any different to saying they can do what they like with your data.

It gets worse if you have “business listings data”, as 11.1(b) says: “For example, if you create a store locator application, Google may use the business listings information from the store locator to improve the Google Services such as Google Maps and local search.
- give your data away free to Google why don’t you!

then as 11.3 says “Authority to Grant Licenses. You confirm and warrant to Google that you have all the rights, power and authority necessary to grant the above licenses.” – in many cases I* don’t think I can!

So does that mean if I can’t grant the licence demanded, I can’t use the Maps API? It seems so to me, so its with a heavy heart have had to disable some API based maps and Mashups. At least in the short term.

* as the one agreeing to the Maps API Terms Of Service.

(more…)

Search along a route

Tuesday, July 22nd, 2008

As a very rough, but somewhat nifty, proof of concept have created a little page, that answers (or attempts to!) the old age question of “Where is the best place to stop off for pizza along my route?”

Search along a route

as mentioned its very approximate, the search alogorithm is crude, I am certain there are better ways of doing it, anyone fancy taking it on?

Google Earth in the Browser

Wednesday, May 28th, 2008

Google has just announced a new Google Earth API – which allows embedding and fully functional Google Earth in just about any webpage. Even is easily intergratable with Google Maps API mashups – with very little extra code. (takes a number of seconds for that news to sink in!)

Be sure to checkout the samples, (particularly the milktruck demo!), I’ve also started trying it out with a few demos of my own

…Windows only btw…

Expect A LOT MORE from this very flexible looking API – the JS interface can quickly interact with objects (API is based around KML) and gets pretty good control of interface options.

Update: mentioned on gearthblog.com which is a good introduction about what this is and what its not!

Update2: and to show it can basically be added to a ‘real world’ Gmaps mashup, in a few lines of code, see here