mySociety

Home

mySociety Blog

Blog posts in the category FixMyStreet

FixMyStreet for Councils – designed with councils, for councils

Written by on in FixMyStreet, Local government

 

Today we launch FixMyStreet for Councils, our street issue reporting software designed for council websites and built in consultation with a wide variety of local authorities across the UK.  FixMyStreet for Councils enables local authorities to deal more cheaply and efficiently with street problem reports.

The London Boroughs of Bromley and Barnet are the first local authorities to run the new FixMyStreet for Councils software.

Our national FixMyStreet.com site has operated since 2007, helping people easily and quickly report issues to the council and see what issues have already been reported in their area. We knew we’d done something right when councils began to enquire about incorporating FixMyStreet into their own websites. These local authorities recognised the system’s usability and the benefits of putting reports online, saving their residents and themselves time and reducing duplicate reports.

FixMyStreet for Councils is our response to this interest. It was built with input from different types of council – large, small, rural, urban – to see how we could put their requirements at the heart of the system while still prioritising their residents’ needs.

FixMyStreet for Councils offers:

  • A branded cloud service seamlessly branded to reflect each council website’s look and feel;
  • Customisable front-end: councils can include their own wording, add new problem categories that are relevant to them and get rid of the ones that aren’t;
  • Mobile reporting options including mobile web pages and iPhone and Android apps with council’s branding;
  • A dashboard for council employees, allowing them to see, at a glance, which problems have been fixed and which are still outstanding;
  • Integration with the national FixMyStreet.com site – all issues reported on the council’s website are reflected on FixmyStreet.com, and vice-versa;
  • Optionally, full integration with existing CRM or fault management systems.

FixMyStreet for Councils evolved from custom installations we created for several local authorities, including the London Borough of Barnet, who pioneered the software in January 2010. Chris Palmer, the Assistant Director of Communications at Barnet, says it has “made the council far more open, transparent and responsive”.  For an insight into the impact of FixMyStreet on Barnet’s relationship with its community, read our case study.

Report page from FixMyStreet on the Barnet council website

Channel shift

Our launch comes in response to a growing need in councils. Across the country there’s an impetus to shift services online. It’s easier for people to engage with their council digitally, and it really improves the quality of their transactions. Plus it saves money – and as we know, councils are cutting budgets where they can in the current climate.

SOCITM’s 2011 Channel Value Benchmarking survey underlines just how wide the cost gap can be. It reckons to £8.62 per face-to-face visit, £2.83 per phone call, and just £0.15 per visit to a council website.

We’ve put a lot of thought into this launch and our hope is that it will be as beneficial for citizens as it is for the councils we built it for – after all, making services more efficient and saving them money is good for all of us.

  • FixMyStreet puts reports online for everyone to see, cutting down on duplicate reports
  • Back-end integration saves ‘re-keying’ time, when staff members are typing details into the council database
  • In the long run, FixMyStreet can increase citizen engagement, giving residents an enhanced feeling of empowerment, and a desire to safeguard the community
  • FixMyStreet for Councils is economically priced, and includes all hosting and maintenance, so it doesn’t place a burden on council IT staff
  • Residents become useful informers: Chris Palmer of Barnet Council describes FixMyStreet users as “our eyes and ears on the ground”

Cost benefits aside, there’s an increasing desire from all of us to do things on the go, simply and quickly. We see it in the private sector, and we’re beginning to expect it in the public sector, too.

For an insight into how FixMyStreet for Councils has altered the London Borough of Barnet’s relationship with its community, read our case study here.

If you’d like to find out more about FixMyStreet for Councils, drop us a line or read more.

The London Borough of Barnet and FixMyStreet for Councils

Written by on in FixMyStreet, Local government

Fixing Up The Network by Fabio

The London Borough of Barnet replaced online street issue reporting forms with FixMyStreet software on their website in January 2010. Our experience with Barnet and several other councils has led to creation of FixMyStreet for Councils, a tailored service designed  for local authority websites. We interviewed Chris Palmer, the council’s Assistant Director of Communications, who is responsible for online engagement, about Barnet’s experiences with FixMyStreet, and how it fits with the council’s web strategy.  

