Calculates and displays a 4km radius from the user's current location on a map, built using React

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!

Features

  • 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

Installation

  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

Usage

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

Contributing

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

License

This project is licensed under the MIT License.

GitHub

View Github