Archive for the ‘Web Services’ Category

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…)

(Google) GeoWeb Search API

Wednesday, May 14th, 2008

I dont know when it happened, but the API to search Googles GeoIndex seems to have gone live. The documentation is here (http method) and here (javascript). I actully found this via the recently announced Google Maps API for Flash, which is also good.

/me wanders off to play (but dont have much time at the moment :( )

but before I go, I note that the api doesn’t appear to offer KML output :p

… unless of course the actual GeoSearch API is something bigger!

update: try it out:

http://www.nearby.org.uk/google/geoweb_explorer.php

Not much to look at, but does show the json in a slightly easier to read format. Of course need to make a Maps API based map to try it out, but not tonight… (but did get as far as KML output – with source code!)

update2: Its been formally announced! (also if you find the ‘blended’ doesnt return results you expect, see this thread

Where in the world are people looking? part 2

Saturday, March 1st, 2008

Following part 1 yesterday, have now plotted some maps per individual service.

Flash Earth Layer

Conclusions

  1. Google Earth does request a link for the initial view on startup – that point in the Atlantic.
  2. I guess North American installs have two slightly different default placemarks; has it changed, or maybe Canada gets a different one?
  3. But that doesnt explain the lines from there – people must have their links set to periodically refresh?
  4. Germany likes FlashEarth (or rather people like looking at Germany with FlashEarth link enabled)
  5. Many people leave the links open even when not in use – e.g. the British Isles links show worldwide usage, notably over Russia.
  6. MGRS notably has high usage in two areas.
  7. The Far east likes to know what direction they facing.

Update: In a total forehead slapping momont realised these unprojected whole world images, are exactly what is used in GroundOverlays, so the the pages now include links to view the higher resolution images directly in Google Earth, duh!

Example: View In Google Earth (don’t forget to try adjusting the tranparency slider!) [Update, to fix broken link, sorry!]

When service users go bad?

Friday, February 29th, 2008

This is probably a purely a rhetorical question, and a means to vent. As background, I have just noticed a single user use a very disportionate number of requests against one of the Google Earth Grid Layers (MGRS), it look’s like they set it to refresh every 10 seconds, and for a while did browse around the globe, after that it stuck on one view and just happily refreshed away for 20 hours.

So what is the response to this type of thing (and I have no idea of the identity of users)?

  1. Blacklist at firewall level – effectively cutting them off from using nearby ever again.
  2. Blacklist them from that feature permanently
  3. Impose a temporally ban
  4. Add a throttling to the service for everyone, such as a quota or rate limiting – difficult to get the sweat spot
  5. Google Earth offers <maxSessionLength> which could be used to curtail the long term effect, but this would have a minor effect on legitimate users
  6. similar to last but only start adding it once they trigger some limit

So far (and only in a handful of cases) have done either 1 or 2. In the example that has triggered this post have done 1. but might change it to 3.

(the api and coordinate converter have their own dynamic limit, essentially 4. )

Geohash converter; API limit upped

Thursday, February 28th, 2008

Recently geohash.org was released; the premise: short easy links that encode a location. The website offers instant conversion, but as the algorithm is Public Domain, Lordelph was quick to implement a php class, and I could quickly add the conversion to my existing conversion API. Convert a postcode to geohash anyone?

Updating the documentation noticed the API was last updated in 2005 – gulp, how time flies! Anyway as a celebration have upped the throttling on the API, now three times the previous limit. Running on much improved hardware than when it was launched so maybe the limit can be tweaked even more, will run some analysis of its impact – it already seems the API is a minor part of the overall load on the server – particularly against the Google Earth layers.

(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!

Playing with (geo-enabled) Full-Text Searches

Thursday, December 20th, 2007

Recently I have been playing a lot with Sphinx full-text search engine, in particular with regard to indexing the Geograph archive. (a bit of background – Geograph has a fairly good homegrown site text search – but its not full text, so many queries will not return that many results – not to mention been based on MySQL ‘like’, so is pretty slow – so a full text search is the next level). And I have to say I am liking it a LOT, in fact I would say I am a fanboy :)

So to that end of created a whole bunch of demos based around the flexible indexing it provides, location based searching is even possible!

At the most basic is simple text based search, one point of note, there is no pagination, simply add more keywords (including negative) or grid references to refine the selection.

Next is a ‘auto-complete’ style image finder, this is designed to find ‘that image’ quickly, in a similar way to the above but shows the results in a autocomplete box immediately!

A refinement of the first is search with location, this allows you limit the search to near a particular Grid References – this is particully cool in that there is Sphinx powered auto-complete for place names for finding GRs. (a real auto-complete not a like the search in the previous one pretending to be one)

This is all building towards the Illustrator demo. Which from a block of text attempts to find relevent images. The idea is that a (geolocated) news article, walking route, place description and such could be automatically have relevent(ish) images shown. (an example demo here)

(a few more ‘toys’ can be found in GeographTools!)…. Try them out and let me know how you get on…

I have learnt a lot about search indexing from this, including how to perform location searches in the index (I know latest versions of sphinx include a lat/long based geosearch – but I think this r-tree method in text has better scalability), and how to create an autocomplete function with sphinx. If anybody is interested in these, they will eventually make it into the geograph codebase, or let me know and I might make a separate post.

Interestingly (huh?), it was actually creating a ‘autocomplete’ textbox for finding trigpoints (which included the forerunner to the sphinx location search in but implemented in mysql), is actually what inspired me to actually go the trouble if figuring out how to install Sphinx on linux, which I have been interested in for a long time! – that is also now sphinx powered for text searches :)

As a side note have now reached the ‘linux sysadmin’ level that I can compile it on Geographes servers, yay! But I do worry for the sanity of others due to this (a little knowledge is a dangerous thing!)

FlashEarth+GoogleEarth Part 2

Wednesday, August 29th, 2007

Following the amazing interest in the networklink for embedding FlashEarth inside Google Earth 4.2, have performed a few updates…

  1. The zoom is a LOT closer matched, this is thanks to the inspiring formula: $z = (-1.4956 * log($range/1000) + 16.529; (yes really!); brought to you by the wonder of plotting a graph in Excel, creating a trendline, turning on the formula display option. Probably could get an even better match with more patience, but probably about as good as it going to get really.
  2. Removed the title and the directions links, makes the balloon looks a bit nicer, couldn’t get it to go transparent for me tho… suggestions welcome.
  3. When the network link is now a folder so can choose the size of your popup :) The previous version is now the ‘medium’ one.

Though the magic of the web, you get 1) and 2) automatically, if want 3) just download it again:

