This is a simple API for clustering map points. It uses SuperCluster library for clustering. The API is written in TypeScript and uses Express framework. It has 2 endpoints:
/locations/getPoints
- returns clustered points based on scale/locations/addPoint
- adds new point to the list of points
It also has a simple UI for showing points on the map. The UI is written in handlebars and uses Leaflet library for showing points on the map.
- git clone https://github.com/bunnv2/map-points-clustering.git
- cd map-points-clustering
- npm install
- npm run create-env
- npm run dev (for development)
- npm run build (for production)
- npm run start (for production)
- Create model for map points
- Create types for map points and requests and responses
- Mock data for map points
- Create API for map points clustering with SuperCluster based on scale
- Make tests for API
- Validate input data and manage errors
- Create UI for map points clustering, using Leaflet
- Send points to UI and show them on map
- Zoom in/out to see the difference
- Add more points
- Refactor types
- Add more tests
- Add endpoint for adding new points
npm run dev
- run development servernpm run build
- build production bundlenpm run start
- run production servernpm run test
- run testsnpm run create-env
- create .env file