4km Radius

4km Radius is a Proof of Concept (POC) project that calculates and displays a 4km radius from the user’s current location on a map. The project is built using Vite.js, React, TypeScript, and Leaflet, making use of the leaflet-geosearch and leaflet.locatecontrol plugins for enhanced functionality.


You can check out the demo!


  • Display a 4km radius from the user’s current location.
  • Search for locations by text and display the 4km radius around the searched location.
  • Pin locations on the map and display the 4km radius.

Tech Stack

  • Frontend: Vite.js, React
  • Language: TypeScript
  • Map: Leaflet
  • Plugins:
    1. leaflet-geosearch: Location searching plugin
    2. leaflet.locatecontrol: User’s current location plugin


  1. Clone the repository: git clone https://github.com/your-username/4km-radius.git
  2. Navigate to the project directory: cd 4km-radius
  3. Install dependencies: npm install


  1. Start the development server: npm run dev
  2. Access the app at: http://localhost:5173


Contributions are welcome! If you have any ideas, suggestions, or improvements, feel free to create an issue or submit a pull request.


This project is licensed under the MIT License.


View Github