The client and server side code to produce a map of uk breweries based on OpenStreetMap Data (http://wiki.openstreetmap.org/wiki/WikiProject_United_Kingdom_Breweries)
Properties that are not defined for a given entity in the data set are being encoded into the JSON files as property=null. It would be better to just drop these, we have to test for existence in the JS client anyway.
The data files use a made-up json format. We should use geoJSON (http://geojson.org/) for future compatibility with other software.
This is not a particular issue for the BrewMap, but if we use this code for other things that may need linear features or areas rather than just points, a geoJSON compatible format would be sensible. (I am thinking about the uk historic map, which will want to show roman roads etc as linear features.
It might be useful to see the tagQueries displayed on a map (like the main features) as a selectable layer to help people look for issues in the areas they know about.
Probably implement with a GET parameter (....brewmap.html?tagQueries=yes)?
We should make the code more abstract so that the same piece of code can be used for different maps with minimum changes. This will mean transferring more data, such as text for the web pages into the configuration file. You could then serve multiple maps from one directory by passing the name of the configuration file in the URL.
The client code now uses BrewMapCfg.json to define what to plot on the map and which icons to use.
The server side code needs updating to read the same configuration file.
In issue #22 I mention the Denbies Wine Estate near Dorking which has 2 separate landuse areas ([1],[2]) both marked landuse=vineyard, which currently appear as two separate entities on the map. The way to resolve this is using relations to associate the ways. I couldn't think of anything more appropriate, so I used a site relation [3].
Add a layer selector so you can switch off (say) microbreweries etc. Probably means re-cycling right hand pane, so will make right hand pane a tab selectable pane for the key, statistics or layer switcher.
I'm not sure landuse=vineyard is an appropriate tag to be tracking. It describes in general what a piece of land is being used for rather than indicating that a producer of wine is there. Additionally, the craft|industrial=winery tags is not being tracked.
An example is Stanlake Park near Twyford which is a winery [1] with attached vineyard [2]. Currently, just the vineyard is showing.
Another example of where this is a problem is the Denbies Wine Estate near Dorking which has 2 separate landuse areas ([3],[4]) both marked landuse=vineyard, which currently appear as two separate entities on the map. See issue #23 for my suggest of how to associate the 2.
At low zoom levels the map is very cluttered with icons. If overlapping icons were clustered into a single icon it would be neater. I do not think that Leaflet supports this, so I think we would have to build a Leaflet plugin to do it.
The proposed tagging scheme has changed to be 'industrial=brewery'. Breweries tagged like this are appearing in the tagQueries page rather than on the map.
This is a trivial change to the server code to change the column that is queried, but needs a database import to add the 'industrial' column to the database - job for the weekend of 19 November.
The current approach of extracting all of the data into a single file is ok for the UK drinks industry, but will not scale well to either more dense points of interest, or a larger area.
The client should be able to request the features for a specific area as the map is panned and zoomed.
There are a few ways this could be done - will start to list them later.....