[Talk-GB] Highlighting an area ...
Ed Loach
ed at loach.me.uk
Fri Sep 21 12:51:34 BST 2012
Tom, I’m guessing when you save from QGIS you are also reprojecting?
Ed
From: Tom Chance [mailto:tom at acrewoods.net]
Sent: 21 September 2012 12:37
To: Lester Caine
Cc: talk-gb at openstreetmap.org
Subject: Re: [Talk-GB] Highlighting an area ...
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/2bdc55ed/attachment.html>
More information about the Talk-GB
mailing list