Table of Contents
Developers can use this API to get datails of cities, districts and provinces which located all around the Sri Lanka. This API can easily intergarte to you appication using particular URI.
- MongoDB
- NodeJS
- Heroku
- DigitalOcean
- Developers can get major cities and sub areas in each district
- GPS cordinates (Latitude and Longitude) are avilabe for each major city and sub areas. GPS cordinates can be use with Google Maps and other GPS/ Map services
- Developers can easily get Administrative Districts of the Colombo Mucipal Council with GPS cordinates, Administrative Distict Name and Sub Area (Known name like Kollupitiya, Modara, etc.)
- Users can get all the disticts and provinces in Sri Lanka
https://locatesrilanka.herokuapp.com/cities
https://locatesrilanka.herokuapp.com/provinces
https://locatesrilanka.herokuapp.com/districts
https://locatesrilanka.herokuapp.com/cities/cordinates/[CITY NAME IN ENGLISH]
Assume user needs to find GPS cordinates of Kadduwela, Sri Lanka
https://locatesrilanka.herokuapp.com/cities/cordinates/Kaduwela
https://locatesrilanka.herokuapp.com/cities/cordinates/[DISTRICT ID]
Assume user needs to find GPS cordinates of Colombo District, Sri Lanka
https://locatesrilanka.herokuapp.com/cities/byDistrict/5
https://locatesrilanka.herokuapp.com/cities/colombo_mca/[COLOMBO SUB AREA]
Assume user needs to find details of Colombo 1, Sri Lanka
https://locatesrilanka.herokuapp.com/cities/colombo_mca/1
https://locatesrilanka.herokuapp.com/cities/colombo_mca
https://locatesrilanka.herokuapp.com/districts/byprovince/[PROVINCE ID]
Assume user needs to find districts in western province, Sri Lanka
https://locatesrilanka.herokuapp.com/districts/byprovince/1
https://locatesrilanka.herokuapp.com/districts/districtcount/[PROVINCE ID]
Assume user needs to find count of districts in western province, Sri Lanka
https://locatesrilanka.herokuapp.com/districts/districtcount/1
- Clone the repo
git clone https://github.com/PasinduS96/location-api-sl.git
- Install NPM packages
npm install
- Create .env file for environment varialbes
- Create environment variables
PORT= MONGO_URI=
- Run Project
npm start
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
MIT © PasinduS96