Steve Maxwell
Steve Maxwell

Reputation: 59

How to create a people finder functionality using Leaflet JS in a React app

I am building an enterprise people finding app. My use case is:

  1. Allow a user to locate themselves on a map and mark their location.
  2. Then set the number of miles in radius up to which they would like to find people. Only people located within this radius will be eligible to interact with the user and vice-versa.
  3. Allow the user to be able to be found by other users

An example is - let's assume the user is in London. The user sets a radius of 500 miles and within this 500 miles if there is any other user using this app, that user can interact with this user.

My question is - is this possible in react-leaflet? or leaflet js? I want to use open-source for now.

Upvotes: -1

Views: 128

Answers (1)

Simon Dold
Simon Dold

Reputation: 141

I have already worked with react-leflet and lefletjs.

The question you've asked is quite general, but the good news is that leaflet.js is a very powerful and flexible library that should be more than capable of meeting your requirements.

The only problem could be that for special cases react-leaflet is not sufficient (since it does not include all the functions out of the box of leaflet), because it is just a kind of react rapper around leafletjs.

To give you an idea of ​​the functions that are possible with the pure leaflet.js library, there is a very good github repository that provides many examples of leaflet.js.

You can check it out if you want to: https://github.com/tomickigrzegorz/leaflet-examples

I hope this will help you.

Upvotes: 1

Related Questions