Skip navigation

  Help us to make more
useful things.
Donate to mySociety

Would you like to work with the team that built all these sites? We’re recruiting.

Embedding FixMyStreet Google map in a blog

Wednesday, June 16th, 2010 by Matthew Somerville

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? :)


View Larger Map

It’s very simple to do:

  1. 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.
  2. Go to Google Maps, paste the RSS feed URL into its search box, and click Search Maps.
  3. Click the “Link” link to the top right of the map, and copy the “Paste HTML to embed in website” code.
  4. Paste that code into your blog post, sidebar, or wherever (you can alter the code to change its size etc.).
  5. Done. :-)

The latest reports from FixMyStreet, superimposed on a Google Map, embedded in your blog. Hope that’s helpful.

14 Responses to “Embedding FixMyStreet Google map in a blog”

  1. Allan Lewis Says:

    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

  2. Ally Says:

    Wow! What a fast response :) Thanks for the advice, will let you know how I get on.

    Cheers,

    Al @greenerleith

  3. Ally Says:

    Genius, took me 7 minutes to do – check it out at http://www.greenerleith.org/fix

    Thanks Allan.

  4. Pete Says:

    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.

  5. Matthew Somerville Says:

    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.

  6. Matthew Somerville Says:

    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.

  7. Pete Says:

    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.

  8. Robert Whittaker Says:

    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.

  9. Matthew Says:

    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…

  10. John C Says:

    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

  11. John C Says:

    oh, sorry! Presumably does auto update as it uses the RSS url …is that right?

    Been a long day!

    John

  12. Matthew Somerville Says:

    Yes, it should keep itself up to date. Thanks :)

  13. Darius Poli Says:

    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

  14. Matthew Says:

    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


News & information:
Projects:
Keep in touch:
Technical:

mySociety is a project of UK Citizens Online Democracy (UKCOD). UKCOD is a registered charity in England and Wales, no. 1076346. Its company number is 03277032, and mySociety Ltd's is 05798215.