On Twitter about 15 minutes ago, @greenerleith asked: “Has anyone worked out how to display the most recent #fixmystreet reports on a local map widget that can be embedded? #hyperlocal”
Like this? :)
It’s very simple to do:
- Go to FixMyStreet, and locate any RSS feed of the latest reports you want (for the above map, I used Edinburgh Waverley’s postcode of EH1 1BB; you could have used reports to a particular council, or ward, using the Local alerts section). Copy the URL of the RSS feed.
- Go to Google Maps, paste the RSS feed URL into its search box, and click Search Maps.
- Click the “Link” link to the top right of the map, and copy the “Paste HTML to embed in website” code.
- Paste that code into your blog post, sidebar, or wherever (you can alter the code to change its size etc.).
- Done. :-)
The latest reports from FixMyStreet, superimposed on a Google Map, embedded in your blog. Hope that’s helpful.
RSS feed
June 16th, 2010 at 9:33am
Currently, Google Maps displays the title of the map as “New local problems on FixMyStreet”: would it be possible to change this to include the postcode and radius?
I currently have two items in “My Maps” called “New local problems on FixMyStreet” and I’d like to be able to differentiate!
Thanks in advance :D
June 16th, 2010 at 10:15am
Wow! What a fast response :) Thanks for the advice, will let you know how I get on.
Cheers,
Al @greenerleith
June 16th, 2010 at 10:23am
Genius, took me 7 minutes to do – check it out at http://www.greenerleith.org/fix
Thanks Allan.
June 17th, 2010 at 10:02am
Nice. And, can the url of the problem be passed to the Google map too? I’m sure it can, but I’m not smart enough to know how to do it.
June 17th, 2010 at 10:35am
Allan – I’ve logged that here: http://github.com/mysociety/fixmystreet/issues/issue/3 – hopefully that can be done at some point.
Ally – great, glad to hear it :)
Pete – it just uses Google Maps’ ability to plot RSS feeds, which doesn’t seem to offer that for some reason. I guess I could add a manual link back within the description of each item, though that seems a bit silly given the link is already given in the feed and all other RSS readers would then get a needless extra link.
June 17th, 2010 at 11:06am
Silly, but I did it anyway, couldn’t see any other way to provide a link back sadly. Hopefully not too distracting in other RSS readers.
June 17th, 2010 at 2:36pm
Thanks Matthew.
Have discussed with our customer service centre manager here at North Devon Council. We think it will make it easier for the team to deal with reports so we’re going to put it on our website.
Will probably be available some time next week on northdevon.gov.uk.
Eventually we’re aiming at full integration with our customer relations management system.
June 18th, 2010 at 4:13pm
Re the links to the reports:
When using an Atom feed, Google seems to pick up the link and put it on the title in the balloon pop-up. See eg http://maps.google.com/maps?q=http://robert.mathmos.net/photos/feed.xml
The same thing doesn’t seem to happen with RSS for some reason.
June 18th, 2010 at 4:33pm
Ah, interesting. Well, when someone has a spare moment, we can switch the feeds to be Atom if we can be bothered :) Alternatively, report it to Google as it seems a bit odd they’d do it for Atom feeds but not RSS…
June 27th, 2010 at 8:11pm
This is great :)
Apologies if I’m being thick, but this doesn’t provide a self-updating map does it? That’d be really useful
Cheers
John
June 27th, 2010 at 9:18pm
oh, sorry! Presumably does auto update as it uses the RSS url …is that right?
Been a long day!
John
June 27th, 2010 at 10:21pm
Yes, it should keep itself up to date. Thanks :)
July 7th, 2010 at 12:24pm
This is an excellent website and I’m trying to get the embedding working our local residents association website but having some problems. I have a feed for my local ward (Stockwell in Lambeth) which is feed://www.fixmystreet.com/rss/reports/Lambeth/Stockwell. When I put this in the search box in Google Maps, I get “Your search for feed://www.fixmystreet.com/rss/reports/ near Lambeth/Stockwell did not match any locations.” If I remove the feed:// bit, I get a result of Turnham Green in Chiswick! Can anyone advise what I might be doing wrong please?
Many thanks
Darius
July 14th, 2010 at 10:06am
Hi Darius,
It has to be a full URL with http:// not feed:// – http://www.fixmystreet.com/rss/reports/Lambeth/Stockwell works here, I’ve just tried it. It looks like without the http:// Google Maps tries to do something different and a bit odd :)
ATB,
Matthew