Open in Google Earth (Required: GE 4.2 Windows)

Thanks again to everyone involved.

Google will Geocode UK addresses and postcodes!

Friday, July 6th, 2007

Something we wondered if we would ever see, but it seems the Google Maps API geocoder will now Geocode UK Addresses and Postcodes (see update below). This is quite big news on many fronts, as traditionally UK geocoding is expensive, or where providers do geocoding its with restictions on use of the data commercially. But the API geocoder positivly encourages caching the geocodes for your locations (POIs), and in with particular Postcodes this has been a big no no. Can’t see any change in ToU’s in light of this, but we will see.

Has Google taken over the Royal Mail too now?

(the official announcement)

Update Nov ’07: … well it seems the postcodes was only a dream, and have now been withdrawn! Time will tell if this can be rectified. Ho hum…

Update Dec ’07: … the ToU have now been updated to clarify that the (http) geocoder is for the express use of ‘pre-caching’ geocodes for use on a Google Maps API map. (I’ve also clarified the above paragraph in regards to this). This also prevents some interesting uses, eg store locators that work before a map is shown (but an intereactive one with a map should be fine), which is a shame.

Google Maps – Mapplets; a quick Geograph demo…

Tuesday, May 29th, 2007

Wow, Google have again gone and introduced an almost draw-dropping new feature to Google Maps – Mapplets. Put simply they allow you to create mini-map-mashups, but as they run on maps.google.com, visitors can view your content along side the normal content of Google Maps – but even more interestingly visitors can load more than one Mapplet at a time, combining the data from each mashup onto ONE map!!!

And it turns out they are really easy to code for been based on Google Gadgets (which I haven’t used before) and Google Maps API (which I have :) ), but I also congratulate Google on including in the package ‘Developer’ mapplets that make developing relatively painless.

Anyway onto the demos, just visit http://maps.google.com/preview (it’s a Developer orientated demo for the moment), click the ‘Mapplets’ tab, goto ‘Add Content’ and see what takes your fancy. To try out my (very humble!) demo, use the ‘Add by URL’ and paste in the following URL: http://www.geograph.org.uk/stuff/gmapplet0.xml

(more about maplets in the post linked in the first paragraph!)