Barnet is a forward-looking council when it comes to using the web to engage people and help them interact with the council. What have been your key goals in this area?

Our general aim is to get the council out of people’s way, to give people direct access to services. We don’t want residents to feel like they have to go through a complex council process in order to get anything done –  so removing process from the equation as much as removing council from the equation is our goal with online.

One of our challenges, as with many other councils, is that technology moves so quickly. Nowadays people expect great, highly-usable web tools as they get this in other sectors – so we need to look at how we continually refresh that relationship with our residents.

What were you looking to achieve with FixMyStreet – and have you been successful?

Rather than putting you through a “customer service process”, FixMyStreet gives you a clear idea of what’s happening, allows you to contact your council from standing in the middle of the street with your phone, and gets you a quick response.

It has worked incredibly well. We launched at a time when a lot of people were worried about the state of the roads. So FixMyStreet was an excellent tool to allow people to feel like they were taking part, rather than just grumbling that there’s a pothole and the council hasn’t filled it. So it’s making people slightly more active citizens rather than passive grumblers. And that’s very important and quite empowering for people.

Why did you choose to have a map-based solution, as opposed to forms which are the more traditional approach to reporting?

For us, there’s two things, and one goes back to how we’ve worked with mySociety. FixMyStreet’s ease and mobility was a real seller for us.

The fact that somebody contacts their council while standing in the street is very important to us. Residents appreciate that it’s the council who comes and fills the pothole, but they don’t necessarily want to know the details of the process. So the more we can strip out that process and get them straight to the issue, the better.

What was the impact of FixMyStreet on the council’s engagement with residents?

I suspect that if you look at the figures, there hasn’t been a huge increase, because most of our online contact is about where schools are, standard things you’d expect.

But what it has done is make the council far more open and transparent and more responsive. Generally, people’s perception of the council is that stuff goes in and you never hear again. At the same time the council never hears back either once we’ve fixed the problem. FixMyStreet enables the reporter to go back, and to say ‘that’s sorted; we’re done’.

We get Facebook comments, we get tweets saying ‘I reported flytipping to Barnet Council – that mattress was gone the following day’. And that kind of stuff is gratifying.

Paaltje is Kapot by Pim Geerts

This sort of transparency is relatively new in local government. What was your experience with FixMyStreet?

We welcome transparency and here it has been entirely positive. I haven’t seen any particular grumbling around FixMyStreet itself. Grumbles tend to come through other media. FixMyStreet appears to be a medium for reporting rather than complaining, and that’s what we’ve found such a positive experience about it.

Before now, we’ve tended to regard almost any contact as a complaint – say somebody’s rung the council up and reported that a lightbulb in a streetlight isn’t working. In fact, it’s an entirely positive relationship with a resident. A resident has seen something in the street isn’t working, they inform the council and we’ll go and fix it. So I think it rather changes our relationship with residents – it makes them our eyes and ears on the ground .

More recently Barnet took the next step and created a direct link with the council’s CRM and FixMyStreet. What was the idea behind that?

The council has invested in an infrastructure – we’re interested in seeing if we can move to a service where not only does somebody report something, but we can tell them the processes of being fixed.

So in an ideal world we could tell somebody “Thank you for reporting this” – “It’ll be fixed tomorrow” – “It’s now been fixed”.

We’re still some way off that, but it’s that move to a greater transparency. I’m a great believer that in communications, just telling somebody what’s going to happen next, is very important to building a good relationship with the resident.

How was mySociety as a partner to work with?

Challenging, but in a good way. The strength of mySociety is that you bring new ideas and approaches. mySociety did a review of some of the old screens we had in customer services, where the information we were presenting on screens to the people answering the phones was over complex, and mySociety helped us to strip out that complexity.

Another lesson from the work we’ve done with mySociety has been about the importance of making the information that we and our public sector partners hold more easily available to the community.

It’s a very different relationship from most of our suppliers, in that there isn’t a product in a box. Because of the nature of the things we’ve done, it’s been quite testing – you’ve pushed us in one way, we’ve pushed you another way – we’ve worked together – which is both the opportunity and the pain of innovation.

