Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lahdekorpi/finland-city-distances
Calculates distances between cities in Finland
https://github.com/lahdekorpi/finland-city-distances
Last synced: 10 days ago
JSON representation
Calculates distances between cities in Finland
- Host: GitHub
- URL: https://github.com/lahdekorpi/finland-city-distances
- Owner: lahdekorpi
- Created: 2015-03-12T17:34:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-12T17:43:57.000Z (almost 10 years ago)
- Last Synced: 2024-11-12T14:25:45.193Z (about 2 months ago)
- Language: PHP
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Finland-city-distances
Calculates distances between cities in Finland## Usage
```php
$cd = new CityDistances();
echo $cd->cityNames; // Outputs list of cities in the database
echo $cd->cityDistance("Pori", "Helsinki"); // Outputs the distance between two cities in kilometers (374.92202880166)
echo $cd->distance(21.783, 61.483, 24.931,60.17); // Outputs the distance between two coordinates (lat, lng)
echo $cd->getCityCoordinates("Pori"); // Outputs the coordinates of a city array(2) { [0]=> float(21.783) [1]=> float(61.483) }
```