bitvijays / AirPollutionDataPlatform

Platform for air pollution
0 stars 2 forks source link

Get pollution data / Any device - Narrow searchbox scope #16

Closed kwmc-lucas closed 3 years ago

kwmc-lucas commented 4 years ago

Seeing as it’s currently only for Bristol (and London?), it would be good if the search scope could be automatically narrowed. For example if one types in ‘Clifton’ and hits enter, it’ll take the user to Clifton in Birmingham for which there's not data.

bitvijays commented 3 years ago

@anshulgaikwad01 Refer https://docs.mapbox.com/mapbox-gl-js/example/restrict-bounds/ and make changes in the https://github.com/Kevjolly/AirPollutionDataPlatform/blob/master/website/public/js/map.js#L798

If you are unsure of the location co-ordinates. Probably, use this https://www.postcodearea.co.uk/postaltowns/bristol/

Also, remove London from the search bar?