That’s a good thing in terms of the people we’ve worked with in mySociety – we’ve had an incredibly positive relationship.

 

If you’d like to find out more about FixMyStreet for Councils, drop us a line or read more.

Image credits: Fixing up the Network by Fabio; Paaltje is kapot by Pim Geerts, both used with thanks under the Creative Commons Licence.

FixMyStreet’s been redesigned

Written by on in FixMyStreet, Launches, Local government, News

FixMyStreet, our site for reporting things like potholes and broken street lights, has had something of a major redesign, kindly supported in part by Kasabi. With the help of Supercool, we have overhauled the look of the site, bringing it up to date and making the most of some lovely maps. And as with any mySociety project, we’d really appreciate your feedback on how we can make it ever more usable.

The biggest change to the new FixMyStreet is the use of responsive design, where the web site adapts to fit within the environment in which it’s being viewed. The main difference on FixMyStreet, besides the obvious navigation changes, is that in a small screen environment, the reporting process changes to have a full screen map and confirmation step, which we thought would be preferable on small touchscreens and other mobiles. There are some technical details at the end of this post.

Along with the design, we’ve made a number of other improvements along the way. For example, something that’s been requested for a long time, we now auto-rotate photos on upload, if we can, and we’re storing whatever is provided rather than only a shrunken version. It’s interesting that most photos include correct orientation information, but some clearly do not (e.g. the Blackberry 9800).

We have many things we’d still like to do, as a couple of items from our github repository show. Firstly, it would be good if the FixMyStreet alert page could have something similar to what we’ve done on http://planningalerts.barnet.gov.uk/, providing a configurable circle for the potential alert area. We also are going to be adding faceted search to the area pages, allowing you to see only reports in a particular category, or within a certain time period.

Regarding native phone apps – whilst the new design does hopefully work well on mobile phones, we understand that native apps are still useful for a number of reasons (not least, the fact photo upload is still not possible from a mobile web app on an iPhone). We have not had the time to update our apps, but will be doing so in the near future to bring them more in line with the redesign and hopefully improve them generally as well.

The redesign is not the only news about FixMyStreet today

As part of our new DIY mySociety project, we are today publishing an easy-to-read guide for people interested in using the FixMyStreet software to run versions of FixMyStreet outside of Britain. We are calling the newly upgraded, more re-usable open source code the FixMyStreet Platform.

This is the first milestone in a major effort to upgrade the FixMyStreet Platform code to make it easier and more flexible to run in other countries. This effort started last year, and today we are formally encouraging people to join our new mailing list at the new FixMyStreet Platform homepage.

Coming soon: a major upgrade to FixMyStreet for Councils

As part of our redesign work, we’ve spoken to a load of different councils about what they might want or need, too. We’re now taking that knowledge, combining it with this redesign, and preparing to relaunch a substantially upgraded FixMyStreet for Councils product. If you’re interested in that, drop us a line.

Kasabi: Our Data is now in the Datastore

Finally, we are also now pushing details of reports entered on FixMyStreet to Kasabi’s data store as open linked data; you can find details of this dataset on their site at http://kasabi.com/dataset/fixmystreet. Let us know if it’s useful to you, or if we can do anything differently to help you.

Technical details

For the web developers amongst you – we have a base stylesheet for everyone, and another stylesheet that is only included if your browser width is 48em or above (an em is a unit of measurement dependent on your font size), or if you’re running Internet Explorer 6-8 (as they don’t handle the modern CSS to do this properly, we assume they’ll want the larger styles) using a conditional comment. This second stylesheet has slight differences up to 61em and above 61em. Whilst everything should continue to work without JavaScript, as FixMyStreet has done with its map-based reporting since 2007, where it is enabled this allows us to provide the full screen map you can see at large screen sizes, and the adjusted process you see at smaller resolutions.

We originally used Modernizr.mq() in our JavaScript, but found that due to the way this works (adding content to the end of the document), this can cause issues with e.g. data() set on other elements, so we switched to detecting which CSS is being applied at the time.

