Archive | Projects RSS feed for this section

Extract KML data from Google My Maps

4 Oct

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

8 Sep
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

2 Jul

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!