PHP code example of wntechs / php-coord
1. Go to this page and download the library: Download wntechs/php-coord library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wntechs / php-coord example snippets
$OSRef = new OSRef(500000, 200000); //Easting, Northing
$LatLng = $OSRef->toLatLng();
$GPSLatLng = $LatLng->toWGS84(); //optional, for GPS compatibility
$lat = $LatLng->getLat();
$long = $LatLng->getLng();
$LatLng = new LatLng(50.12345, 1.23456, 0, RefEll::wgs84()); //Latitude, Long, height
$OSRef = $LatLng->toOSRef();
$easting = $OSRef->getX();
$northing = $OSRef->getY();
composer