On a mobile, you can see that the site navigation is at the end of the document, with a skip to navigation link at the top. On a desktop browser, you’ll note that visually the navigation is now at the top. In both cases, the HTML is the same, with the navigation placed after the main content, so that it hopefully loads and appears first. We are using display: table-caption and caption-side: top in the desktop stylesheet in order to rearrange the content visually (as explained by Jeremy Keith), a simple yet powerful technique.

From a performance point of view, on the front page of the site, we’re e.g. using yepnope (you can get it separately or as part of Modernizr) so that the map JavaScript is downloading in the background whilst you’re there, meaning the subsequent map page is hopefully quicker to load. I’m also adding a second tile server today – not because our current one isn’t coping, it is, but just in case something should happen to our main one – we already have redundancy in our postcode/area server MapIt and our population density service Gaze.

If you have any technical questions about the design, please do ask in the comments and I’ll do my best to answer.

International potholing

Written by on in FixMyStreet, Thoughts

Basak San Nicholas street

At mySociety we take some pride in knowing that FixMyStreet has helped rid the world of thousands of potholes over the years, but of course our contribution to unbroken roads is merely the start of the process. Certainly, reporting a hole on FixMyStreet is easy (we’ve gone out of our way to make sure that is the case), but we do appreciate that a hole remains a hole until somebody takes the trouble to actually fill it in. So really it is all the inspectors, despatchers, logistic and supply teams, fleet mechanics, and repair crews who make the world a smoother, less perforated place.

We’re currently working on a pilot project in the city of Cebu (the “second city” of the Philippines) with the World Bank and transport experts ITP that will implement a FixMyStreet-based reporting service as part of the ongoing battle to keep its roads and streetlights in good repair. Later in the year we will have more to report, but for now—before anything is up and running—we can start by saluting the work of some of the remarkable people who fix the roads (and replace the bulbs) there.

(more…)

FixMyStreet – another big number

Written by on in FixMyStreet

CAT 320D L Excavator Diecast Diorama: Demolition site by PMC 1stPix

Just a week after WhatDoTheyKnow’s big, round number, FixMyStreet also passed a significant milestone.

200,000 reports have been sent through FixMyStreet since its launch in February 2007. It currently sends an average of 250+ messages about potholes, broken streetlights, and other problems to local authorities each day. So far this month, we’ve processed just over 5,000 reports.

Those reports are the work of over 87,000 people, 52% of whom had never before reported an issue to the council. That statistic is important to us: we aim to make it easy to access civic rights, especially for people doing so for the first time.

FixMyStreet.com is a site with a simple premise, and it hasn’t changed greatly since 2007 – though it is currently undergoing a facelift, bringing it more in line with today’s design expectations. Last year we introduced user accounts and zoomable maps, along with a few tweaks here and there.

Like other mySociety projects, FixMyStreet is, of course, built on open code, so that it can be replicated by anyone with a little technical knowledge. The FixMyStreet interface is already up and running in Norway, and soon, the Philippines will see trials of their own version – proving that the model can work in very different infrastructures. Meanwhile, the basic FixMyStreet concept has been replicated in Brazil, New Zealand, and South Korea. Here in the UK, some councils have bought FixMyStreet to embed into their own websites.

FixMyStreet sends reports to the council, and also publishes them online – so each report is read by many people. This simple system helps them find out more about their local community, and what the council are doing to get things fixed.

Uneven paving stones and malfunctioning pelican crossings may not be the stuff of high drama, but against expectations, FixMyStreet does make for fascinating reading sometimes. Take a look at this page if you’d like to see some of the more unusual reports. And if you’d like some insight into some of the issues our developers deal with, you might like to read Matthew Somerville’s solution to the dog poo problem. It’s all glamour at the cutting edge of FixMyStreet.

Advent calendar

Written by on in Events, FixMyStreet, FixMyTransport, HassleMe, TheyWorkForYou, WhatDoTheyKnow

mySociety Christmas countdown

December 23rd

Santa's Chocolate Coin Mint by Johnathan_W

If you haven’t got a penny,

A ha’penny will do,

If you haven’t got a ha’penny,

Then God bless you.

