Archive | Projects RSS for this section

Extract KML data from Google My Maps

So this is something that’s been bugging me for a while now. At the City of Lincoln Council I promote not only the use of web based tools such as those that Google supply, but also the use of open data. To that, I created the site data.lincoln.gov.uk, a WordPress powered site which pushes out Lincoln data sets in a nice, easey, machine readable way. CSV, RDF – those boxes got ticked early on. But KML was eluding me. We create most of our maps by hand in Google maps. Now, I know that this produces KML – it can be used in Google Earth, there’s a link for it and all. But downloading the “KML” file from this link produces what looks like a simple hook in for Google Earth to retrieve the online KML data.

Humm.

Let’s take a look at the problem. We’ll use this map here for reference. The url from the “Download to Google Earth” button (which you can get by right clicking on the button) defaults to this:

http://www.google.co.uk/maps/ms?ie=UTF8&hl=en&vps=1&jsv=280a&msa=0&output=nl&msid=100185268874394349858.000459d5fe17d48f39f66

This gives us our KML file that hooks into Google Earth; great for that use, not so good for my data site! Take a look at the url – see that bit that says “output = nl”? Let’s change that to “output=kml”. That gives us the link:

http://www.google.co.uk/maps/ms?ie=UTF8&hl=en&vps=1&jsv=280a&msa=0&output=kml&msid=100185268874394349858.000459d5fe17d48f39f66

…which produces EXACTLY what we want – the makeup of the map in raw KML. Spiffing! I can’t take credit from that – this article helped me out.

What I have done, however, is take it further. how can we engineer this to get the KML of any map? The key is in the msid part. This is what Google uses to identify a map. In the map, click on the “Link” button and take a look at the link. The msid is encoded in there. Simply replace the msid in the link above with the msid of the map you want the KML for and you’re away!

Job done!

Hopefully that’s all clear and of some use to you! I’m off to convert all of our maps to KML links so that we can provide them on our data site! Ta ta!

Linking Lincoln

This post brought to you from Posterous! Cross posting works then, I see…

Right, let me elaborate slightly from the posting on my portfolio. Linking Lincoln is a project I’ve been working on for some time now which I am so glad I can finally put out and show to you all!

I designed and developed the layout in WordPress, taking influence from a logo created by Optima Design to promote devbelopment in the City. The site takes its primary colour scheme from this logo and was intended to feel more like an information website than a blog, hence the news area being less prominent. The design usses some subtle CSS3 features to add depth, predominently text shadows and gradients.

The site is intended to mesh with printed media used to advertise Linking Lincoln projects with QR codes visible on posters; mobile users can scan these to visit pages on Linking Lincoln relevant to the project.

All in all I’m very pleased with this design; it’s simple and functional and has given me, again, more chance to experiment with the WordPress framework and CSS3 techniques!

Click here to visit the Linking Lincoln website.

Stories With Words

Just a quickie to say that I’ve started up a blog to record my ventures in creative writing. It’s something I had a passion for in school and have, over the last couple of years, started really getting back into.

The site is called Stories With Words, you can find it here and, if you’re interested, read the first published story entitled The Lovers Embrace here.

Feedback is more than welcome!

Heritage Connect

Hi all! Long time since I last updated but, hey ho! Time to focus on a project I completed a while ago but only launched last week.

The Heritage Connect website

The Heritage Connect website

Heritage Connect is a web tool which allows users to explore the various character areas of Lincoln, discovering information on monuments, history, structure and sports a number of whizzy interactive features such as commenting, user generated image galleries, videos and audio files.

It’s incredibly comprehensive and all of the data was put together by the City Council Heritage team with A Recipe for Success developing the framework. The project was supported by English Heritage and the Heritage Lottery Fund.

My involvement was in as a technical advisor, looking at the usage of various API’s such as Google maps and YouTube to help us embed the interactive content as easily as possible, and as the primary designer, making the pretties including the site layout (both of them – more on that in a mo) and the various icons used throughout the site.

One of the super nifty things about Heritage Connect is that it also comes in a portable format. When accessed from a smartphone (iPhone, Android etc) the site takes on a more compact appearance and actually uses GPS positioning to direct the user straight to their nearest character areas. Cool for tourists on the move!

All in all I’m very proud to have been involved in Heritage Connect. I think it’s a tool that many people will get enjoyment from, whether they want to delve deep into the rich information or simply get a better idea of their surroundings.

Implementing custom HTML in WordPress

As you will know from the last post, I’m working on getting Lincoln’s election data into the Open Election Data project. RDFa-ifying the content on our website was fairly straightforward involving me having to add funky attributes to the HTML pages. The next step, however, was a bit tougher as links to the pages had to be discoverable. Again, this involved adding some custom RDFa attributes to the HTML – this was not possible in our admin system without some severe jiggery-pokery, so I turned to the recently launched data.lincoln.gov.uk.

What should have been straightforward, however, still proved problematic. I set up this post initially and grit my teeth upon the first publish when I realised that WordPress had filtered out all the RDFa goodness. This is down to the built in kses filter which ensures that no ‘dodgy’ code is put into posts and comments. Comments I’m more than happy to have protected but, as I’m the one who controls the posts, I was more than a little grumpy that I was being denied free regin.

I did some digging, came up with a number of people having the same problem, tried editing the kses file, hit head on wall and then eventually came across this plugin. It’s a beauty of a plugin and does exactly what I needed – allows you free reign to add whatever HTML you want to your WordPress posts. Installed, activated and now the ward list on data.lincoln.gov.uk is fully RDFa-ified. Simples.

So, if you need to fiddle the HTML, maybe adding some RDFa or microformats, on your WordPress blog, make sure you fire that plugin up.