[Talk-GB] Highlighting an area ...

Tom Chance tom at acrewoods.net
Fri Sep 21 12:36:32 BST 2012


On 21 September 2012 12:20, Lester Caine <lester at lsces.co.uk> wrote:

> I'm in the middle of a web site overhaul for a town council, and I'd like
> to improve the site by using OSM maps for each of the wards. The problem is
> how to highlight the relevant area?


One simple solution I have used:

* get the OS open data boundary line dataset
* use QGIS to clip the shapefile to just have the boundaries for wards in
the town council's bounds
* save that as geojson from QGIS
* or as that previous step sometimes fails save as GPX, open in JOSM and
save as geojson (!)
* reference that in your leaflet or openlayers script, and use the
attributes and styling to only show the selected ward, or show it
differently, etc.

In some map tools I've created for a local political party branch using
leaflet-js, this results in nice polygons on a slippy map with the MapBox
streets tiles. Very clean, attractive, quick and easy to use. Also for this
site - www.londonrents.org.uk

You can also use QGIS to simplify the polygons if you're not bothered about
precision. I've done this for the rents map above, which resulted in a much
smaller chunk of geojson, which hugely improves loading times.

Regards,
Tom

-- 
http://tom.acrewoods.net   http://twitter.com/tom_chance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-gb/attachments/20120921/9473d83b/attachment.html>


More information about the Talk-GB mailing list