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.
Wow! What a fast response 🙂 Thanks for the advice, will let you know how I get on.
Cheers,
Al @greenerleith
Genius, took me 7 minutes to do – check it out at http://www.greenerleith.org/fix
Thanks Allan.
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 😀
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.
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.
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.
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.
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.
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…
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
oh, sorry! Presumably does auto update as it uses the RSS url …is that right?
Been a long day!
John
Yes, it should keep itself up to date. Thanks 🙂
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
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