We wish you all a merry and prosperous Christmas – and for those of you who are already feeling quite prosperous enough, may we point you in the direction of our charitable donations page?

mySociety’s work is made possible by donations of all sizes and from all sorts of people. Those donations help fund all the online projects we create; projects that give easy access to your civic and democratic rights. If that’s important to you, show your appreciation, and we promise we’ll make the best use of every penny.

Thank you for sticking with us through this month-long post. We hope you’ve found it interesting and we wish you the very merriest of Christmases.

We hope you’ll continue to follow us on Twitter, Facebook, or Google+ – see our Contacts page to find individual projects’ social media links.

December 22nd

Santa Watching by LadyDragonflyCC

What’s behind the door? A letter to Santa.

Dear Santa,

We think we’ve been pretty good this year. We’ve tried to keep our local neighbourhood clean, help with problems, and aid those in need, so we’re hoping there are a few presents coming our way.

If you can fit them down the chimney, here’s what we’re dreaming of:

More publicly available data Of course, we were delighted to hear in Mr Osborne’s autumn statement that all sorts of previously-inaccessible data will be opened up.

We’re wondering whether this new era will also answer any of our FixMyStreet geodata wishes. Santa, if you could allocate an elf to this one, we’d be ever so pleased.

Globalisation …in the nicest possible way, of course. This year has seen us work in places previously untouched by the hand of mySociety, including Kenya and the Philippines. And we continue to give help to those who wish to replicate our projects in their own countries, from FixMyStreet in Norway to WhatDoTheyKnow in Germany.

Santa, please could you fix it for us to continue working with dedicated and motivated people all around the world?

A mySociety Masters degree We’re lucky enough to have a team of talented and knowledgeable developers, and we hope we will be recruiting more in the coming year. It’s not always an easy task to find the kind of people we need – after all, mySociety is not your average workplace – so we’ve come to the conclusion that it’s probably easiest to make our own.

Back in February, Tom started thinking about a Masters in Public Technology. It’s still something we’re very much hoping for. Santa, is it true you have friends in academic circles?

FixMyTransport buy-in - from everyone! Regular users of FixMyTransport will have noticed that there are different kinds of response from the transport operators: lovely, fulsome, helpful ones, and formulaic ones. Or, worse still, complete refusal to engage.

Santa, if you get the chance, please could you tell the operators a little secret? Just tell them what those savvier ones already know – that FixMyTransport represents a chance to show off some fantastic customer service. And with 25,000 visitors to the site every week, that message is soon spread far and wide.

(more…)

Fix Before the Freeze: it’s warming up

Written by on in Appeals, FixMyStreet

Roadworks Ahead by John Blackbourn, used with thanks under the Creative Commons licence

In the nine days our Fix Before the Freeze campaign has been running, there’s been a 47% increase in reports on FixMyStreet.com. Thank you to everyone who has spread the word or remembered to use the site to get something fixed.

As you may remember, the campaign encourages you to report problems such as broken streetlights or potholes before winter comes. It’s great to see this start to happen, and we hope you’ll experience the benefits once the cold weather takes grip. Hey, you might even find that the warm glow of community spirit cuts a few quid from your fuel bills…

Meanwhile, we’re sure there are still plenty of pavements, roads and amenities that could do with a patch-up before winter. So if there’s a gap on a notice board near you, don’t forget our print-outs and resources here. How about printing out a few and leaving them in your local library, cafe, or community centre?

Fix Before the Freeze

Written by on in Appeals, FixMyStreet

FixMyStreet.com: Fix Before the Freeze

You may already be aware of our website FixMyStreet.com, which helps you report common street problems – such as potholes and uneven pavements – to the relevant local council. This year, we thought we’d give people a gentle nudge before winter comes.

Many of the 1,000  issues which the site deals with every week are of the sort which are far better seen to before the big freeze. Potholes only worsen with the frost, and no-one wants a dodgy streetlight once the long dark nights are here.

