Cowin-team / cowin_map

0 stars 1 forks source link

Filters dropdown to select city. #50

Closed tsrivishnu closed 3 years ago

tsrivishnu commented 3 years ago

Let's not show all cities when the map loads. Let's do the following instead.

Introduce URL query parameter, city, to select city

A sample URL can be https://cowinmap.com?city=coimbatore. The benefit of this is that we can share the direct links to cities. Also, we can set up google search to index these pages separately for better Google search performance.

City dropdown filter

Add a new filter dropdown next to the current resources filters dropdown. It should list all the cities we support in a dropdown. The cities in the dropdown should simply be anchor <a href...> tags pointing to the URL with the respective city's query parameter. Example: <a href="https://cowinmap.com?city=coimbatore">Coimbatore</a>

nmahesh1412 commented 3 years ago

On selection of each city, lets show a few neighbors up to a 300 km radius. Because major cities are getting overloaded and users are relying on bed availability in the neighboring towns/cities.

So for example if the user selects Bangalore, the map could show Bangalore, Hosur and Krishnagiri

tsrivishnu commented 3 years ago

Let's first have the implementation to simply pan to the city. This means, we will still render all the markers but only point the map to the city that is selected.

We will implement this soon and have it deployed soon so that users will benefit from it Once we deploy it we will start working on making the rendering more dynamic and efficient by rendering only those markers that are in view of the map.