$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 izoom=location.search.split('zoom=')[1] ? eval(decodeURIComponent(location.search.split('zoom=')[1].split('&')[0])) : 1.0; var lastl='', longlastl='', elem=null, context=null, thislat=0.0, thisong=0.0, mapwo=null, jtwo=' ', mapwog=null; var rectisleft=0, rectistop=0, rectisy=0; var imglookdone=false, ginintzl, gtp, gitwo, gabi='', waitplease=false, appendtoinnerHTML='', lastflagged=''; var lasttwo='', lastflag=''; function onl() { if (izoom != 1.0) document.body.style.zoom=('' + eval(izoom * 100.0) + '%'); 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 (('' + 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 drawc(centerX, centerY) { var topllong=-180.0; var topllat=90.0; var onepixelequals=izoom; context.beginPath(); context.globalAlpha = 0.5; context.arc(centerX, centerY, 1, 0, 2 * Math.PI, false); context.fillStyle = 'green'; context.fill(); context.lineWidth = 5; context.lineWidth = 2; context.strokeStyle = '#003300'; context.stroke(); } 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 mapurl=origmapurl + thislat + ',' + thislong + ',~Your%20Place~]'; 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,'_'); 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,'_'); 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,'_'); 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,'_'); 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(' is ') != -1) { if (areg == '') { 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 '); } 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]) + '~]'; } } 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=window.open(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=window.open(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 checkif(iois) { var morehuh=false; var mixedcase=true; var twop=''; var what='', ourabi=''; 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 + ' by answering Y for just this or Yes for both this and the map. ' + ourlong.replace(': Longitude', lastflag + ': Longitude'), ' '); 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 { 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 + ' by answering Y for just this or Yes for both this and the map. ' + ourlong.replace(': Longitude', lastflag + ': Longitude'), ' '); 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 { 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 (morehuh) { if (mixedcase) { callmap(what, twop, jtwo.substring(0,1).toLowerCase() + jtwo.substring(1,2).toUpperCase()); } else { callmap(what, twop, jtwo); } } // 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; 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(-rectisleft + e.touches[0].pageX), eval(-rectistop + e.touches[0].pageY)); 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); 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); //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); drawc(eval(-rectisleft + e.pageX), eval(-rectistop + e.pageY)); thislat=eval(topllat - eval(-rectistop + e.pageY) * onepixelequals); thislong=eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals); //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'; } 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 - 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; 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(-rectisleft + e.touches[0].pageX), eval(-rectistop + e.touches[0].pageY)); 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); 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); //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); drawc(eval(-rectisleft + e.pageX), eval(-rectistop + e.pageY)); thislat=eval(topllat - eval(-rectistop + e.pageY) * onepixelequals); thislong=eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals); //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'; } 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 - 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 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'; " . $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="' . explode('"', explode('"sr_sov_a3":"', $parts[$i])[1])[0] . '"'; if (strpos($mappings, '>' . explode('"', explode('"sr_sov_a3":"', $parts[$i])[1])[0] . '') !== false) { $iparts=explode('>' . explode('"', explode('"sr_sov_a3":"', $parts[$i])[1])[0] . '', $mappings); $globalattr.=' data-iso2="' . 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="' . 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} \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; ?>