How to join Fix Before the Freeze

  • Check for problems Will your walk home from work tonight be in the dark? Look out for areas that could be better lit or paths that might cause people to stumble in the dark.
  • Report it If you see something that is better fixed before the freeze, now’s the time to let your council know. It only take a minute at FixMyStreet.com.
  • Spread the word We’ve created the image above as a website icon, flier, and poster. Follow the links at the foot of this post to download them, or use the code if you’d prefer to link back. Why not put one on your blog, hand them out at work, or stick one in your window? Please spread the word among friends and family too.
  • Spread the word further We’d be grateful for mentions on your preferred social media hang-out (you can use the #FB4TF hashtag).
  • Keep in touch You can ‘like’ us on Facebook here, or follow us on Twitter here.

Let’s get our local communities as safe as they can be, before the cold weather hits.

Downloads

Click on each thumbnail to be taken to the actual-size resource, then right click or ctrl+click to save a copy to your hard drive.

A4 sheet of fliers to print out:

FixBeforeTheFreeze flyers

Poster to print out:

fixbeforethefreeze poster

Badge for your blog or website (165×165 pixels):

fixbeforethefreeze badge

(If you’d like a larger image, feel free to save the one at the top of this post).

HTML for inserting the badge onto your site without downloading – just copy and paste the below into your HTML editor:

<a href=”http://www.mysociety.org/?p=4790″ title=”Find out more about Fix Before the Freeze from FixMyStreet.com”><Img alt=”Fix Before the Freeze – report those dangerous potholes and  broken streetlights before winter hits” src=”http://blogs.dev.mysociety.org/wp-content/uploads/2011/11/fixbeforethefreezebadge165.gif”></a>

Fix my… hospital? university campus? supermarket?

Written by on in FixMyStreet

Pothole in the shape of a heart, by Waldo Pepper

FixMyStreet, is, as its name suggests, a system that reports street problems to the relevant local council. But at heart, it’s a problem-reporting system that could be adapted for a multitude of different uses.

For example, with just a few modifications, large institutions such as hospitals could use it for everyone – staff, visitors, patients – to report maintenance issues. Same for universities, especially those spread over large campuses. Supermarket chains could adapt it so that people could report abandoned trolleys – in fact we’ve been admiring an Aussie site that’s way ahead of us on that idea.

We’ve been enjoying thinking of new possible uses, from the practical to the frankly rather ridiculous, but we’re also keen to hear any ideas we might not have thought of. Is there an area in your life – personal or professional – that would be made much easier if you had an easy way to report it on-the-go? What challenges do you see, and why hasn’t it been done  before? Ideas below, please.

Technical look at the new FixMyStreet maps

Written by on in FixMyStreet, Free Data, Technical

This post explains how various aspects of the new FixMyStreet maps work, including how we supply our own OS StreetView tile server and how the maps work without JavaScript.

Progressive enhancement

During our work on FiksGataMi (the Norwegian version of FixMyStreet) with NUUG, we factored out the map code (for the Perlmongers among you, it’s now using Module::Pluggable to pick the required map) as FiksGataMi was going to be using OpenStreetMap, and we had plans to improve our own mapping too. Moving to OpenLayers rather than continuing to use our own slippy map JavaScript dating from 2006 was an obvious decision for FiksGataMi (and then FixMyStreet), but FixMyStreet maps have always been usable without JavaScript, utilising the ancient HTML technology of image maps to provide the same functionality, and we wanted to maintain that level of universality with OpenLayers. Thankfully, this isn’t hard to do – simply outputting the relevant tiles and pins as part of the HTML, allowing latitude/longitude/zoom to be passed as query parameters, and a bit of maths to convert image map tile clicks to the actual latitude/longitude selected. So if you’re on a slow connection, or for whatever reason don’t get the OpenLayers JavaScript in some way, the maps on FixMyStreet should still work fine. I’m not really aware of many people who use OpenLayers that do this (or indeed any JavaScript mapping API), and I hope to encourage more to do so by this example.

Zooming

We investigated many different maps, and as I wrote in my previous blog post, we decided upon a combination of OS StreetView and Bing Maps’ OS layer as the best solution for the site. The specific OpenLayers code for this (which you can see in map-bing-ol.js is not complicated (as long as you don’t leave in superfluous commas breaking the site in IE6!) – overriding the getURL function and returning appropriate tile URLs based upon the zoom level. OpenLayers 2.11 (due out soon) will make using Bing tiles even easier, with its own seamless handling of them, as opposed to my slight bodge with regard to attribution (I’m displaying all the relevant copyright statements, rather than just the one for the appropriate location and zoom level which the new OpenLayers will do for you). I also had to tweak bits of the OpenLayers map initialisation so that I could restrict the zoom levels of the reporting map, something which again I believe is made easier in 2.11.

OpenStreetMap

Having pluggable maps makes it easy to change them if necessary – and it also means that for those who wish to use it, we can provide an OpenStreetMap version of FixMyStreet. This works by noticing the hostname and overriding the map class being asked for; everything necessary to the map handling is contained within the module, so the rest of the site can just carry on without realising anything is different.

OS StreetView tile server

Things started to get a bit tricky when it came to being ready for production. In development, I had been using http://os.openstreetmap.org/ (a service hosted on OpenStreetMap’s development server) as my StreetView tile server, but I did not feel that I could use it for the live site – OpenStreetMap rightly make no reliability claims for it, it has a few rendering issues, and we would probably be having quite a bit of traffic which was not really fair to pass on to the service. I wanted my own version that I had control over, but then had a sinking feeling that I’d have to wait a month for something to process all the OS TIFF files (each one a 5km square) into millions and millions of PNG tiles. But after many diversions and dead ends, and with thanks to a variety of helpful web pages and people (Andrew Larcombe’s guide to his similar install was helpful), I came up with the following working on-demand set-up, with no pre-seeding necessary, which I’m documenting in case it might be useful to someone else.

Requests come in to our tile server at tilma.mysociety.org, in standard OSM/Google tile URL format (e.g. http://tilma.mysociety.org/sv/16/32422/21504.png. Apache passes them on to TileCache, which is set up to cache as GoogleDisk (ie. in the same format as the URLs) and to pass on queries as WMS internally to MapServer using this layer:

[sv]
type=WMS
url=path/to/mapserv.fcgi?map=os.map&
layers=streetview
tms_type=google
spherical_mercator=true

MapServer is set up with a Shapefile (generated by gdaltindex) pointing at the OS source TIFF and TFW files, meaning it can map tile requests to the relevant bits of the TIFF files quickly and return the correct tile (view MapServer’s configuration – our tileserver is so old, this is still in CVS). The OUTPUTFORMAT section at the top is to make sure the tiles returned are anti-aliased (at one point, I thought I had a choice between waiting for tiles to be prerendered anti-aliased, or going live with working but jaggedy tiles – thankfully I persevered until it all worked :) ).

Other benefits of OpenLayers

As you drag the map around, you want the pins to update – the original OpenLayers code I wrote used the Markers layer to display the pins, which has the benefit of being simple, but doesn’t fit in with the more advanced OpenLayers concepts. Once this was switched to a Vector layer, it now has access to the BBOX strategy, which just needs a URL that can take in a bounding box and return the relevant data. I created a subclass of OpenLayers.Format.JSON, so that the server can return data for the left hand text columns, as well as the relevant pins for the map itself.

Lastly, using OpenLayers made adding KML overlays for wards trivial and made those pages of the site much nicer. The code for displaying an area from MaPit is as follows:

    if ( fixmystreet.area ) {
        var area = new OpenLayers.Layer.Vector("KML", {
            strategies: [ new OpenLayers.Strategy.Fixed() ],
            protocol: new OpenLayers.Protocol.HTTP({
                url: "/mapit/area/" + fixmystreet.area + ".kml?simplify_tolerance=0.0001",
                format: new OpenLayers.Format.KML()
            })
        });
        fixmystreet.map.addLayer(area);
        area.events.register('loadend', null, function(a,b,c) {
            var bounds = area.getDataExtent();
            if (bounds) { fixmystreet.map.zoomToExtent( bounds ); }
        });
    }

Note that also shows a new feature of MaPit – being able to ask for a simplified KML file, which will be smaller and quicker (though of course less accurate) than the full boundary.

RSS feeds

Categories

Recent Posts