Closed Mike-Heneghan closed 4 years ago
Leaflet example rendering US States: https://leafletjs.com/examples/choropleth/example-basic.html
To Keep In Mind:
To do:
Wrote a method which takes in a service area and returns a geoJSON feature as an easy way to return data.
Rendered a scottish_local_authority service area on the map of Scotland.
The ServiceArea
model has a ServiceArea.code
pertaining to the specific region and a ServiceArea.type
based on the data set.
Rather than serving data sets and processing in the browser could instead use the ServiceArea type and code to selectively return the geoJSON feature to overlay on the map.
Rendering multiple areas from different data sets:
Could be useful for rendering UK and Scotland Boundaries: http://geoportal.statistics.gov.uk/datasets/countries-december-2017-ultra-generalised-clipped-boundaries-in-uk
To do:
Added clipped data set and support for Scotland and United Kingdom as service areas:
Moved the code to query the DB for ServiceArea
geoJSON features to an api view.
Merged into master
Currently, there is some misunderstanding around service results which have a physical location but also a service area.
A service may have a headquarters in a different location to the user but have the capacity to do home visits etc.
The mismatch of service locations and the user's location can lead the user to think the result is incorrect.
To inform the user that the service may still be able to help them due to their service area coverage, a map could be generated on the service detail page which uses geoJSON data to represent the service area they cover.
Leaflet JS (https://leafletjs.com/) and OpenStreetMap (https://www.openstreetmap.org/#map=7/57.622/-3.654)