Sunday 8 March 2009

Blogger isn't inserting line breaks

This morning I went on Animal, then we went to Church.

After Church I checked my email and Deviant art, then it was jin the pinner time.

After dinner I watched 'In the Shadow Of The Moon' with Mac, Ben and Matthew, which was quite good. It was just interviews with astronauts who had been to the moon and archive footage. It was a bit boring, but I found it quite interesting really. After that I checked the Luminous Landscape, Moose Peterson's blog, dpreview canon lens forum and Juza Nature Photography forum.

Then I started to look at geocoding again, particularly reverse geocoding. The point of this is so that when you geocode your image it can automatically be tagged with the name of the place where you took it, as well as the lat/lon. The google maps API has this built in, but after some googling it seems that the Yahoo Maps API doesn't do reverse geocoding.

I found this Flickr dev blog post about how they've added reverse geocoding to Flickr. There they say they're using Yahoo! GeoPlanet to do the reverse geocoding.

I thought I'd look at how GPicSync looks up the place names when geocoding. They use a service called GeoNames, which is free to use.

After playing with the Yahoo! GeoPlanet for a bit, it seems you can't actually reverse GeoCode from that. You can only search by place name or WOEID. So I will have to look at GeoNames for reverse GeoCoding with Yahoo.

In the evening I watched the latest episode of Lost again with Mac and Ben, then we watched a programme where Heston Blumenthal made a Victorian style dinner for some people.

Then the rest of the evening I was trying to work out how to get the reversed geocode data from GeoNames.org. The answer was that rather than using XMLRequest, you have to just insert a <script> tag into your page and set the src of that script tag to the url you are using to request the data. In the url you specify a callback function. You have to do it this way as the normal XMLRequest AJAX method doesn't work cross domain. I also tried using an image with the src set to the url I was requesting the data from, but this didn't seem to do anything. And I tried an Iframe with the src set to the url I was requesting the data from, but this just prompted me to download the remote server's response. Here's a good guide to Using JSON to Exchange Data that explains both how it works and how to use it.

Blogger is being quite annoying today, and isn't inserting line breaks when I press enter, so I'm just having to write this as one big text block in the HTML view and typing <br> where I want line breaks. I guess I should probably use paragraphs really.

The weather today was nice first thing, then rainy when we came home from Church until about 2pm. Then it was a mixture of sun, clouds and showers the rest of the day.

Food
Breakfast: Maple & Pecan crunch cereal with Crunchy Nut Cornflakes; cup o' tea.
Dinner: Chicken Curry; rice; sultanas. Pudding was Ice cream with toffee sauce. Coffee; Quality Street; Happy Hippo.
Tea: Ibuprofen; Mature cheddar cheese with French style salad sandwich; Packet of Chilli flavour Doritos; Red grapes; Slice of home-made blackcurrant jam Victoria sandwich cake; cup o' tea.
Supper: Coffee with Dooleys; Dark chocolate digestive.

No comments: