Christian Heilmann

Posts Tagged ‘placemaker’

RSS2map – a Placemaker/Yahoo Maps mashup generator script

Tuesday, July 14th, 2009

This morning I went to the Telegraph Media Group to talk about GeoMaker and Placemaker. The main thing they wanted to know was how to place an RSS feed that does not have any Geo data on a map and how to style it.

To make this easier I created rss2map, a demo PHP script with all the CSS and JavaScript needed to show a feed on a map:

RSS 2 Map example page by  you.

TTMMHTM: Braille body mods, Tesco hack, Placemaker talk video, old superheroes, steampunk, accessible Opera and cat control

Tuesday, July 14th, 2009

Things that made me happy this morning:

GeoMaker – easily turning web content into copy and paste maps and Geo microformats

Wednesday, July 1st, 2009

In preparation for my upcoming tech talk about Yahoo Placemaker I thought I have a bit more fun playing with the API. The main thing I wanted to create is a tool that makes it easy to either get geo content from some text as microformats or as a map to copy and paste without having to read lots of documentation.

Enter GeoMaker. In just three steps you can either get from URL to map or from text to map. If you add the site address to analyze as a URL parameter it even goes down to two steps :)

GeoMaker - a new project I am working on by  you.

I’d love to get feedback and see how we can improve this. I’ll release the code on GitHub in case you want to host this yourself once I got some more iterations done on it.

Geo this! Geolocate WordPress posts with Greasemonkey and Yahoo Placemaker

Monday, June 22nd, 2009

Geolocating content on the web is a great idea. By embedding latitude and longitude and real place names in your document you allow data mining for location or easy display on a map.

The problem up to now was that it is quite a job to find out the correct geo information from a text or a document and it is quite a pain to enter the information by hand.

Yahoo Placemaker is a web service that helps you with that – you give it some text or a document URL and it returns you all the things it found in there that resemble a geographical location back. The issue with doing that on a live site is that you slow down your site immensely as you need to look up every time.

The more logical place to do the lookup with Placemaker is when you edit your document. I thought this would be cool to have for this WordPress install here and wrote a small GreaseMonkey script that injects a new “Geo this!” button in the main WP form:

Geo this - button by  you.

When I hit the button the script does an Ajax request using the Placemaker open YQL table to get the information for the currently edited text.

Once it found the information it adds it at the end of the document as a GEO microformat. Each found entry starts with a comment that tells you what Placemaker matched and considered a geographical location. As it is not infallible this makes it easy for you to delete wrong entries.

Geo this - added microformats by  you.

Try it out yourself:

This is pretty much rough and ready and I’d be happy for feedback how to improve it.

Adding address information automatically to forms with GeoFill

Sunday, June 7th, 2009

One of the things I mentioned in my latest talk and the follow-up Q&A at Gumtree was that I am very interested in Geolocation and automatically detecting the user’s location to save them having to enter all the same info over and over again. Sure, location services like Fire Eagle and autofill options in browsers already do these kind of things, but they are power user toys for now.

Using Rasmus Lerdorf’s GeoIP, YQL and Yahoo Geo I’ve put together a small JavaScript wrapper that does exactly this for you:

GeoFill - automatically filling form data with geo information by  you.

GeoFill (also available on GitHub) allows you to use two different methods to automatically fill forms with geo information:

  • geofill.find(properties) does an IP lookup of the current user and tries to get the geographical data from that one.
  • geofill.lookup(properties,postcode) tries to get the geographical data from the postcode provided in your form.

Both methods take an object which lists the form field IDs to be filled as the parameter. The data returned is city, country, postcode, latitude and longitude.

Both methods also allow you to define a callback function to handle errors or re-use the data in other ways than filling form fields.

For example to get the information connected with a post code you could simply do the following:

geofill.lookup(
{

callback:function(o){
console.log(o);
}

},’wc2h8ad’);

The returned object is:

{
city:”London”,
country:”United Kingdom”,
latitude:”51.51384”,
longitude:”-0.12857”,
postcode:”WC2H 8AD”
}

Useful? In any case it made me play more with the Geo API. Don’t forget that on the 7th of July I’ll be giving a free Tech Talk on Yahoo Placemaker where this will be one of the demos (probably, knowing myself I’ll have hacked other stuff by then). You can sign up for the tech talk on upcoming.