$maxl) { $maxl=$zysare[$ij]; } if ($zysare[1 + $ij] < $mint) { $mint=$zysare[1 + $ij]; } if ($zysare[1 + $ij] > $maxt) { $maxt=$zysare[1 + $ij]; } } } for ($ij=0; $ij'; } //if (isset($_POST['htmstuff'])) { // if (!file_exists('countries.htm')) { // file_put_contents('countries.htm', str_replace('block;', 'none;', str_replace(' ',' + ',str_replace('+',' ',urldecode($_POST['htmstuff']))))); // } // exit; //} //if (file_exists('countries.htm')) { // $isthere=true; // $innards=str_replace(' ',' + ',str_replace('+',' ',urldecode(file_get_contents('countries.htm')))); // $proposedwriteinnardsto=""; //} if (isset($_GET['zoom'])) { if (strlen(str_replace('+','',urldecode($_GET['zoom']))) > 0) { $factor=str_replace('+','',urldecode($_GET['zoom'])); } } if (isset($_GET['uselatlaong'])) { $dolatlong=true; $longoff=0.0; $latoff=0.0; } else if (file_exists('countries.html')) { //if (strpos(file_get_contents('countries.html'), "
" . "" . "
") !== false) { //if ($factor == 1.0) { // file_put_contents("cxz.html", str_replace($proposedwriteinnards, $proposedwriteinnardsto, str_replace("
" . "" . "
", "
" . $innards . "
", file_get_contents('countries.html')))); // exit; //} //} if ($factor != 1.0) { echo str_replace($proposedwriteinnards, $proposedwriteinnardsto, str_replace("
" . "" . "
", "
" . $innards . "
", str_replace("function onl() {", "function onl() { \n document.body.style.zoom=((izoom == 1.0) ? ('' + eval(izoom * 100.0) + '%') : '" . (100.0 * $factor) . "%'); \n ", file_get_contents('countries.html')))); exit; } else { echo str_replace($proposedwriteinnards, $proposedwriteinnardsto, str_replace("
" . "" . "
", "
" . $innards . "
", file_get_contents('countries.html'))); exit; } } //if (!$isthere) { // $writeinnards=$proposedwriteinnards; //} // Create a transparent image thanks to https://www.php.net/manual/en/function.imagecolortransparent.php $im = imagecreatetruecolor((360.0 * $factor), (180.0 * $factor)); $black = imagecolorallocate($im, 0, 0, 0); // Make the background transparent imagecolortransparent($im, $black); // Save the image $udirnameprebimg='/tmp/imagecolortransparent.png'; imagepng($im, $udirnameprebimg); $duis='data:image/' . str_replace('jpg','jpeg',strtolower(explode('.',$udirnameprebimg)[-1 + sizeof(explode('.',$udirnameprebimg))])) . ';base64,' . base64_encode(file_get_contents($udirnameprebimg)); imagedestroy($im); unlink($udirnameprebimg); $htmlis="Display GeoJSON Countries var origmapurl=\"//www.rjmprogramming.com.au/PHP/Map/map.php?title=Nearby%20TimeZone%20Places&onclick=y&label=['Lat',&value='Lon','Name']&data=,[\"; var yourtzlist=''; var jzoom=1.0, izoom=location.search.split('zoom=')[1] ? eval(decodeURIComponent(location.search.split('zoom=')[1].split('&')[0])) : 1.0; var onepixelequals=eval(0.0 + eval(1.0 * izoom)); var lastl='', longlastl='', elem=null, context=null, elema=null, contexta=null, lastlats=[], lastlongs=[], lastlat=-99.0, lastlong=-99.0, thislat=0.0, thislong=0.0, mapwo=null, jtwo=' ', mapwog=null; var rectisleft=0, rectistop=0, rectisy=0, answered=true, goes=0, vsll=[-999.0]; var imglookdone=false, ginintzl, gtp, gitwo, gabi='', waitplease=false, appendtoinnerHTML='', lastflagged='', twothousand=2000; var lasttwo='', lastflag='', sctop=0, scleft=0, lastcwhat='', airportstuff='', zhr=null, zhra=null, doscribble=true, doair=false, zhr=null; var intairsuffix='', zhrb=null, kklat=0, kklong=0; function onl() { setInterval(feedhow, 8000); document.getElementById('idlabel').value='[' + String.fromCharCode(39) + 'Lat' + String.fromCharCode(39) + ','; document.getElementById('idvalue').value=String.fromCharCode(39) + 'Lon' + String.fromCharCode(39) + ',' + String.fromCharCode(39) + 'Name' + String.fromCharCode(39) + ']'; if (maybemobile(izoom) != 1.0) document.body.style.zoom=('' + eval(izoom * 100.0) + '%'); elema = document.getElementById('myacanvas'); elema.style.cursor='progress'; contexta = elema.getContext('2d'); elem = document.getElementById('mycanvas'); elem.style.cursor='progress'; context = elem.getContext('2d'); context.strokeStyle = '#000000'; context.lineWidth = 0.4; } "; $midbit=" function ouralert(athis, ctyname, isothree, isotwo, inclist) { if (goes == 0) { goes=1; answered=true; } if (('' + isotwo).length == 2) { jtwo=isotwo; } if (inclist.indexOf(',') != -1) { lastflag=''; lasttwo=''; if (isotwo.trim() != '') { lasttwo=isotwo; lastflag=' ' + orflag(isotwo); } checkdsa(athis); var cls=inclist.replace('Longitude,Latitude coordinates are ','').split(','); longlastl=ctyname + ': ' + inclist; document.getElementById('ntz').value=''; //document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(cls[1]) + '&longitude=' + encodeURIComponent(cls[0]) + '&ntztontz=y'; //setTimeout(lookforntz, 1000); } } function drawaac(centerX, centerY) { contexta.beginPath(); contexta.globalAlpha = 0.9; //console.log('2:' + centerX + ',' + centerY); if (1 == 1) { contexta.fillStyle = 'black'; contexta.fillRect(centerX / izoom, centerY / izoom,1,1); contexta.fill(); } else { contexta.arc(centerX / izoom, centerY / izoom, 1, 0, 2 * Math.PI, false); contexta.fillStyle = 'black'; contexta.fill(); contexta.lineWidth = 5; contexta.lineWidth = 0.00001; contexta.strokeStyle = '#003300'; contexta.stroke(); } return true; } function drawac(centerX, centerY) { var topllong=-180.0; var topllat=90.0; console.log('0:' + centerX / izoom + ',' + centerY / izoom); if (centerX > eval(izoom * elem.width) || centerY > eval(izoom * elem.height)) return false; onepixelequals=eval(0.0 + eval(1.0 * izoom)); contexta.beginPath(); contexta.globalAlpha = 0.5; console.log('' + centerX / izoom + ',' + centerY / izoom); contexta.arc(centerX / izoom, centerY / izoom, 1, 0, 2 * Math.PI, false); contexta.fillStyle = 'lightblue'; contexta.fill(); contexta.lineWidth = 5; contexta.lineWidth = 0.0001; contexta.strokeStyle = '#003300'; contexta.stroke(); return true; } function drawc(centerX, centerY) { var topllong=-180.0; var topllat=90.0; if (centerX > eval(izoom * elem.width) || centerY > eval(izoom * elem.height)) return false; onepixelequals=eval(0.0 + eval(1.0 * izoom)); context.beginPath(); context.globalAlpha = 0.5; context.arc(centerX / izoom, centerY / izoom, 1, 0, 2 * Math.PI, false); context.fillStyle = 'green'; context.fill(); context.lineWidth = 5; context.lineWidth = 2; context.strokeStyle = '#003300'; context.stroke(); return true; } function precallmap() { if (waitplease) { setTimeout(precallmap, 1000); } callmap(ginintzl, gtp, gitwo); } function callmap(inintzl, tp, itwo) { if (waitplease) { ginintzl=inintzl; gtp=tp; gitwo=itwo; setTimeout(precallmap, 1000); return ''; } var intzl=inintzl; var thisplace=-1; var places=['', '', '']; var lplaces=['', '', '']; var mapurl=origmapurl + thislat + ',' + thislong + ',~Your%20Place%20' + encodeURIComponent(String.fromCodePoint(127968)) + '~]'; var lmapurl=mapurl; var tzs=['', '', '']; var lats=[0, 0, 0]; var longs=[0, 0, 0]; var ioff=0, joff=0; var wasp=''; var prefix='', thismu='', newdatabit='', lastgeourl='', areg='', newpeninfo='' + thislat + '|' + thislong + '|127968_Your%20Place'; var tzls=intzl.split('/'); var enin=''; if (tp != '') { if (tp.indexOf('/wiki/') != -1) { areg='HTTP.' + tp.split('/wiki/')[1].replace(/\ /g,'_'); areg='http.' + tp.split('/wiki/')[1].replace(/\ /g,'_'); enin=encodeURIComponent(' in ') + tp.split('/wiki/')[1].replace(/\_/g,'%20'); if (itwo.trim() != '') { enin+='%20' + encodeURIComponent(orflag(itwo.toUpperCase())); } mapurl=mapurl.replace('~]', enin + '~]'); newpeninfo=newpeninfo.replace('Your$%20Place', tp.split('/wiki/')[1].replace(/\ /g,'_')); } else { areg='HTTP.' + tp.replace(/\ /g,'_'); areg='http.' + tp.replace(/\ /g,'_'); enin=encodeURIComponent(' in ' + tp); if (itwo.trim() != '') { enin+='%20' + encodeURIComponent(orflag(itwo.toUpperCase())); } mapurl=mapurl.replace('~]', encodeURIComponent(' in ' + tp) + '~]'); newpeninfo=newpeninfo.replace('Your$%20Place', tp.replace(/\ /g,'_')); } } else if (gtwop != '') { if (gtwop.indexOf('/wiki/') != -1) { areg='HTTP.' + gtwop.split('/wiki/')[1].replace(/\ /g,'_'); areg='http.' + gtwop.split('/wiki/')[1].replace(/\ /g,'_'); enin=encodeURIComponent(' in ') + gtwop.split('/wiki/')[1].replace(/\_/g,'%20'); if (itwo.trim() != '') { enin+='%20' + encodeURIComponent(orflag(itwo.toUpperCase())); } mapurl=mapurl.replace('~]', enin + '~]'); newpeninfo=newpeninfo.replace('Your$%20Place', gtwop.split('/wiki/')[1].replace(/\ /g,'_')); } else { areg='HTTP.' + gtwop.replace(/\ /g,'_'); areg='http.' + gtwop.replace(/\ /g,'_'); enin=encodeURIComponent(' in ' + tp); if (itwo.trim() != '') { enin+='%20' + encodeURIComponent(orflag(itwo.toUpperCase())); } mapurl=mapurl.replace('~]', encodeURIComponent(' in ' + tp) + '~]'); newpeninfo=newpeninfo.replace('Your$%20Place', gtwop.replace(/\ /g,'_')); } } if (eval('' + tzls.length) > 3) { for (var ih=0; ih<3; ih++) { if (tzls[eval(1 + ih + ioff)].indexOf(' ') == -1) { prefix='/' + tzls[eval(1 + ih + ioff)] + '/'; joff++; } else { prefix='/'; } thisplace=-1; while (tzls[eval(0 + ih + ioff)].slice(thisplace).substring(0,1) != '.' && tzls[eval(0 + ih + ioff)].slice(thisplace).substring(0,1) != ' ') { wasp=prefix; prefix=tzls[eval(0 + ih + ioff)].slice(thisplace).substring(0,1) + wasp; //alert('IH=' + ih + ' and prefix=' + prefix + ' ' + tzls[eval(0 + ih + ioff)].slice(thisplace)); thisplace--; } //alert('ih=' + ih + ' and prefix=' + prefix); places[ih]=prefix; tzs[ih]=prefix; thisplace=1; ioff=joff; while (tzls[eval(1 + ih + ioff)].substring(0,thisplace).slice(-1) != '.' && tzls[eval(1 + ih + ioff)].substring(0,thisplace).slice(-1) != ' ') { places[ih]+=tzls[eval(1 + ih + ioff)].substring(0,thisplace).slice(-1); tzs[ih]+=tzls[eval(1 + ih + ioff)].substring(0,thisplace).slice(-1); thisplace++; } //alert('ih=' + ih + ' and thisplace=' + thisplace + ' and tzs[]=' + tzs[eval(0 + ih)] + ' and yourtzlist=' + yourtzlist); if (tzls[eval(1 + ih + ioff)].indexOf(' from ') != -1) { if (areg == '') { areg='HTTP.GeoJSON'; areg='http.GeoJSON'; } areg+=',http.' + places[ih].split('/')[eval(-1 + places[ih].split('/').length)].replace(/\ /g,'_'); places[ih]+=(' in ' + ('' + tzls[eval(1 + ih + ioff)].substring(thisplace).split(' from ')[0]).replace(' in ','').replace(' in ','').replace(' in ','').replace(' in ','')).replace(' in in ',' in '); lplaces[ih]+=(' in ' + ('' + tzls[eval(1 + ih + ioff)].substring(thisplace).split(' is ')[0]).replace(' in ','').replace(' in ','').replace(' in ','').replace(' in ','')).replace(' in in ',' in '); } else if (tzls[eval(1 + ih + ioff)].indexOf(' is ') != -1) { if (areg == '') { areg='HTTP.GeoJSON'; areg='http.GeoJSON'; } areg+=',http.' + places[ih].split('/')[eval(-1 + places[ih].split('/').length)].replace(/\ /g,'_'); places[ih]+=(' in ' + ('' + tzls[eval(1 + ih + ioff)].substring(thisplace).split(' is ')[0]).replace(' in ','').replace(' in ','').replace(' in ','').replace(' in ','')).replace(' in in ',' in '); lplaces[ih]+=(' in ' + ('' + tzls[eval(1 + ih + ioff)].substring(thisplace).split(' is ')[0]).replace(' in ','').replace(' in ','').replace(' in ','').replace(' in ','')).replace(' in in ',' in '); } if (yourtzlist.indexOf(tzs[ih]) != -1) { //newpeninfo+=',' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[0].replace(String.fromCharCode(34),'') + '|' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[1].replace(String.fromCharCode(34),'') + '|' + encodeURIComponent(places[ih].split('/')[eval(-1 + places[ih].split('/').length)].replace(/\ /g,'_')); //mapurl+=',[' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[0].replace(String.fromCharCode(34),'') + ',' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[1].replace(String.fromCharCode(34),'') + ',~' + encodeURIComponent(places[ih]) + '~]'; newpeninfo+=',' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[0].replace(String.fromCharCode(34),'') + '|' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[1].replace(String.fromCharCode(34),'') + '|' + encodeURIComponent(lplaces[ih].split('_is_')[0].split('%20is%20')[0].split('/')[eval(-1 + lplaces[ih].split('_is_')[0].split('%20is%20')[0].split('/').length)].replace(/\ /g,'_')); mapurl+=',[' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[0].replace(String.fromCharCode(34),'') + ',' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[1].replace(String.fromCharCode(34),'') + ',~' + encodeURIComponent(places[ih]) + '~]'; } } var maptarget='_blank'; var geotarget='_blank'; if (itwo != itwo.toUpperCase() && itwo != itwo.toLowerCase()) { maptarget='mapchart'; geotarget='geochart'; document.getElementById('geomaps').style.display='block'; } if (mapwo) { if (!mapwo.closed) { mapwo.close(); mapwo=null; } if (mapwog) { if (!mapwog.closed) { mapwog.close(); mapwog=null; } } //alert(mapurl); // https://www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=GB;Greenwich%20London%20Places&aregexographicals=y&aregeographicals=&width=834&height=520&country=Places&popularity=&data=%20[51.4769|-0.0005|~From~,2]%20,%20[51.4769|-0.0005|~To~,2]%20,%20[51.4769|-0.0005|~Greenwich~,2] mapwo=windowopen(apm(mapurl), maptarget, 'top=20,left=20,width=' + eval(-40 + screen.width) + ',height=' + eval(-40 + screen.height)); setTimeout(mapwoz, 5000); if (itwo.trim() != '') { thismu=decodeURIComponent(mapurl.split('&data=')[1]); //newpeninfo=thismu.replace(/\]\,\[/g, ',').replace(/\,\[/g, '').replace(/\~\]/g, '').replace(/\,\~/g, '|').replace(/\,/g, '|').replace(/\ /g,'_'); //.replace(/\~\|/g,','); newdatabit=' ' + mapurl.split('&data=')[1].substring(1).replace(/\~\]/g, '~,2]'); //lastgeourl=(mapurl.split('&')[0].replace('/PHP/Map/map.php?title=', '/PHP/GeoChart/geo_chart.php?title=' + itwo.toUpperCase() + ';') + '&aregexographicals=y&aregeographicals=' + areg + '&peninfo=' + (newpeninfo.replace(/\~\|/g,',').replace(/\+/g,' ')) + '&width=556&height=347&country=Places&popularity=Popularity&data=' + (newdatabit).replace(/\ /g, '%20')).replace('%20Places&', '%20Places' + enin + '&'); lastgeourl=(mapurl.split('&')[0].replace('/PHP/Map/map.php?title=Nearby%20TimeZone%20Places', '/PHP/GeoChart/geo_chart.php?title=' + itwo.toUpperCase() + ';' + enin.substring(8) + '%20Nearby%20TimeZone%20Places') + '&aregexographicals=y&aregeographicals=' + areg + '&peninfo=' + (newpeninfo.replace(/\~\|/g,',').replace(/\+/g,' ')) + '&width=556&height=347&country=Places&popularity=Popularity&data=' + (newdatabit).replace(/\ /g, '%20')).replace('%20Places&', '%20Places' + enin + '&'); if (tp == '') { mapwog=window.open(lastgeourl, geotarget, 'top=80,left=600,width=' + eval(-600 + screen.width) + ',height=' + eval(-40 + screen.height)); setTimeout(mapwogz, 5000); //mapwog.document.body.style.zoom='100%'; } else { mapwog=window.open(lastgeourl, geotarget, 'top=' + eval(-400 + screen.height) + ',left=0,width=' + eval(-600 + screen.width) + ',height=400'); setTimeout(mapwogz, 5000); //mapwog.document.body.style.zoom='100%'; } } if (tp != '') { window.open(tp, '_blank', 'top=80,left=' + eval(-600 + screen.width) + ',width=600,height=600'); } } else { if (mapwog) { if (!mapwog.closed) { mapwog.close(); mapwog=null; } } mapwo=windowopen(apm(mapurl), maptarget, 'top=20,left=20,width=' + eval(-40 + screen.width) + ',height=' + eval(-40 + screen.height)); setTimeout(mapwoz, 5000); if (itwo.trim() != '') { thismu=decodeURIComponent(mapurl.split('&data=')[1]); //newpeninfo=thismu.replace(/\]\,\[/g, ',').replace(/\,\[/g, '').replace(/\~\]/g, '').replace(/\,\~/g, '|').replace(/\,/g, '|').replace(/\ /g,'_'); //.replace(/\~\|/g,','); newdatabit=' ' + mapurl.split('&data=')[1].substring(1).replace(/\~\]/g, '~,2]'); lastgeourl=(mapurl.split('&')[0].replace('/PHP/Map/map.php?title=Nearby%20TimeZone%20Places', '/PHP/GeoChart/geo_chart.php?title=' + itwo.toUpperCase() + ';' + enin.substring(8) + '%20Nearby%20TimeZone%20Places') + '&aregexographicals=y&aregeographicals=' + areg + '&peninfo=' + (newpeninfo.replace(/\~\|/g,',').replace(/\+/g,' ')) + '&width=556&height=347&country=Places&popularity=Popularity&data=' + (newdatabit).replace(/\ /g, '%20')).replace('%20Places&', '%20Places' + enin + '&'); if (tp == '') { mapwog=window.open(lastgeourl, geotarget, 'top=80,left=600,width=' + eval(-600 + screen.width) + ',height=' + eval(-40 + screen.height)); setTimeout(mapwogz, 5000); //mapwog.document.body.style.zoom='100%'; } else { mapwog=window.open(lastgeourl, geotarget, 'top=' + eval(-400 + screen.height) + ',left=0,width=' + eval(-600 + screen.width) + ',height=400'); setTimeout(mapwogz, 5000); //mapwog.document.body.style.zoom='100%'; } } if (tp != '') { window.open(tp, '_blank', 'top=80,left=' + eval(-600 + screen.width) + ',width=600,height=600'); } } } jtwo=' '; } function mapwogz() { if (1 == 2) { mapwog.document.body.style.transform='scale(1.0)'; } } function mapwoz() { if (1 == 2) { mapwo.document.body.style.transform='scale(1.0)'; } } function withinit(abi) { var outi=''; var putin=true; for (var ii=0; ii') { putin=true; if (outi != '') { outi+=' '; } } else if (putin) { outi+=abi.substring(ii).substring(0,1); } } return outi.replace('rror :', 'rror:'); } function latercheckif() { if (waitplease) { setTimeout(latercheckif, 1000); return ''; } checkif(document.getElementById('nearestif')); } function precheckif() { checkif(document.getElementById('nearestif')); } function preface(inblurb) { var extras=''; var outblurb=inblurb; if (Math.abs(eval('' + lastlat)) > 0.0 || Math.abs(eval('' + lastlong)) > 0.0) { if (Math.abs(eval('' + lastlat)) <= 90.0 && Math.abs(eval('' + lastlong)) <= 180.0) { extras=' Add G for Google Directions between (' + lastlat + ',' + lastlong + ') to (' + thislat + ',' + thislong + ') and spaces (also more trip legs) to hashtag navigate to Google Charts later. '; } } return extras + outblurb; } function stateChanged() { if (zhr.readyState == 4) { if (zhr.status == 200) { var bts=zhr.response.split('.src + ' + String.fromCharCode(39)); if (eval('' + bts.length) > 1) { for (var ijh=1; ijh 1) { for (var ijh=1; ijh 1) { for (var ijh=1; ijh 800) { document.getElementById('iddata').value=(p1.split('&data=')[1].split('&')[0].split('#')[0]).replace(/\&20\;/g,' '); document.getElementById('smapif').click(); return null; } return window.open(p1, p2, p3); } function apm(mu) { if (airportstuff != '' && doair) { return (mu + airportstuff).replace('&', encodeURIComponent(' and Airports') + '&'); } return mu; } function nair(klat, klong) { airportstuff=''; zhr = new XMLHttpRequest(); zhr.onreadystatechange=stateChanged; zhr.open('get', '/HTMLCSS/intair.php?num=4&lat=' + klat + '&long=' + klong, true); zhr.send(null); } function naira(klat, klong) { if (answered && doair) { answered=false; zhra = new XMLHttpRequest(); zhra.onreadystatechange=stateChangeda; console.log('/HTMLCSS/intair.php?num=6&lat=' + klat + '&long=' + klong + intairsuffix); if (intairsuffix.indexOf('&port=air') != -1) { kklat=klat; kklong=klong; zhra.open('get', '/HTMLCSS/intair.php?num=6&lat=' + klat + '&long=' + klong, true); } else { zhra.open('get', '/HTMLCSS/intair.php?num=6&lat=' + klat + '&long=' + klong + intairsuffix, true); } zhra.send(null); } } function airportplot(e) { if (answered) { var rectis=null; //document.body.getBoundingClientRect(); var blat=0, blong=0; var topllong=-180.0; var topllat=90.0; onepixelequals=eval(0.0 + eval(1.0 * izoom)); //document.title='canvasclick'; e = e || window.event; e.preventDefault(); if (e.touches) { if (e.touches[0].pageX) { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals); naira(eval(-rectisleft + e.touches[0].pageX), eval(-rectistop + e.touches[0].pageY)); //if (drawac(eval(-rectisleft + e.touches[0].pageX), eval(-rectistop + e.touches[0].pageY))) e = e; } } else { rectis=document.body.getBoundingClientRect(); //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals); naira(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY)); //if (drawac(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY))) { e = e; } } } else if (e.pageX || e.pageY) { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals); //alert('02: ' + e.screenX + ' ' + e.pageX + ' ' + e.screenY + ' ' + e.pageY + ' ' + thislong + ' ' + thislat); blat=eval(eval(eval(topllat * onepixelequals - eval(-rectistop + e.pageY) * 1)) / onepixelequals); blong=eval(eval(eval(topllong * onepixelequals + eval(-rectisleft + e.pageX) * 1)) / onepixelequals); if ((blat >= -90.0 && blat <= 90.0) && (blong >= -180.0 && blong <= 180.0)) { console.log('here'); naira(blat, blong); //if (drawac(eval(-rectisleft + e.pageX), eval(-rectistop + e.pageY))) { e = e; } } } else { rectis=document.body.getBoundingClientRect(); //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals); naira(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY)); //if (drawac(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY))) { e = e; } } } } function alats(inlat) { if (inlat == 0 && lastlats.length == 0) { inlat=inlat; } else { lastlats.push(inlat); } return inlat; } function alongs(inlong) { if (inlong == 0 && lastlongs.length == 0) { inlong=inlong; } else { lastlongs.push(inlong); } setTimeout(prenair, 200); //nair(thislat, inlong); return inlong; } function prenair() { nair(thislat, thislong); } function checkif(iois) { var morehuh=false; var mixedcase=true; var twop=''; var what='', ourabi=''; var ht='', gdurl='', legs=0, ilegs=1; var ourl=lastl; var ourlong=longlastl; gtwop=''; if (iois.src.indexOf('tz_places.php') != -1 || gabi != '') { var aconto = (iois.contentWindow || iois.contentDocument); if (aconto != null || gabi != '') { if (gabi != '') { ourabi=gabi; } else { if (aconto.document) { aconto = aconto.document; } ourabi='' + emfilter(aconto.body.innerHTML); if (waitplease) { gabi=ourabi; setTimeout(latercheckif, 1000); return ''; } } if (aconto.body != null || gabi != '') { gabi=''; lastl=''; longlastl=''; if (ourlong != '') { what=withinit(ourabi).replace(/\)/g,') '); if (what.indexOf('rror:') != -1) { alert(what.replace(': Longitude', lastflag + ': Longitude') + ' ' + ourlong.replace(': Longitude', lastflag + ': Longitude')); } else if (ourlong.indexOf(': ') != -1) { morehuh=prompt(what + ' See these on a map? See Wikipedia page about ' + ourlong.split(':')[0] + lastflag + ' via Y or Yes for both this and map. ' + preface(ourlong.replace(': Longitude', lastflag + ': Longitude')), ' '); if (morehuh != null) { morehuh=morehuh.replace('.',' '); } if (morehuh != null) { if (morehuh.replace(' ','').trim() != morehuh.replace(' ','')) { ht='geomaps'; legs=eval(eval(morehuh.length) - eval(morehuh.trim().length)); } if (morehuh.indexOf('g') != -1) { morehuh=morehuh.replace(/g/g,'').replace(/G/g,''); gdurl='//www.google.com/maps/dir/' + lastlat + ',' + lastlong + '/' + thislat + ',' + thislong; if (legs > 1) { for (ilegs=1; ilegs ilegs) { //if (ilegs == 1) { gdurl='//www.google.com/maps/dir/' + thislat + ',' + thislong + '/' + lastlat + ',' + lastlong; } gdurl=gdurl.replace('/dir/','/dir/' + lastlats[eval(-1 - ilegs + lastlats.length)] + ',' + lastlongs[eval(-1 - ilegs + lastlongs.length)] + '/'); //gdurl+='/' + lastlats[eval(-1 - ilegs + lastlats.length)] + ',' + lastlongs[eval(-1 - ilegs + lastlongs.length)] } } } } else if (morehuh.indexOf('G') != -1) { morehuh=morehuh.replace(/G/g,''); gdurl='//www.google.com/maps/dir/' + lastlat + ',' + lastlong + '/' + thislat + ',' + thislong; if (legs > 1) { for (ilegs=1; ilegs ilegs) { //if (ilegs == 1) { gdurl='//www.google.com/maps/dir/' + thislat + ',' + thislong + '/' + lastlat + ',' + lastlong; } gdurl=gdurl.replace('/dir/','/dir/' + lastlats[eval(-1 - ilegs + lastlats.length)] + ',' + lastlongs[eval(-1 - ilegs + lastlongs.length)] + '/'); //gdurl+='/' + lastlats[eval(-1 - ilegs + lastlats.length)] + ',' + lastlongs[eval(-1 - ilegs + lastlongs.length)] } } } } } if (morehuh == null) { morehuh=''; } else if (morehuh.trim().toUpperCase() == 'Y') { morehuh=''; window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600'); } else if (morehuh.trim().toUpperCase().substring(0,1) == 'Y') { twop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600'); } else if (morehuh.trim() == '') { gtwop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600'); morehuh='n'; } else { gtwop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600'); morehuh='N'; } if (morehuh == '') { morehuh=false; } else { morehuh=true; } } else if (lastcwhat != what.replace(': Longitude', lastflag + ': Longitude') + ' See these on a map? ' + ourlong.replace(': Longitude', lastflag + ': Longitude')) { lastcwhat=what.replace(': Longitude', lastflag + ': Longitude') + ' See these on a map? ' + ourlong.replace(': Longitude', lastflag + ': Longitude'); morehuh=confirm(what.replace(': Longitude', lastflag + ': Longitude') + ' See these on a map? ' + ourlong.replace(': Longitude', lastflag + ': Longitude')); } } else { what=withinit(ourabi).replace(/\)/g,') '); if (what.indexOf('rror:') != -1) { alert(what.replace(/\)/g,') ').replace(': Longitude', lastflag + ': Longitude') + ' ' + ourl.replace(': Longitude', lastflag + ': Longitude')); } else if (ourlong.indexOf(': ') != -1) { morehuh=prompt(what.replace(': Longitude', lastflag + ': Longitude') + ' See these on a map? See Wikipedia page about ' + ourlong.split(':')[0] + lastflag + ' via Y or Yes for both this and map. ' + preface(ourlong.replace(': Longitude', lastflag + ': Longitude')), ' '); if (morehuh != null) { morehuh=morehuh.replace('.',' '); } if (morehuh != null) { if (morehuh.replace(' ','').trim() != morehuh.replace(' ','')) { ht='geomaps'; legs=eval(eval(morehuh.length) - eval(morehuh.trim().length)); } if (morehuh.indexOf('g') != -1) { morehuh=morehuh.replace(/g/g,'').replace(/G/g,''); gdurl='//www.google.com/maps/dir/' + lastlat + ',' + lastlong + '/' + thislat + ',' + thislong; if (legs > 1) { for (ilegs=1; ilegs ilegs) { //if (ilegs == 1) { gdurl='//www.google.com/maps/dir/' + thislat + ',' + thislong + '/' + lastlat + ',' + lastlong; } gdurl=gdurl.replace('/dir/','/dir/' + lastlats[eval(-1 - ilegs + lastlats.length)] + ',' + lastlongs[eval(-1 - ilegs + lastlongs.length)] + '/'); //gdurl+='/' + lastlats[eval(-1 - ilegs + lastlats.length)] + ',' + lastlongs[eval(-1 - ilegs + lastlongs.length)] } } } } else if (morehuh.indexOf('G') != -1) { morehuh=morehuh.replace(/G/g,''); gdurl='//www.google.com/maps/dir/' + lastlat + ',' + lastlong + '/' + thislat + ',' + thislong; if (legs > 1) { for (ilegs=1; ilegs ilegs) { //if (ilegs == 1) { gdurl='//www.google.com/maps/dir/' + thislat + ',' + thislong + '/' + lastlat + ',' + lastlong; } gdurl=gdurl.replace('/dir/','/dir/' + lastlats[eval(-1 - ilegs + lastlats.length)] + ',' + lastlongs[eval(-1 - ilegs + lastlongs.length)] + '/'); //gdurl+='/' + lastlats[eval(-1 - ilegs + lastlats.length)] + ',' + lastlongs[eval(-1 - ilegs + lastlongs.length)] } } } } } if (morehuh == null) { morehuh=''; } else if (morehuh.trim().toUpperCase() == 'Y') { morehuh=''; window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600'); } else if (morehuh.trim().toUpperCase().substring(0,1) == 'Y') { twop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600'); } else if (morehuh.trim() == '') { gtwop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600'); morehuh='n'; } else { gtwop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600'); morehuh='N'; } if (morehuh == '') { morehuh=false; } else { morehuh=true; } } else if (lastcwhat != what.replace(': Longitude', lastflag + ': Longitude') + ' See these on a map? ' + ourlong.replace(': Longitude', lastflag + ': Longitude')) { lastcwhat=what.replace(': Longitude', lastflag + ': Longitude') + ' See these on a map? ' + ourlong.replace(': Longitude', lastflag + ': Longitude'); morehuh=confirm(what.replace(': Longitude', lastflag + ': Longitude') + ' See these on a map? ' + ourlong.replace(': Longitude', lastflag + ': Longitude')); } //} else { //morehuh=confirm(what.replace(/\)/g,') ') + ' See these on a map? ' + ourl); //} } } } } if (gdurl != '') { window.open(gdurl, '_blank', 'top=60,left=60,width=1200,height=900'); } sctop=document.documentElement.scrollTop || document.body.scrollTop; scleft=document.documentElement.scrollLeft || document.body.scrollLeft; if (morehuh) { if (mixedcase) { if (ht != '') { sctop=document.documentElement.scrollTop || document.body.scrollTop; scleft=document.documentElement.scrollLeft || document.body.scrollLeft; } callmap(what, twop, jtwo.substring(0,1).toLowerCase() + jtwo.substring(1,2).toUpperCase()); if (ht != '') { document.getElementById('abt').style.display='inline-block'; document.getElementById('abb').style.display='inline-block'; document.getElementById('abd').style.display='inline-block'; document.getElementById(ht).scrollIntoView(); } } else { if (ht != '') { sctop=document.documentElement.scrollTop || document.body.scrollTop; scleft=document.documentElement.scrollLeft || document.body.scrollLeft; } callmap(what, twop, jtwo); if (ht != '') { document.getElementById('abt').style.display='inline-block'; document.getElementById('abb').style.display='inline-block'; document.getElementById('abd').style.display='inline-block'; document.getElementById(ht).scrollIntoView(); } } } // lastflag=''; } function oldcanvasclick(e) { var rectis=document.body.getBoundingClientRect(); var topllong=-180.0; var topllat=90.0; var onepixelequals=izoom; //document.title='canvasclick'; e = e || window.event; e.preventDefault(); if (e.touches) { if (e.touches[0].pageX) { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals); drawc(eval(-rectis.left + e.touches[0].pageX), eval(-rectis.top + e.touches[0].pageY)); thislat=eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals)) + '&ntztontz=y'; } else { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals); drawc(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY)); thislat=eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals)) + '&ntztontz=y'; } } else if (e.clientX || e.clientY) { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals); drawc(eval(-rectis.left + e.pageX), eval(-rectis.top + e.pageY)); thislat=eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - e.clientY * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + e.clientX * onepixelequals)) + '&ntztontz=y'; } else { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals); drawc(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY)); thislat=eval(topllat - e.clientY * onepixelequals); thislong=eval(topllong + e.clientX * onepixelequals); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals)) + '&ntztontz=y'; } } function olddefclick(e) { var rectis=document.body.getBoundingClientRect(); var topllong=-180.0; var topllat=90.0; var onepixelequals=izoom; //document.title='defclick'; e = e || window.event; e.preventDefault(); if (e.touches) { if (e.touches[0].pageX) { lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals); drawc(eval(-rectis.left + e.touches[0].pageX), eval(-rectis.top + e.touches[0].pageY)); thislat=eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals)) + '&ntztontz=y'; } else { lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals); drawc(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY)); thislat=eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals)) + '&ntztontz=y'; } } else if (e.clientX || e.clientY) { lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals); drawc(eval(-rectis.left + e.pageX), eval(-rectis.top + e.pageY)); thislat=eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - e.clientY * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + e.clientX * onepixelequals)) + '&ntztontz=y'; } else { lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals); drawc(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY)); thislat=eval(topllat - e.clientY * onepixelequals); thislong=eval(topllong + e.clientX * onepixelequals); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals)) + '&ntztontz=y'; } } function canvasclick(e) { var rectis=document.body.getBoundingClientRect(); var topllong=-180.0; var topllat=90.0; onepixelequals=eval(0.0 + eval(1.0 * izoom)); //document.title='canvasclick'; e = e || window.event; e.preventDefault(); if (e.touches) { if (e.touches[0].pageX) { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals); if (drawc(eval(-rectisleft + e.touches[0].pageX), eval(-rectistop + e.touches[0].pageY))) { lastlat=alats(thislat); lastlong=alongs(thislong); thislat=eval(topllat - eval(-rectistop + e.touches[0].pageY) * onepixelequals); thislong=eval(topllong + eval(-rectisleft + e.touches[0].pageX) * onepixelequals); //console.log('rectistop=' + rectistop + ' and rectisleft=' + rectisleft + ' and rectisy=' + rectisy + ' and thislat=' + thislat); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectistop + e.touches[0].pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectisleft + e.touches[0].pageX) * onepixelequals)) + '&ntztontz=y'; } } else { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals); if (drawc(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY))) { lastlat=alats(thislat); lastlong=alongs(thislong); thislat=eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals); //console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' anD thislat=' + thislat); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals)) + '&ntztontz=y'; } } } else if (e.pageX || e.pageY) { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals); //alert('02: ' + e.screenX + ' ' + e.pageX + ' ' + e.screenY + ' ' + e.pageY + ' ' + thislong + ' ' + thislat); if (drawc(eval(-rectisleft + e.pageX), eval(-rectistop + e.pageY))) { lastlat=alats(thislat); lastlong=alongs(thislong); //thislat=eval(topllat - eval(-rectistop + e.pageY) * onepixelequals); //thislong=eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals); thislat=eval(eval(eval(topllat * onepixelequals - eval(-rectistop + e.pageY) * 1)) / onepixelequals); thislong=eval(eval(eval(topllong * onepixelequals + eval(-rectisleft + e.pageX) * 1)) / onepixelequals); //alert('22: ' + e.screenX + ' ' + e.pageX + ' ' + e.screenY + ' ' + e.pageY + ' ' + thislong + ' ' + thislat); //console.log('rectistop=' + rectistop + ' and rectisleft=' + rectisleft + ' and rectisy=' + rectisy + ' aNd thislat=' + thislat + ' and e.pageY=' + e.pageY + ' and new plus idea=' + eval(topllat - eval(rectistop + e.pageY) * onepixelequals)); //document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectistop + e.pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals)) + '&ntztontz=y'; document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + thislat) + '&longitude=' + encodeURIComponent('' + thislong) + '&ntztontz=y'; } } else { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals); if (drawc(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY))) { lastlat=alats(thislat); lastlong=alongs(thislong); thislat=eval(topllat - eval(-rectis.top + e.clientY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.clientX) * onepixelequals); //console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' And thislat=' + thislat); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.clientX) * onepixelequals)) + '&ntztontz=y'; } } } function defclick(e) { var rectis=document.body.getBoundingClientRect(); var topllong=-180.0; var topllat=90.0; onepixelequals=eval(0.0 + eval(1.0 * izoom)); //document.title='canvasclick'; e = e || window.event; e.preventDefault(); if (e.touches) { if (e.touches[0].pageX) { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals); if (drawc(eval(-rectisleft + e.touches[0].pageX), eval(-rectistop + e.touches[0].pageY))) { lastlat=alats(thislat); lastlong=alongs(thislong); thislat=eval(topllat - eval(-rectistop + e.touches[0].pageY) * onepixelequals); thislong=eval(topllong + eval(-rectisleft + e.touches[0].pageX) * onepixelequals); //console.log('rectistop=' + rectistop + ' and rectisleft=' + rectisleft + ' and rectisy=' + rectisy + ' and thislat=' + thislat); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectistop + e.touches[0].pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectisleft + e.touches[0].pageX) * onepixelequals)) + '&ntztontz=y'; } } else { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals); if (drawc(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY))) { lastlat=alats(thislat); lastlong=alongs(thislong); thislat=eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals); //console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' anD thislat=' + thislat); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals)) + '&ntztontz=y'; } } } else if (e.pageX || e.pageY) { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals); //alert('03: ' + e.screenX + ' ' + e.pageX + ' ' + e.screenY + ' ' + e.pageY + ' ' + thislong + ' ' + thislat); if (drawc(eval(-rectisleft + e.pageX), eval(-rectistop + e.pageY))) { lastlat=alats(thislat); lastlong=alongs(thislong); //thislat=eval(topllat - eval(-rectistop + e.pageY) * onepixelequals); //thislong=eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals); thislat=eval(eval(eval(topllat * onepixelequals - eval(-rectistop + e.pageY) * 1)) / onepixelequals); thislong=eval(eval(eval(topllong * onepixelequals + eval(-rectisleft + e.pageX) * 1)) / onepixelequals); //alert('22: ' + e.screenX + ' ' + e.pageX + ' ' + e.screenY + ' ' + e.pageY + ' ' + thislong + ' ' + thislat); //console.log('rectistop=' + rectistop + ' and rectisleft=' + rectisleft + ' and rectisy=' + rectisy + ' aNd thislat=' + thislat + ' and e.pageY=' + e.pageY + ' and new plus idea=' + eval(topllat - eval(rectistop + e.pageY) * onepixelequals)); //document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectistop + e.pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals)) + '&ntztontz=y'; document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + thislat) + '&longitude=' + encodeURIComponent('' + thislong) + '&ntztontz=y'; } } else { //lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals); //alert('04: ' + e.screenX + ' ' + e.pageX + ' ' + e.screenY + ' ' + e.pageY + ' ' + thislong + ' ' + thislat); if (drawc(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY))) { lastlat=alats(thislat); lastlong=alongs(thislong); thislat=eval(topllat - eval(-rectis.top + e.clientY) * onepixelequals); thislong=eval(topllong + eval(-rectis.left + e.clientX) * onepixelequals); //alert('44: ' + e.screenX + ' ' + e.pageX + ' ' + e.screenY + ' ' + e.pageY + ' ' + thislong + ' ' + thislat); //console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' And thislat=' + thislat); document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.clientX) * onepixelequals)) + '&ntztontz=y'; } } } function clockit(hoursoffgmt) { // 1 o'clock is 🕐 // 2 o'clock is 🕑 // 12 o'clock is 🕛 // 2:30 is 🕝 // 11:30 is 🕦 // 12:30 is 🕧 var along='Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday'; var gmtdatetimeis='' + new Date().toUTCString(); var daybit=''; var ampm=' am'; if (gmtdatetimeis.indexOf('day') != -1) { ampm+=', ' + gmtdatetimeis.split('day')[0].split(' ')[eval(-1 + gmtdatetimeis.split('day')[0].split(' ').length)] + 'day'; } else if (gmtdatetimeis.indexOf(',') != -1) { ampm+=', ' + (gmtdatetimeis.split(',')[0].split(' ')[eval(-1 + gmtdatetimeis.split(',')[0].split(' ').length)] + '').replace(/^Sat$/g,'Saturday').replace(/^Sun$/g,'Sunday').replace(/^Mon$/g,'Monday').replace(/^Tue$/g,'Tuesday').replace(/^Wed$/g,'Wednesday').replace(/^Thu$/g,'Thursday').replace(/^Fri$/g,'Friday'); } if (ampm.length > 3) { daybit=ampm.substring(5); } var minis=eval('' + gmtdatetimeis.split(':')[1]); var hris=eval(('' + gmtdatetimeis.split(':')[0]).split(' ')[eval(-1 + ('' + gmtdatetimeis.split(':')[0]).split(' ').length)]); if (('' + hoursoffgmt).indexOf('-') != -1 && eval(eval('' + hoursoffgmt.replace('+','')) + hris) < 0.0) { ampm=ampm.replace('am', 'pm'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(',' + daybit)[0].split(',')[eval(-1 + along.split(',' + daybit)[0].split(',').length)]); } } else if (('' + hoursoffgmt).indexOf('-') == -1 && eval(eval('' + hoursoffgmt.replace('+','')) + hris) >= 24) { if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } } else if (('' + hoursoffgmt).indexOf('-') == -1 && eval(eval('' + hoursoffgmt.replace('+','')) + hris) >= 12) { ampm=ampm.replace('am', 'pm'); } hris+=eval(eval(24 + eval('' + hoursoffgmt.replace('+','').split('.')[0])) % 24); if (('' + hoursoffgmt.replace('+','')).indexOf('.5') != -1) { if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1 && minis >= 30) { minis-=30; } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) { hris--; if (hris < 24) { hris=23; ampm=ampm.replace('am', 'pm'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(',' + daybit)[0].split(',')[eval(-1 + along.split(',' + daybit)[0].split(',').length)]); } } minis+=30; } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') == -1 && minis < 30) { minis+=30; } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) { hris++; if (hris > 24) { hris=24; ampm=ampm.replace('pm', 'am'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } } minis-=30; } } else if (('' + hoursoffgmt.replace('+','')).indexOf('.25') != -1) { if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1 && minis >= 15) { minis-=15; } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) { hris--; if (hris < 24) { hris=23; ampm=ampm.replace('am', 'pm'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(',' + daybit)[0].split(',')[eval(-1 + along.split(',' + daybit)[0].split(',').length)]); } } minis+=15; } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') == -1 && minis < 45) { minis+=15; } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) { hris++; if (hris > 24) { hris=24; ampm=ampm.replace('pm', 'am'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } } minis-=15; } } else if (('' + hoursoffgmt.replace('+','')).indexOf('.75') != -1) { if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1 && minis >= 45) { minis-=45; } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) { hris--; if (hris < 24) { hris=23; ampm=ampm.replace('am', 'pm'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(',' + daybit)[0].split(',')[eval(-1 + along.split(',' + daybit)[0].split(',').length)]); } } minis+=45; } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') == -1 && minis < 15) { minis+=45; } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) { hris++; if (hris > 24) { hris=24; ampm=ampm.replace('pm', 'am'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } } minis-=45; } } //alert('' + hoursoffgmt + ' ' + hris + ' ' + minis + ' ' + gmtdatetimeis); if (minis > 45 && eval(hris % 12) == 0) { return ' ' + String.fromCodePoint(128336) + ampm; } else if (eval(hris % 12) == 0 && minis <= 15) { return ' ' + String.fromCodePoint(128347) + ampm; } else if (eval(hris % 12) == 0) { return ' ' + String.fromCodePoint(128359) + ampm; } else if (minis >= 45) { return ' ' + String.fromCodePoint(eval(eval(hris % 12) + 128336)) + ampm; } else if (minis <= 15) { return ' ' + String.fromCodePoint(eval(eval(hris % 12) + 128335)) + ampm; } else { return ' ' + String.fromCodePoint(eval(eval(hris % 12) + 128347)) + ampm; } return ''; } function emfilter(inih) { var bcxs=inih.split(' &#'); var bitis='', ib=0; var outih=inih; for (ib=1; ib= '0' && bcxs[ib].substring(0,1) <= '9'))) { outih=outih.replace('(' + bcxs[ib].split(')')[0] + ')', '(' + bcxs[ib].split(')')[0] + clockit(bcxs[ib].split(')')[0]) + ')'); } } return outih; } function orflag(thiscc) { var ccchar='', ccsuff=''; var lri='ABCDEFGHIJKLMNOPQRSTUVWXYZ'; var dri=['127462','127463','127464','127465','127466','127467','127468','127469','127470','127471','127472','127473','127474','127475','127476','127477','127478','127479','127480','127481','127482','127483','127484','127485','127486','127487']; for (var iccsuff=0; iccsuff= 2) { if (eval('' + cs[0]) != eval('' + cs[eval(-2 + cs.length)]) || eval('' + cs[1]) != eval('' + cs[eval(-1 + cs.length)])) { ars[ij].coords+=',' + cs[0] + ',' + cs[1]; } } } setTimeout(cursorcheck, 3000); } function cursorcheck() { if (('' + document.body.style.cursor).indexOf('progress') != -1) { elem.style.cursor='progress'; setTimeout(cursorcheck, 3000); } else { document.getElementById('myimg').title=''; elem.style.cursor='pointer'; elema.style.cursor='pointer'; " . $writeinnards . " } } function lhovin(indesc) { lhov=indesc; if (1 == 2) { document.getElementById('myimg').title=lhov; } } function lhovout(indesc) { if (1 == 2) { document.getElementById('myimg').title=document.getElementById('myimg').title.replace(lhov,''); } } function retll(x, y) { return '' + eval(-180.0 + x) + ',' + eval(90.0 - y); } function checkdsa(ath) { waitplease=true; var wasih=''; var athcoords=('' + ath.coords); //.substring(0, Math.floor(eval(0.1 * ('' + ath.coords).length))); if (document.getElementById('svgd').innerHTML.indexOf(('' + athcoords)) != -1) { wasih='
IN') !== false) { $mappings.='INKASEHSAHSOSOLSSSDSXKKOSCYCYN'; } for ($i=0; $i<(-1 + sizeof($parts)); $i++) { if (strpos($parts[$i], '"sr_sov_a3":"') !== false) { $globalattr=' data-iso3="' . str_replace("DN1","DK1",explode('"', explode('"sr_sov_a3":"', $parts[$i])[1])[0]) . '"'; if (strpos($mappings, '>' . str_replace("DN1","DK1",explode('"', explode('"sr_sov_a3":"', $parts[$i])[1])[0]) . '') !== false) { $iparts=explode('>' . str_replace("DN1","DK1",explode('"', explode('"sr_sov_a3":"', $parts[$i])[1])[0]) . '', $mappings); $globalattr.=' data-iso2="' . str_replace("DN","DK",explode('>', explode('', $iparts[0])[-2 + sizeof(explode('', $iparts[0]))])[-1 + sizeof(explode('>', explode('', $iparts[0])[-2 + sizeof(explode('', $iparts[0]))]))]) . '"'; } else if (substr(explode('"', explode('"sr_sov_a3":"', $parts[$i])[1])[0],-1,1) >= '0' && substr(explode('"', explode('"sr_sov_a3":"', $parts[$i])[1])[0],-1,1) <= '9') { $globalattr.=' data-iso2="' . str_replace("DN","DK",substr(explode('"', explode('"sr_sov_a3":"', $parts[$i])[1])[0],0,2)) . '"'; } } if (strpos($parts[$i], '"sr_subunit":"') !== false) { $globalattr.=' data-cname="' . explode('"', explode('"sr_subunit":"', $parts[$i])[1])[0] . '"'; } $coords=str_replace('[','',str_replace(']','',explode('[[' , $parts[$i])[-1 + sizeof(explode('[[' , $parts[$i]))])); $newcoords=$coords; if (!$dolatlong || 1 == 1) { $lls=explode(",", $coords); $newcoords=""; for ($j=0; $j\n"; if ($i == 0 && $innards != '') { $innards=''; } $innards.=apptohtmstuff($newcoords,$coords); //echo "\n"; } $htmlis.="  

GeoJSON World Countries

RJM Programming 🔎 January, 2023

Thanks to https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_admin_0_scale_rank.geojson



" . $innards . "
"; $bitsare=explode("}", $htmlis); $onebit=$bitsare[0] . "}"; $newh=str_replace($onebit, substr($onebit,0,(-1 + strlen($onebit))) . " context.stroke(); \n elem.style.cursor='pointer'; \n elema.style.cursor='pointer'; \n} \n" . $midbit, str_replace("", $abit . "", $htmlis)); if (strpos($newh, "function ouralert(") === false) { $newh=str_replace("", "\n" . $midbit . "\n" . "", $newh); } if (!file_exists('countries.html') && strpos(('' . $_SERVER['QUERY_STRING']), 'zoom=') === false && strpos(('' . $_SERVER['QUERY_STRING']), 'uselatlaong=') === false) { file_put_contents('countries.html', $newh); } echo $newh; ?>