Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/app/webroot/news/administrator/components/com_phocamaps/assets/js/ |
Upload File : |
function setPMGPSLongitude(inputValue) { longitudeValue = convertPMGPS(inputValue, 'longitude'); window.top.document.forms.adminForm.elements.gpslongitude.value = longitudeValue; } function setPMGPSLatitude(inputValue) { latitudeValue = convertPMGPS(inputValue, 'latitude'); window.top.document.forms.adminForm.elements.gpslatitude.value = latitudeValue; } function convertPMGPS(inputValue, type) { var status = 1; var cAbs = 0; var vAbs = 1000000000; var degree = 0; var minute = 0; var second = 0; var gpsValue = ''; var degrees = 180; var potc = ''; var ms = 60; if (type == 'longitude') { degrees = 180; } if (type == 'latitude') { degrees = 90; } if(isNaN(inputValue)) { return ''; } if(inputValue < 0) { status = -1; } cAbs = Math.abs(Math.round(vAbs * inputValue)); if(cAbs > (vAbs * degrees)) { return ''; } degree = status * Math.floor(cAbs/vAbs); minute = Math.floor(ms * ((cAbs/vAbs) - Math.floor(cAbs/vAbs))); second = ms * Math.floor(vAbs * ((ms * ((cAbs/vAbs) - Math.floor(cAbs/vAbs))) - Math.floor(ms * ((cAbs/vAbs) - Math.floor(cAbs/vAbs)))) ) / vAbs; second = Math.round(second * 1000)/1000; if (degree < 0) { if (type == 'longitude') { potc = 'W'; } if (type == 'latitude') { potc = 'S'; } } if (degree > 0) { if (type == 'longitude') { potc = 'E'; } if (type == 'latitude') { potc = 'N'; } } gpsValue = Math.abs(degree) + '\u00b0' + '\u0020' + minute + '\u0027' + '\u0020' + second + '\u0022' + potc; //status = 1; return gpsValue; } /* utf-8 test ěščřžýáíé */