{"id":58072,"date":"2023-01-14T03:01:39","date_gmt":"2023-01-13T17:01:39","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=58072"},"modified":"2023-01-14T06:49:58","modified_gmt":"2023-01-13T20:49:58","slug":"geojson-world-coastline-rivers-quiz-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-coastline-rivers-quiz-tutorial\/","title":{"rendered":"GeoJson World Coastline Rivers Quiz Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Coastline Rivers Quiz Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions_rivers_quiz.jpg\" title=\"GeoJson World Coastline Rivers Quiz Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Coastline Rivers Quiz Tutorial<\/p><\/div>\n<p>It&#8217;s time to turn our attention away from GeoJson World Countries, as talked about with yesterday&#8217;s <a title='GeoJson World Countries Plotted Ports Tutorial' href='#gjwcppt'>GeoJson World Countries Plotted Ports Tutorial<\/a>, and back to GeoJson World Coastline ideas.  Why?  We want to add a &#8230;<\/p>\n<p><code><br \/>\nRivers Quiz<br \/>\n<\/code><\/p>\n<p> &#8230; via the (generously provided) <a target=_blank title='HTTP:\/\/geojson.xyz rivers lake centerlines' href='https:\/\/d2ad6b4ur7yvpq.cloudfront.net\/naturalearth-3.3.0\/ne_50m_rivers_lake_centerlines.geojson'>HTTP:\/\/geojson.xyz rivers lake centerlines<\/a> GeoJSON data we download and then uploaded to become rivers.geojson data file.   Now we were wondering out of &#8230;<\/p>\n<ul>\n<li>use the URL to this GeoJSON file as the &#8220;src&#8221; attribute of an HTML iframe &#8230;<br \/>\n<code><br \/>\n&lt;iframe id=ifrivers onload=getthejson(this); style=display:none; src=.\/rivers.geojson&gt;&lt;\/iframe&gt;<br \/>\n<\/code><br \/>\n &#8230; element (and then access the content via the onload event &#8230;<br \/>\n<code><br \/>\n  var rivers='', arivers=[], iguess=-1, isofar=' ', jscore=0, jgoes=0, elema=null, contexta=null, rectisleft=0, rectistop=0;<br \/>\n  <br \/>\n  function getthejson(iois) {<br \/>\n    var aconto = (iois.contentWindow || iois.contentDocument);<br \/>\n    if (aconto != null) {<br \/>\n       if (aconto.document) { aconto = aconto.document; }<br \/>\n       if (aconto.body != null) {<br \/>\n       rivers='' + aconto.body.innerHTML;<br \/>\n       setTimeout(populaterivers, 500);<br \/>\n       }<br \/>\n    }<br \/>\n  }<br \/>\n<\/code><br \/>\n &#8230; function) would suffice, or if we would end up using &#8230;\n<\/li>\n<li>Ajax call<\/li>\n<\/ul>\n<p> &#8230; to access this data, and were a bit surprised the former method was all fine.  Of course there are snazzy inbuilt Javascript hierarchical calls you can make to process the data, but we find, with GeoJSON data, in the client realm (where we&#8217;re keen to stay with today&#8217;s work<font size=1> (though PHP serverside can, of course, be purloined to do all this work, should you have that available)<\/font>), of Javascript, we just need very basic string functions &#8230;<\/p>\n<ul>\n<li>split <font size=1>(versus PHP explode)<\/font><\/li>\n<li>index <font size=1>(versus PHP strpos)<\/font><\/li>\n<li>substring <font size=1>(versus PHP substr)<\/font><\/li>\n<li>replace <font size=1>(versus PHP str_replace)<\/font><\/li>\n<li>push <font size=1>(versus PHP array_push)<\/font><\/li>\n<\/ul>\n<p> &#8230; to get by processing &#8230;<\/p>\n<p><code><br \/>\n  var rivers='', arivers=[], iguess=-1, isofar=' ', jscore=0, jgoes=0, elema=null, contexta=null, rectisleft=0, rectistop=0;<br \/>\n  <br \/>\n  function populaterivers() {<br \/>\n    var found=-1, ifnd=0;<br \/>\n    var rbits=rivers.split(']]}}');<br \/>\n    var lastn='', hdrbit='', hbits=[];<br \/>\n    for (var irr=1; irr&lt;(-1 + rbits.length); irr++) {<br \/>\n      hdrbit=rbits[-1 + irr].split('{' + String.fromCharCode(34) + 'type' + String.fromCharCode(34) + ':' + String.fromCharCode(34) + 'Feature')[eval(-1 + rbits[-1 + irr].split('{' + String.fromCharCode(34) + 'type' + String.fromCharCode(34) + ':' + String.fromCharCode(34) + 'Feature').length)] + '';<br \/>\n      hbits=hdrbit.split(',' + String.fromCharCode(34) + 'name' + String.fromCharCode(34) + ':' + String.fromCharCode(34));<br \/>\n      if (hbits.length &gt; 1) {<br \/>\n        if (lastn != hbits[1].split(String.fromCharCode(34))[0]) {<br \/>\n          lastn=hbits[1].split(String.fromCharCode(34))[0];<br \/>\n          found=-1;<br \/>\n          if (arivers.length &gt; 0) {<br \/>\n          for (ifnd=0; ifnd&lt;arivers.length; ifnd++) {<br \/>\n            if (('' + arivers[ifnd]).indexOf(':') != -1 && found == -1) {<br \/>\n              if (('' + arivers[ifnd]).split(':')[0] == lastn) { found=ifnd; }<br \/>\n            }<br \/>\n          }<br \/>\n          }<br \/>\n          if (found &gt;= 0) {<br \/>\n          \/\/if (lastn == 'Murray') { console.log(hdrbit.split(':[[')[1].replace(\/\\]\\]\\,\\[\\[\/g,' ').replace(\/\\]\\,\\[\/g,',').replace(\/\\[\/g,'').replace(\/\\]\/g,'')); }<br \/>\n          arivers[found]+=' ' + hdrbit.split(':[[')[1].replace(\/\\]\\]\\,\\[\\[\/g,' ').replace(\/\\]\\,\\[\/g,',').replace(\/\\[\/g,'').replace(\/\\]\/g,'');<br \/>\n          } else {<br \/>\n          \/\/if (lastn == 'Murray') { console.log(lastn + ':' + hdrbit.split(':[[')[1].replace(\/\\]\\]\\,\\[\\[\/g,' ').replace(\/\\]\\,\\[\/g,',').replace(\/\\[\/g,'').replace(\/\\]\/g,'')); }<br \/>\n          arivers.push(lastn + ':' + hdrbit.split(':[[')[1].replace(\/\\]\\]\\,\\[\\[\/g,' ').replace(\/\\]\\,\\[\/g,',').replace(\/\\[\/g,'').replace(\/\\]\/g,''));<br \/>\n          }<br \/>\n        } else {<br \/>\n          \/\/if (lastn == 'Murray') { console.log(hdrbit.split(':[[')[1].replace(\/\\]\\]\\,\\[\\[\/g,' ').replace(\/\\]\\,\\[\/g,',').replace(\/\\[\/g,'').replace(\/\\]\/g,'')); }<br \/>\n          arivers[-1 + arivers.length]+=' ' + hdrbit.split(':[[')[1].replace(\/\\]\\]\\,\\[\\[\/g,' ').replace(\/\\]\\,\\[\/g,',').replace(\/\\[\/g,'').replace(\/\\]\/g,'');<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n    lastn='';<br \/>\n  }<br \/>\n<\/code><\/p>\n<p> &#8230; the (ever so) consistent GeoJSON data!<\/p>\n<p>The progress with GeoJson World Countries helped too.  We knew to add another HTML canvas layer <font color=purple>as per<\/font> &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-svg-overlay-colour-infill-tutorial\/'>\n<ul>\n<li>document.body <font color=purple><strike>(now with the new <i>onmousemove=airportplot(event);<\/i> event logic)<\/strike><\/font> lowest level &#8230;<\/li>\n<li>overlayed by HTML canvas element plotted with world country linework &#8230; <font color=purple>now including &#8230;<\/font><\/li>\n<li><font color=purple>overlayed by HTML canvas element dedicated to nearest airport plotting &#8230;<\/font><br \/>\n<code><br \/>\n<font color=purple>&lt;canvas id=myacanvas height='180' width='360' style='background-color:transparent;z-index:55;display:inline-block;position:absolute;top:0px;left:0px;'&gt;&lt;\/canvas&gt;<\/font><br \/>\n<\/code>\n<\/li>\n<li>overlayed by HTML img (transparent image) element and its associated image map area elements &#8230; <font color=purple><strike>and today we add into the mix &#8230;<\/strike><\/font><\/li>\n<li><font color=purple><strike>HTML div hosting <a target=_blank title='HTML svg information from w3schools' href='https:\/\/www.w3schools.com\/html\/html5_svg.asp'>SVG<\/a> elements overlay<font color=blue><strike>ing<\/strike> initialized with &#8220;land&#8221; parts green infilled SVG at a mid range z-index<\/font> (<font color=blue><strike>only<\/strike> as well as<\/font> when called upon) individual GeoJson entities overlay<\/strike><\/font><\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; and to, at document.body onload logic &#8230;<\/p>\n<p><code><br \/>\n\/\/ ... and extended document.body onload event logic has added, up near its top ...<br \/>\n    elema = document.getElementById('myacanvas');<br \/>\n    contexta = elema.getContext('2d');<br \/>\n<\/code><\/p>\n<p> &#8230; and supplement with another HTML sub &#8220;emoji button&#8221; &#10067; ( &amp;#10067; ) type element &#8230;<\/p>\n<p><code><br \/>\n&lt;sub style=cursor:pointer; onclick=getariver(); title='River Quiz'&gt;&amp;#10067;&lt;\/sub&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; allowing for &#8230;<\/p>\n<p><code><br \/>\n  function getariver() {<br \/>\n    \/\/for (var ih=0; ih&lt;arivers.length; ih++) {<br \/>\n    \/\/  if (arivers[ih].split(':')[0] == 'Murray') { return ih; }<br \/>\n    \/\/}<br \/>\n    iguess=Math.floor(Math.random() * arivers.length);<br \/>\n    if (isofar.indexOf(',' + iguess + ',') != -1) {<br \/>\n    while (isofar.indexOf(',' + iguess + ',') != -1) {<br \/>\n    iguess=Math.floor(Math.random() * arivers.length);<br \/>\n    }<br \/>\n    }<br \/>\n    isofar+=',' + iguess + ',';<br \/>\n    lastn=arivers[iguess].split(':')[0];<br \/>\n    plotariver(iguess);<br \/>\n    setTimeout(askariver, 8000);<br \/>\n    return iguess;<br \/>\n  }<br \/>\n  <br \/>\n  function askariver() {<br \/>\n    var another=false;<br \/>\n    var retthis=prompt('What is the name of this new blue river plotted on the world map?   Enter ? to get given more time looking at (longitude,latitude) = (' + arivers[iguess].split(':')[1].split(',')[0] + ',' + arivers[iguess].split(':')[1].split(',')[1] + ')', '');<br \/>\n    if (retthis == null) {<br \/>\n      jgoes++;<br \/>\n      another=confirm('Bad luck. Answer was ' + lastn + '. Score ' + jscore + '\/' + jgoes + '.  Another go with a new river?');<br \/>\n    } else if (retthis.trim() == '?') {<br \/>\n      setTimeout(askariver, 8000);<br \/>\n      return '';<br \/>\n    } else if (retthis.trim() == '') {<br \/>\n      jgoes++;<br \/>\n      another=confirm('Bad luck. Answer was ' + lastn + '. Score ' + jscore + '\/' + jgoes + '.  Another go with a new river?');<br \/>\n    } else if (lastn.toLowerCase().indexOf(retthis.toLowerCase()) == -1) {<br \/>\n      jgoes++;<br \/>\n      another=confirm('Bad luck. Answer was ' + lastn + '. Score ' + jscore + '\/' + jgoes + '.  Another go with a new river?');<br \/>\n    } else if (lastn.toLowerCase() == retthis.toLowerCase()) {<br \/>\n      jgoes++;<br \/>\n      jscore++;<br \/>\n      another=confirm('Well done!  Answer was ' + lastn + '. Score ' + jscore + '\/' + jgoes + '.  Another go with a new river?');<br \/>\n    } else if (retthis.trim().length &gt;= 1) {<br \/>\n      jgoes++;<br \/>\n      another=confirm('Bad luck. Answer was ' + lastn + '. Score ' + jscore + '\/' + jgoes + '.  Another go with a new river?');<br \/>\n    } else {<br \/>\n      jgoes++;<br \/>\n      jscore++;<br \/>\n      another=confirm('Will pay that.  Answer was ' + lastn + '. Score ' + jscore + '\/' + jgoes + '.  Another go with a new river?');<br \/>\n    }<br \/>\n    if (another) { getariver(); } else {   contexta.clearRect(0,0,360,180);   }<br \/>\n    return '';<br \/>\n  }<br \/>\n  <br \/>\n  function plotariver(which) {<br \/>\n    contexta.clearRect(0,0,360,180);<br \/>\n    lastn=arivers[which].split(':')[0];<br \/>\n    var rest=arivers[which].split(':')[1];<br \/>\n    console.log(rest);<br \/>\n    var restlonglat=[];  \/\/rest.split(',');<br \/>\n    var therest=rest.split(' ');<br \/>\n    \/\/alert(eval(180.0 + eval('' + restlonglat[0])) + ',' + eval(90.0 - eval('' + restlonglat[1])));<br \/>\n    for (var jrrr=0; jrrr&lt;therest.length; jrrr++) {<br \/>\n    restlonglat=therest[jrrr].split(',');<br \/>\n    for (var irrr=2; irrr&lt;restlonglat.length; irrr+=2) {<br \/>\n       if (irrr == 2) {<br \/>\n         contexta.strokeStyle = '#0000ff';<br \/>\n         contexta.lineWidth = 1;<br \/>\n         contexta.beginPath();<br \/>\n         console.log('context.moveTo(' + eval(180.0 + eval('' + restlonglat[0])) + ',' + eval(90.0 - eval('' + restlonglat[1])) + ');');<br \/>\n         contexta.moveTo(eval(180.0 + eval('' + restlonglat[0])), eval(90.0 - eval('' + restlonglat[1])));<br \/>\n       }<br \/>\n    \/\/alert(eval(180.0 + eval('' + restlonglat[irrr])) + ',' + eval(90.0 - eval('' + restlonglat[1 + irrr])));<br \/>\n         console.log('context.lineTo(' + eval(180.0 + eval('' + restlonglat[eval(0 + eval('' + irrr))])) + ',' + eval(90.0 - eval('' + restlonglat[eval(1 + eval('' + irrr))])) + ');');<br \/>\n      contexta.lineTo(eval(180.0 + eval('' + restlonglat[eval(0 + eval('' + irrr))])), eval(90.0 - eval('' + restlonglat[eval(1 + eval('' + irrr))])));<br \/>\n       \/\/if (eval(irrr + 1) &gt;= eval('' + restlonglat.length)) { context.stroke(); }<br \/>\n    }<br \/>\n    contexta.stroke();<br \/>\n    }<br \/>\n  }<br \/>\n<\/code>  <\/p>\n<p> &#8230; to work the Rivers Quiz.  Finally, though, for all good practicalities we also need those zoom logics out of GeoJson World Countries logic, via &#8220;emoji button&#8221; &#128270; ( &amp;#128270; ) &#8230;<\/p>\n<p><code><br \/>\n&lt;a style=cursor:pointer; title='Zoom In' onclick='event.stopPropagation(); event.preventDefault(); zoomin();'&gt;&amp;#128270;&lt;\/a&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; calling on meta name=viewport tag for mobile &#8230;<\/p>\n<p><code><br \/>\n&lt;meta id='myviewport' name='viewport' content='width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes'  &gt;<br \/>\n<\/code><\/p>\n<p> &#8230; as well as the zooming Javascript &#8230;<\/p>\n<p><code><br \/>\nvar jzoom=1.0, izoom=location.search.split('zoom=')[1] ? eval(decodeURIComponent(location.search.split('zoom=')[1].split('&')[0])) : 1.0;<br \/>\n<br \/>\nfunction zoomin() {<br \/>\n   if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n   jzoom*=2;<br \/>\n   document.getElementById('myviewport').setAttribute('content', 'width=device-width, initial-scale=' + eval(jzoom * izoom) + ', minimum-scale=0.1, maximum-scale=8, user-scalable=yes');<br \/>\n   window.scrollTo(0,0);    \/\/izoom*=2;<br \/>\n   } else {<br \/>\n   \/\/if (1 == 1) {<br \/>\n   \/\/  alert('Please use your web browser View Menu options Zoom In or Zoom Out');<br \/>\n   \/\/} else {<br \/>\n     document.body.style.zoom=('' + eval(izoom * 200.0) + '%');<br \/>\n     izoom*=2;<br \/>\n     \/\/location.href=document.URL.split('?')[0].split('#')[0] + '?zoom=' + encodeURIComponent('' + eval(2 * izoom));<br \/>\n   \/\/}<br \/>\n   }<br \/>\n}<br \/>\n<\/code><\/p>\n<p>So feel free to try the new Rivers Quiz in <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php----GETME\" title=\"regions.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php----GETME\" title=\"regions.php\">regions.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php\" title=\"GeoJson PHP web application\">GeoJson Word Coastlines PHP web application<\/a> in a new window, or you can <a href='#regionsif'>also try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/new-geojson-world-countries-plotted-ports-tutorial\/'>New GeoJson World Countries Plotted Ports Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwcppt'>Previous relevant <a target=_blank title='GeoJson World Countries Plotted Ports Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-plotted-ports-tutorial\/'>GeoJson World Countries Plotted Ports Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries Plotted Ports Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_ports_as_well.jpg\" title=\"GeoJson World Countries Plotted Airports Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Countries Plotted Ports Tutorial<\/p><\/div>\n<p>There are a few interesting aspects to today&#8217;s extension of functionality onto yesterday&#8217;s <a title='GeoJson World Countries Plotted Airports Tutorial' href='#gjwcpat'>GeoJson World Countries Plotted Airports Tutorial<\/a>&#8216;s GeoJson World Countries web application &#8230;<\/p>\n<ul>\n<li>where to modularise &#8230; we think &#8220;data collection&#8221; commonality is a good reason, and so we <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/intair.php----GETME\" title='intair.php'>make these changes<\/a> to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/intair.php----GETME\" title='intair.php'>intair.php<\/a><\/li>\n<li>making an (&#8220;animated emoji&#8221;) button <font color=blue>dual purpose<\/font> on top of originally being a single purpose button &#8230;<br \/>\n<code><br \/>\n&lt;sub title='Show Nearby Airports' onclick='doair=<font color=blue>how(<\/font>true<font color=blue>,this)<\/font>; twothousand*=2; this.title=this.title.substring(0,4) + String.fromCharCode(105) + String.fromCharCode(110) + String.fromCharCode(103) + <font color=blue>this.title.replace(this.title.split(String.fromCharCode(32))[0] + String.fromCharCode(32), String.fromCharCode(32))<\/font>;' <font color=blue>data-type=9992<\/font> style=cursor:pointer; <font color=blue>id=portsub<\/font>&gt;&amp;#9992;&lt;\/sub&gt;<br \/>\n<\/code><br \/>\n &#8230; working with the intairsuffix global variable that could add a new GET argument where both the &#8220;port&#8221; label in &#038;port=[value] and that [value] can affect behaviour from the intair.php PHP helper tool above &#8230;<br \/>\n<code><br \/>\n<font color=blue>var intairsuffix='', zhra=null, zhrb=null, kklat=0, kklong=0, doair=false, vsll=[-999.0], answered=true;<\/font><br \/>\n<br \/>\n<font color=blue>function how(atr, isub) {<br \/>\n  var curgd=isub.getAttribute('data-type');<br \/>\n  if (('' + curgd) == '9992') { \/\/ airport<br \/>\n    if (intairsuffix != '') {<br \/>\n       intairsuffix='&port=air';<br \/>\n       isub.title='Showing Nearby Airports and Ports';<br \/>\n       document.getElementById('title').value='Nearby Timezone Places and Airports and Ports';<br \/>\n    }<br \/>\n  } else if (('' + curgd) == '128674') { \/\/ port<br \/>\n    if (intairsuffix == '') {<br \/>\n       if (doair) {<br \/>\n       intairsuffix='&port=air';<br \/>\n       isub.title='Showing Nearby Airports and Ports';<br \/>\n       document.getElementById('title').value='Nearby Timezone Places and Airports and Ports';<br \/>\n       } else {<br \/>\n       intairsuffix='&port=y';<br \/>\n       isub.title='Showing Nearby Ports';<br \/>\n       document.getElementById('title').value='Nearby Timezone Places and Ports';<br \/>\n       }<br \/>\n    }<br \/>\n  }<br \/>\n  return true;<br \/>\n}<br \/>\n<br \/>\nfunction feedhow() {<br \/>\n  var isub=document.getElementById('portsub');<br \/>\n  var curgd=isub.getAttribute('data-type');<br \/>\n  if (('' + curgd) == '9992') { \/\/ airport<br \/>\n    isub.innerHTML='&amp;#128674;';<br \/>\n    isub.setAttribute('data-type', '128674');<br \/>\n  } else if (('' + curgd) == '128674') { \/\/ port<br \/>\n    isub.innerHTML='&amp;#9992;';<br \/>\n    isub.setAttribute('data-type', '9992');<br \/>\n  }<br \/>\n}<\/font><br \/>\n<\/code>\n<\/li>\n<li>Ajax asynchronous usage for <font color=blue>second half of a synchronous previous usage<\/font> &#8230;<br \/>\n<code><br \/>\n<font color=blue>var intairsuffix='', zhra=null, zhrb=null, kklat=0, kklong=0, doair=false, vsll=[-999.0], answered=true;<\/font><br \/>\n<br \/>\n <font color=blue>function stateChangedb() {<br \/>\n if (zhrb.readyState == 4) {<br \/>\n  if (zhrb.status == 200) {<br \/>\n       var rectis=document.body.getBoundingClientRect();<br \/>\n       var topllong=-180.0;<br \/>\n       var topllat=90.0;<br \/>\n       var onepixelequals=izoom;<br \/>\n   var bts=zhrb.response.split('.src + ' + String.fromCharCode(39));<br \/>\n   if (eval('' + bts.length) &gt; 1) {<br \/>\n   for (var ijh=1; ijh&lt;bts.length; ijh++) {<br \/>\n   var vs=eval(eval(eval(eval(-topllong + eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[1])) * onepixelequals) + eval(0 * eval(rectis.left))) +<br \/>\n   eval(eval(eval(topllat - eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[0])) * onepixelequals) + eval(0 * eval(rectis.top))));<br \/>\n   if (!inarray(vs,vsll)) {<br \/>\n   vsll.push(vs);<br \/>\n   drawaac(<br \/>\n   eval(eval(eval(-topllong + eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[1])) * onepixelequals) + eval(0 * eval(rectis.left))),<br \/>\n   eval(eval(eval(topllat - eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[0])) * onepixelequals) + eval(0 * eval(rectis.top)))<br \/>\n   );<br \/>\n   }<br \/>\n   }<br \/>\n   }<br \/>\n  }<br \/>\n }<br \/>\n }<\/font><br \/>\n  <br \/>\n function stateChangeda() {<br \/>\n if (zhra.readyState == 4) {<br \/>\n  if (zhra.status == 200) {<br \/>\n       var rectis=document.body.getBoundingClientRect();<br \/>\n       var topllong=-180.0;<br \/>\n       var topllat=90.0;<br \/>\n       var onepixelequals=izoom;<br \/>\n   var bts=zhra.response.split('.src + ' + String.fromCharCode(39));<br \/>\n   if (eval('' + bts.length) &gt; 1) {<br \/>\n   for (var ijh=1; ijh&lt;bts.length; ijh++) {<br \/>\n    var vs=eval(eval(eval(eval(-topllong + eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[1])) * onepixelequals) + eval(0 * eval(rectis.left))) +<br \/>\n   eval(eval(eval(topllat - eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[0])) * onepixelequals) + eval(0 * eval(rectis.top))));<br \/>\n   if (!inarray(vs,vsll)) {<br \/>\n   vsll.push(vs);<br \/>\n   drawaac(<br \/>\n   eval(eval(eval(-topllong + eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[1])) * onepixelequals) + eval(0 * eval(rectis.left))),<br \/>\n   eval(eval(eval(topllat - eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[0])) * onepixelequals) + eval(0 * eval(rectis.top)))<br \/>\n   );<br \/>\n   }<br \/>\n   }<br \/>\n   }<br \/>\n   <font color=blue>if (intairsuffix.indexOf('&port=air') != -1) {<br \/>\n   zhrb = new XMLHttpRequest();<br \/>\n   zhrb.onreadystatechange=stateChangedb;<br \/>\n   zhrb.open('get', '\/HTMLCSS\/intair.php?num=6&lat=' + kklat + '&long=' + kklong + '&port=y', true);<br \/>\n   zhrb.send(null);<br \/>\n   } <\/font><br \/>\n   answered=true;<br \/>\n  }<br \/>\n }<br \/>\n }<br \/>\n  <br \/>\n  function naira(klat, klong) {<br \/>\n   if (answered && doair) {<br \/>\n   answered=false;<br \/>\n   zhra = new XMLHttpRequest();<br \/>\n   zhra.onreadystatechange=stateChangeda;<br \/>\n   console.log('\/HTMLCSS\/intair.php?num=6&lat=' + klat + '&long=' + klong + intairsuffix);<br \/>\n   <font color=blue>if (intairsuffix.indexOf('&port=air') != -1) {<br \/>\n   kklat=klat;<br \/>\n   kklong=klong;<br \/>\n   zhra.open('get', '\/HTMLCSS\/intair.php?num=6&lat=' + klat + '&long=' + klong, true);<br \/>\n   } else {<\/font><br \/>\n   zhra.open('get', '\/HTMLCSS\/intair.php?num=6&lat=' + klat + '&long=' + klong<font color=blue> + intairsuffix<\/font>, true);<br \/>\n   <font color=blue>}<\/font><br \/>\n   zhra.send(null);<br \/>\n   }<br \/>\n  }<br \/>\n<\/code><br \/>\n &#8230; keeps a fast<sub>ish<\/sub> synchronous call (that we enforce via that answered global variable) but truely invokes an asynchronous arrangement extracting Nearby Ports data to plot, as applicable\n<\/li>\n<\/ul>\n<p> &#8230; <font color=blue>in adding<\/font> &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-nearest-airports-tutorial\/'>\n<p>So far, with yesterday&#8217;s <a title='GeoJson World Countries Google Directions Trip Tutorial' href='#gjwcgdtt'>GeoJson World Countries Google Directions Trip Tutorial<\/a>&#8216;s GeoJson World Countries points of interest include &#8230;<\/p>\n<p><\/p>\n<ul>\n<li>the clicked latitude and longitude &#8230; and &#8230;<\/li>\n<li>three nearby TimeZone Places &#8230; and today, we offer the optional &#8230;<\/li>\n<li><font color=blue><strike>four<\/strike>six<\/font> nearest Airports (via the &#9992; ( &amp;#9992; ) emoji button the user clicks)  and for this we need to thank, profusely, <a target=_blank title='The Global Airport Database' href='http:\/\/www.partow.net\/miscellaneous\/airportdatabase\/'>The Global Airport Database<\/a> project by Arash Partow, as with <a target=_blank title='HTML5 Canvas Map Clickaround Follow Up Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/html5-canvas-map-clickaround-follow-up-tutorial'>HTML5 Canvas Map Clickaround Follow Up Tutorial<\/a><\/li>\n<li><font color=blue>six nearest Ports (via the &#128674; ( &amp;#128674; ) emoji button the user clicks)  and for this we need to thank, profusely, <a target=_blank title='HTTP:\/\/geojson.xyz ports' href='https:\/\/d2ad6b4ur7yvpq.cloudfront.net\/naturalearth-3.3.0\/ne_10m_ports.geojson'>HTTP:\/\/geojson.xyz ports<\/a> project, as with <a target=_blank title='Swift Playgrounds on macOS Map Emoji Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/swift-playgrounds-on-macos-map-emoji-tutorial\/'>Swift Playgrounds on macOS Map Emoji Tutorial<\/a><\/font><\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; in <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php----------GETME\" title=\"countries.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php----------GETME\" title=\"countries.php\">countries.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"Click picture\">web application<\/a> you can <a href='#countriesif'>also try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/new-geojson-world-countries-plotted-airports-tutorial\/'>New GeoJson World Countries Plotted Airports Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwcpat'>Previous relevant <a target=_blank title='GeoJson World Countries Plotted Airports Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-plotted-airports-tutorial\/'>GeoJson World Countries Plotted Airports Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries Plotted Airports Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_airports_on_the_fly.jpg\" title=\"GeoJson World Countries Plotted Airports Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Countries Plotted Airports Tutorial<\/p><\/div>\n<p>Introducing the Map Chart recognition of nearby Airports with yesterday&#8217;s <a title='GeoJson World Countries Nearest Airports Tutorial' href='#gjwcnat'>GeoJson World Countries Nearest Airports Tutorial<\/a>&#8216;s progress on our latest GeoJson World Countries PHP web application, it set us to seeing &#8230;<\/p>\n<ul>\n<li>the combination of <a target=_blank href='https:\/\/www.google.com\/search?q=google+directions&#038;rlz=1C5CHFA_enAU973AU973&#038;oq=google+directions&#038;aqs=chrome.0.69i59j0i512l6j69i60.4254j0j4&#038;sourceid=chrome&#038;ie=UTF-8' title='Google Directions'>Google Directions<\/a>&#8216;s talents allowing you to reposition on the fly &#8230; and &#8230;<\/li>\n<li>the onmousemove event, at least for our non-mobile users<\/li>\n<\/ul>\n<p> &#8230; could mean that if we pre-plot airports on the world map, given that the user has clicked the  &#9992; ( &amp;#9992; ) &#8220;Show an Interest in Airports&#8221; emoji button, as a non-mobile user hovers over the world map, this pre-plotting might help trip planners with their travel options, should air travel be part of their interest, in the same way it is an option up at <a target=_blank href='https:\/\/www.google.com\/search?q=google+directions&#038;rlz=1C5CHFA_enAU973AU973&#038;oq=google+directions&#038;aqs=chrome.0.69i59j0i512l6j69i60.4254j0j4&#038;sourceid=chrome&#038;ie=UTF-8' title='Google Directions'>Google Directions<\/a> in <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php---------GETME\" title=\"countries.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php---------GETME\" title=\"countries.php\">countries.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"Click picture\">web application<\/a> you can <a href='#countriesif'>also try below<\/a>.  The overlay scenario <font color=purple>now reads<\/font> &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-svg-overlay-colour-infill-tutorial\/'>\n<ul>\n<li>document.body <font color=purple>(now with the new <i>onmousemove=airportplot(event);<\/i> event logic)<\/font> lowest level &#8230;<\/li>\n<li>overlayed by HTML canvas element plotted with world country linework &#8230; <font color=purple>now including &#8230;<\/font><\/li>\n<li><font color=purple>overlayed by HTML canvas element dedicated to nearest airport plotting &#8230;<\/font><br \/>\n<code><br \/>\n<font color=purple>&lt;canvas id=myacanvas height='180' width='360' style='background-color:transparent;z-index:55;display:inline-block;position:absolute;top:0px;left:0px;'&gt;&lt;\/canvas&gt;<\/font><br \/>\n<\/code>\n<\/li>\n<li>overlayed by HTML img (transparent image) element and its associated image map area elements &#8230; <font color=purple><strike>and today we add into the mix &#8230;<\/strike><\/font><\/li>\n<li>HTML div hosting <a target=_blank title='HTML svg information from w3schools' href='https:\/\/www.w3schools.com\/html\/html5_svg.asp'>SVG<\/a> elements overlay<font color=blue><strike>ing<\/strike> initialized with &#8220;land&#8221; parts green infilled SVG at a mid range z-index<\/font> (<font color=blue><strike>only<\/strike> as well as<\/font> when called upon) individual GeoJson entities overlay<\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; worked by new (sometimes Ajax) Javascript code &#8230;<\/p>\n<p><code><br \/>\n  var zhra=null, elema=null, contexta=null, answered=true, vsll=[-999.0], doair=false; \/\/ clicking &#9992; sets doair=true;<br \/>\n  <br \/>\n  function drawaac(centerX, centerY) {<br \/>\n    contexta.beginPath();<br \/>\n    contexta.globalAlpha = 0.9;<br \/>\n    if (1 == 1) {<br \/>\n    contexta.fillStyle = 'black';<br \/>\n    contexta.fillRect(centerX \/ izoom, centerY \/ izoom,1,1);<br \/>\n    contexta.fill();<br \/>\n    } else {<br \/>\n    contexta.arc(centerX \/ izoom, centerY \/ izoom, 1, 0, 2 * Math.PI, false);<br \/>\n    contexta.fillStyle = 'black';<br \/>\n    contexta.fill();<br \/>\n    contexta.lineWidth = 5;<br \/>\n    contexta.lineWidth = 0.00001;<br \/>\n    contexta.strokeStyle = '#003300';<br \/>\n    contexta.stroke();<br \/>\n    }<br \/>\n    return true;<br \/>\n  }<br \/>\n  <br \/>\n function inarray(needle, haystack) { \/\/ thanks to https:\/\/stackoverflow.com\/questions\/784012\/javascript-equivalent-of-phps-in-array<br \/>\n    var length = haystack.length;<br \/>\n    for (var i = 0; i &lt; length; i++) {<br \/>\n        if (haystack[i] == needle) return true;<br \/>\n    }<br \/>\n    return false;<br \/>\n }<br \/>\n<br \/>\n function stateChangeda() {<br \/>\n if (zhra.readyState == 4) {<br \/>\n  if (zhra.status == 200) {<br \/>\n       var rectis=document.body.getBoundingClientRect();<br \/>\n       var topllong=-180.0;<br \/>\n       var topllat=90.0;<br \/>\n       var onepixelequals=izoom;<br \/>\n   var bts=zhra.response.split('.src + ' + String.fromCharCode(39));<br \/>\n   if (eval('' + bts.length) &gt; 1) {<br \/>\n   for (var ijh=1; ijh&lt;bts.length; ijh++) {<br \/>\n   var vs=eval(eval(eval(eval(-topllong + eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[1])) * onepixelequals) + eval(0 * eval(rectis.left))) +<br \/>\n   eval(eval(eval(topllat - eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[0])) * onepixelequals) + eval(0 * eval(rectis.top))));<br \/>\n   if (!inarray(vs,vsll)) {<br \/>\n   vsll.push(vs);<br \/>\n   drawaac(<br \/>\n   eval(eval(eval(-topllong + eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[1])) * onepixelequals) + eval(0 * eval(rectis.left))),<br \/>\n   eval(eval(eval(topllat - eval(bts[ijh].split(String.fromCharCode(39))[0].split('[')[1].split(',')[0])) * onepixelequals) + eval(0 * eval(rectis.top)))<br \/>\n   );<br \/>\n   }<br \/>\n   }<br \/>\n   }<br \/>\n   answered=true;<br \/>\n  }<br \/>\n }<br \/>\n }<br \/>\n<br \/>\n  function naira(klat, klong) {<br \/>\n   if (answered && doair) {<br \/>\n   answered=false;<br \/>\n   zhra = new XMLHttpRequest();<br \/>\n   zhra.onreadystatechange=stateChangeda;<br \/>\n   zhra.open('get', '\/HTMLCSS\/intair.php?num=6&lat=' + klat + '&long=' + klong, true);<br \/>\n   zhra.send(null);<br \/>\n   }<br \/>\n  }<br \/>\n  <br \/>\n  function airportplot(e) {<br \/>\n    if (answered) {<br \/>\n       var rectis=null; \/\/document.body.getBoundingClientRect();<br \/>\n       var blat=0, blong=0;<br \/>\n       var topllong=-180.0;<br \/>\n       var topllat=90.0;<br \/>\n       onepixelequals=eval(0.0 + eval(1.0 * izoom));<br \/>\n       e = e || window.event;<br \/>\n       e.preventDefault();<br \/>\n       if (e.touches) {<br \/>\n       if (e.touches[0].pageX) {<br \/>\n   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; }<br \/>\n       } else {<br \/>\n   rectis=document.body.getBoundingClientRect();<br \/>\n   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; }<br \/>\n       }<br \/>\n       } else if (e.pageX || e.pageY) {<br \/>\n   blat=eval(eval(eval(topllat * onepixelequals - eval(-rectistop + e.pageY) * 1)) \/ onepixelequals);<br \/>\n   blong=eval(eval(eval(topllong * onepixelequals + eval(-rectisleft + e.pageX) * 1)) \/ onepixelequals);<br \/>\n   if ((blat &gt;= -90.0 && blat &lt;= 90.0) && (blong &gt;= -180.0 && blong &lt;= 180.0)) {<br \/>\n   naira(blat, blong); \/\/if (drawac(eval(-rectisleft + e.pageX), eval(-rectistop + e.pageY))) { e = e; }<br \/>\n   }<br \/>\n       } else {<br \/>\n   rectis=document.body.getBoundingClientRect();<br \/>\n   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; }<br \/>\n       }<br \/>\n    }<br \/>\n  }<br \/>\n<br \/>\n\/\/ ... and extended document.body onload event logic has added, up near its top ...<br \/>\n    elema = document.getElementById('myacanvas');<br \/>\n    contexta = elema.getContext('2d');<br \/>\n<\/code><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-plotted-airports-tutorial\/'>GeoJson World Countries Plotted Airports Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwcnat'>Previous relevant <a target=_blank title='GeoJson World Countries Nearest Airports Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-nearest-airports-tutorial\/'>GeoJson World Countries Nearest Airports Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries Nearest Airports Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_airports.jpg\" title=\"GeoJson World Countries Nearest Airports Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Countries Nearest Airports Tutorial<\/p><\/div>\n<p>So far, with yesterday&#8217;s <a title='GeoJson World Countries Google Directions Trip Tutorial' href='#gjwcgdtt'>GeoJson World Countries Google Directions Trip Tutorial<\/a>&#8216;s GeoJson World Countries points of interest include &#8230;<\/p>\n<ul>\n<li>the clicked latitude and longitude &#8230; and &#8230;<\/li>\n<li>three nearby TimeZone Places &#8230; and today, we offer the optional &#8230;<\/li>\n<li>four nearest Airports (via the &#9992; ( &amp;#9992; ) emoji button the user clicks)  and for this we need to thank, profusely, <a target=_blank title='The Global Airport Database' href='http:\/\/www.partow.net\/miscellaneous\/airportdatabase\/'>The Global Airport Database<\/a> project by Arash Partow, as with <a target=_blank title='HTML5 Canvas Map Clickaround Follow Up Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/html5-canvas-map-clickaround-follow-up-tutorial'>HTML5 Canvas Map Clickaround Follow Up Tutorial<\/a><\/li>\n<\/ul>\n<p> &#8230; being as we&#8217;re into <font color=blue>trip planning now<\/font>!<\/p>\n<p><code><br \/>\n <font color=blue>var airportstuff='', doair=false, zhr=null;<br \/>\n<br \/>\n function stateChanged() {<br \/>\n if (zhr.readyState == 4) {<br \/>\n  if (zhr.status == 200) {<br \/>\n   var bts=zhr.response.split('.src + ' + String.fromCharCode(39));<br \/>\n   if (eval('' + bts.length) > 1) {<br \/>\n   for (var ijh=1; ijh<bts.length; ijh++) {\n   airportstuff+=bts[ijh].split(String.fromCharCode(39))[0]; \/\/zhr.response;\n   }\n   }\n   \/\/alert(airportstuff + ' ?');\n  }\n }\n }\n <br \/>\n function windowopen(p1, p2, p3) {<br \/>\n       if (p1.length &gt; 800) {<br \/>\n          document.getElementById('iddata').value=(p1.split('&data=')[1].split('&')[0].split('#')[0]).replace(\/\\&20\\;\/g,' ');<br \/>\n          document.getElementById('smapif').click();<br \/>\n          return null;<br \/>\n        }<br \/>\n        return window.open(p1, p2, p3);<br \/>\n }<br \/>\n <br \/>\n function apm(mu) {<br \/>\n   if (airportstuff != '' && doair) {<br \/>\n      return (mu + airportstuff).replace('&', encodeURIComponent(' and Airports') + '&');<br \/>\n   }<br \/>\n   return mu;<br \/>\n }<br \/>\n <br \/>\n  function nair(klat, klong) {<br \/>\n   airportstuff='';<br \/>\n   zhr = new XMLHttpRequest();<br \/>\n   zhr.onreadystatechange=stateChanged;<br \/>\n   zhr.open('get', '\/HTMLCSS\/intair.php?num=4&lat=' + klat + '&long=' + klong, true);<br \/>\n   zhr.send(null);<br \/>\n  }<\/font><br \/>\n  <br \/>\n  function alats(inlat) {<br \/>\n   if (inlat == 0 && lastlats.length == 0) { inlat=inlat; } else  { lastlats.push(inlat); }<br \/>\n   return inlat;<br \/>\n  }<br \/>\n  <br \/>\n  function alongs(inlong) {<br \/>\n   if (inlong == 0 && lastlongs.length == 0) { inlong=inlong; } else  { lastlongs.push(inlong); }<br \/>\n   <font color=blue>setTimeout(prenair, 200); \/\/nair(thislat, inlong);<\/font><br \/>\n   return inlong;<br \/>\n  }<br \/>\n  <br \/>\n  <font color=blue>function prenair() {<br \/>\n   nair(thislat, thislong);<br \/>\n  }<\/font><br \/>\n<\/code><\/p>\n<p> &#8230; featuring Ajax Javascript code.<\/p>\n<p>Try this out with <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php--------GETME\" title=\"countries.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php--------GETME\" title=\"countries.php\">countries.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"Click picture\">web application<\/a> you can <a href='#countriesif'>also try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-nearest-airports-tutorial\/'>GeoJson World Countries Nearest Airports Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwcgdtt'>Previous relevant <a target=_blank title='GeoJson World Countries Google Directions Trip Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-google-directions-trip-tutorial\/'>GeoJson World Countries Google Directions Trip Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries Google Directions Trip Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_directions.jpg\" title=\"GeoJson World Countries Google Directions Trip Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Countries Google Directions Trip Tutorial<\/p><\/div>\n<p>Adding to the &#8220;zoom&#8221; progress of yesterday&#8217;s <a title='GeoJson World Countries Zoom Tutorial' href='#gjwczt'>GeoJson World Countries Zoom Tutorial<\/a>, today, we wanted to &#8230;<\/p>\n<ul>\n<li>add interfacing functionality to the excellent <a target=_blank href='https:\/\/www.google.com\/search?q=google+directions&#038;rlz=1C5CHFA_enAU973AU973&#038;oq=google+directions&#038;aqs=chrome.0.69i59j0i512l6j69i60.4254j0j4&#038;sourceid=chrome&#038;ie=UTF-8' title='Google Directions'>Google Directions<\/a> part of <a target=_blank title='Google Maps' href='https:\/\/maps.google.com'>Google Maps<\/a>, perhaps to help with Trip planning, or even just to associate a Placename with a latitude and longitude as clicked by the user, via the very simple URL arrangement &#8230;<br \/>\n<code>https:\/\/www.google.com\/maps\/dir\/[decimalLatitudeDegrees]\/[decimalLongitudeDegrees]<\/code><br \/>\n &#8230; helped out by new Javascript functions &#8230;<br \/>\n<code><br \/>\n  var lastlats=[], lastlongs=[], lastlat=-99.0, lastlong=-99.0, thislat=0.0, thislong=0.0;<br \/>\n<br \/>\n  function preface(inblurb) {<br \/>\n    var extras='';<br \/>\n    var outblurb=inblurb;<br \/>\n    if (Math.abs(eval('' + lastlat)) > 0.0 || Math.abs(eval('' + lastlong)) > 0.0) {<br \/>\n     if (Math.abs(eval('' + lastlat)) <= 90.0 &#038;&#038; Math.abs(eval('' + lastlong)) <= 180.0) {\n      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. ';\n     }\n    }\n    return extras + outblurb;\n  }\n  <br \/>\n  function alats(inlat) {<br \/>\n   if (inlat == 0 && lastlats.length == 0) { inlat=inlat; } else  { lastlats.push(inlat); }<br \/>\n   return inlat;<br \/>\n  }<br \/>\n  <br \/>\n  function alongs(inlong) {<br \/>\n   if (inlong == 0 && lastlongs.length == 0) { inlong=inlong; } else  { lastlongs.push(inlong); }<br \/>\n   return inlong;<br \/>\n  }<br \/>\n<\/code><br \/>\n &#8230; and &#8230;<\/li>\n<li>add some hashtag navigation (fairly self explanatory emoji button <a href='#myimg' title='Back to top'  id=abt>&#11014;<\/a> <a href='#mapchart' title='Down to Google Charts' id=abb>&#11015;<\/a> <a onclick='var scleft=0; var sctop=0; sctop=document.documentElement.scrollTop || document.body.scrollTop;  scleft=document.documentElement.scrollLeft || document.body.scrollLeft; window.scrollTo(scleft,sctop);' title='Back to last positioning' id=abd>&#8599;<\/a>) ideas now that our GeoJson world map can be zoomed in on<\/li>\n<\/ul>\n<p> &#8230; in <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php-------GETME\" title=\"countries.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php-------GETME\" title=\"countries.php\">countries.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"Click picture\">web application<\/a> you can <a href='#countriesif'>also try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-google-directions-trip-tutorial\/'>GeoJson World Countries Google Directions Trip Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwczt'>Previous relevant <a target=_blank title='GeoJson World Countries Zoom Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-zoom-tutorial\/'>GeoJson World Countries Zoom Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries Zoom Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_zoom.jpg\" title=\"GeoJson World Countries Zoom Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Countries Zoom Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='GeoJson World Countries TimeZone Times Tutorial' href='#gjwctztt'>GeoJson World Countries TimeZone Times Tutorial<\/a> GeoJson World Countries web application&#8217;s capabilities we want to add zooming, that doesn&#8217;t rely on web browser functionality (which continues to work).  With that in mind we create a new emoji ( &amp;#128270; ) &#128270; link, with this onclick event code &#8230;<\/p>\n<p><code><br \/>\nvar jzoom=1.0, izoom=location.search.split('zoom=')[1] ? eval(decodeURIComponent(location.search.split('zoom=')[1].split('&')[0])) : 1.0;<br \/>\n<br \/>\nfunction zoomin() {<br \/>\n   if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n     jzoom*=2;<br \/>\n     document.getElementById('myviewport').setAttribute('content', 'width=device-width, initial-scale=' + eval(jzoom * izoom) + ', minimum-scale=0.1, maximum-scale=8, user-scalable=yes');<br \/>\n     window.scrollTo(0,0);<br \/>\n   } else {<br \/>\n     document.body.style.zoom=('' + eval(izoom * 200.0) + '%');<br \/>\n     izoom*=2;<br \/>\n   }<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; to multiply the webpage zoom factor in a programmatical way.  To acheive this, we have a two way approach (as you might have surmised from above) &#8230;<\/p>\n<ul>\n<li>for mobile, the logic is easier by introducing a new meta name=viewport &#8230;<br \/>\n<code><br \/>\n&lt;meta id=\"myviewport\" name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes\"  &gt;<br \/>\n<\/code><br \/>\n &#8230; tag &#8230; while &#8230;<\/li>\n<li>for non-mobile  we needed to realize that <i>event.pageX<\/i> and <i>event.pageY<\/i> co-ordinates grow in proportion to the zoom factor, and that better latitude and longitude determining lines of code <font color=blue>would go<\/font> &#8230;<br \/>\n<code><br \/>\n  function canvasclick(e) {<br \/>\n       var rectis=document.body.getBoundingClientRect();<br \/>\n       var topllong=-180.0;<br \/>\n       var topllat=90.0;<br \/>\n       onepixelequals=eval(0.0 + eval(1.0 * izoom));<br \/>\n       \/\/document.title='canvasclick';<br \/>\n       e = e || window.event;<br \/>\n       e.preventDefault();<br \/>\n       if (e.touches) {<br \/>\n       if (e.touches[0].pageX) {<br \/>\n         \/\/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);<br \/>\n   if (drawc(eval(-rectisleft + e.touches[0].pageX), eval(-rectistop + e.touches[0].pageY))) {<br \/>\n   thislat=eval(topllat - eval(-rectistop + e.touches[0].pageY) * onepixelequals);<br \/>\n   thislong=eval(topllong + eval(-rectisleft + e.touches[0].pageX) * onepixelequals);<br \/>\n       \/\/console.log('rectistop=' + rectistop + ' and rectisleft=' + rectisleft + ' and rectisy=' + rectisy + ' and thislat=' + thislat);<br \/>\n   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';<br \/>\n   }<br \/>\n       } else {<br \/>\n<br \/>\n         \/\/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);<br \/>\n   if (drawc(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY))) {<br \/>\n   thislat=eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals);<br \/>\n   thislong=eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals);<br \/>\n       \/\/console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' anD thislat=' + thislat);<br \/>\n   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';<br \/>\n   }<br \/>\n       }<br \/>\n       } else if (e.pageX || e.pageY) {<br \/>\n          \/\/lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals);<br \/>\n          \/\/alert('02: ' + e.screenX + ' ' + e.pageX + ' ' + e.screenY + ' ' + e.pageY + ' ' + thislong + ' ' + thislat);<br \/>\n   if (drawc(eval(-rectisleft + e.pageX), eval(-rectistop + e.pageY))) {<br \/>\n   <font color=blue>\/\/<\/font>thislat=eval(topllat - eval(-rectistop + e.pageY) * onepixelequals);<br \/>\n   <font color=blue>\/\/<\/font>thislong=eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals);<br \/>\n   <font color=blue>thislat=eval(eval(eval(topllat * onepixelequals - eval(-rectistop + e.pageY) * 1)) \/ onepixelequals);<br \/>\n   thislong=eval(eval(eval(topllong * onepixelequals + eval(-rectisleft + e.pageX) * 1)) \/ onepixelequals);<\/font><br \/>\n          \/\/alert('22: ' + e.screenX + ' ' + e.pageX + ' ' + e.screenY + ' ' + e.pageY + ' ' + thislong + ' ' + thislat);<br \/>\n       \/\/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));<br \/>\n   <font color=blue>\/\/<\/font>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';<br \/>\n   <font color=blue>document.getElementById('nearestif').src='\/PHP\/tz_places.php?place=&latitude=' + encodeURIComponent('' + thislat) + '&longitude=' + encodeURIComponent('' + thislong) + '&ntztontz=y'; <\/font><br \/>\n   }<br \/>\n       } else {<br \/>\n         \/\/lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals);<br \/>\n   if (drawc(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY))) {<br \/>\n   thislat=eval(topllat - eval(-rectis.top + e.clientY) * onepixelequals);<br \/>\n   thislong=eval(topllong + eval(-rectis.left + e.clientX) * onepixelequals);<br \/>\n       \/\/console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' And thislat=' + thislat);<br \/>\n   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';<br \/>\n   }<br \/>\n       }<br \/>\n  }<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p> &#8230; in <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php------GETME\" title=\"countries.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php------GETME\" title=\"countries.php\">countries.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"Click picture\">web application<\/a> you can <a href='#countriesif'>also try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-zoom-tutorial\/'>GeoJson World Countries Zoom Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwctztt'>Previous relevant <a target=_blank title='GeoJson World Countries TimeZone Times Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-timezone-times-tutorial\/'>GeoJson World Countries TimeZone Times Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries TimeZone Times Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_clocks.jpg\" title=\"GeoJson World Countries TimeZone Times Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Countries TimeZone Times Tutorial<\/p><\/div>\n<p>Some readers might be aware of our &#8220;theory regarding adverbs&#8221; and &#8220;web applications&#8221; on the net &#8230;<\/p>\n<ul>\n<li>the most catered for adverb relates to the &#8220;where of life&#8221; &#8230; and the second banana is &#8230;<\/li>\n<li>the &#8220;when of life&#8221;<\/li>\n<\/ul>\n<p> &#8230; and, further to  yesterday&#8217;s <a title='GeoJson World Countries SVG Overlay Safari Error Tutorial' href='#gjwcsvgoset'>GeoJson World Countries SVG Overlay Safari Error Tutorial<\/a>&#8216;s emphasis on the &#8220;where of life&#8221;, today we add in a bit of the &#8220;when of life&#8221;, something right down the line of the remit of TimeZone talents.<\/p>\n<p>Seriously though, a lot of us dream of the rest of the world on a world map, and wonder what time it is in other parts of the world.  Phone call to relatives?  A reminder SMS call?  Email a game collaboration?  It could all be part of life&#8217;s rich tapestry!<\/p>\n<p>The expresion of this, for us, today, improving the communications with our current GeoJsom World Countries web application, take the form of emoji clocks from the 12 hour clock example forms such as &#8230;<\/p>\n<ul>\n<li>1  o&#8217;clock is &amp;#128336; &#128336;<\/li>\n<li>2  o&#8217;clock is &amp;#128337; &#128337;<\/li>\n<li>12 o&#8217;clock is &amp;#128347; &#128347;<\/li>\n<li>2:30 is &amp;#128349; &#128349;<\/li>\n<li>11:30 is &amp;#128358; &#128358;<\/li>\n<li>12:30 is &amp;#128359; &#128359;<\/li>\n<\/ul>\n<p> &#8230; to show in &#8220;prompt&#8221; and &#8220;confirm&#8221; popup windows, as well as Map Chart maps &#8230; via new Javascript functions &#8230;<\/p>\n<p><code><br \/>\n  function clockit(hoursoffgmt) {<br \/>\n\/\/ 1  o'clock is &#128336;<br \/>\n\/\/ 2  o'clock is &#128337;<br \/>\n\/\/ 12 o'clock is &#128347;<br \/>\n\/\/  2:30 is &#128349;<br \/>\n\/\/ 11:30 is &#128358;<br \/>\n\/\/ 12:30 is &#128359;<br \/>\n    var along='Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday';<br \/>\n    var gmtdatetimeis='' + new Date().toUTCString();<br \/>\n    var daybit='';<br \/>\n    var ampm=' am';<br \/>\n    if (gmtdatetimeis.indexOf('day') != -1) {<br \/>\n      ampm+=', ' + gmtdatetimeis.split('day')[0].split(' ')[eval(-1 + gmtdatetimeis.split('day')[0].split(' ').length)] + 'day';<br \/>\n    } else if (gmtdatetimeis.indexOf(',') != -1) {<br \/>\n      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');<br \/>\n    }<br \/>\n    if (ampm.length &gt; 3) { daybit=ampm.substring(5); }<br \/>\n    var minis=eval('' + gmtdatetimeis.split(':')[1]);<br \/>\n    var hris=eval(('' + gmtdatetimeis.split(':')[0]).split(' ')[eval(-1 + ('' + gmtdatetimeis.split(':')[0]).split(' ').length)]);<br \/>\n    if (('' + hoursoffgmt).indexOf('-') != -1 && eval(eval('' + hoursoffgmt.replace('+','')) + hris) &lt; 0.0) {<br \/>\n      ampm=ampm.replace('am', 'pm');<br \/>\n      if (daybit != '') { ampm=ampm.replace(daybit, along.split(',' + daybit)[0].split(',')[eval(-1 + along.split(',' + daybit)[0].split(',').length)]); }<br \/>\n    } else if (('' + hoursoffgmt).indexOf('-') == -1 && eval(eval('' + hoursoffgmt.replace('+','')) + hris) &gt;= 24) {<br \/>\n      if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); }<br \/>\n    } else if (('' + hoursoffgmt).indexOf('-') == -1 && eval(eval('' + hoursoffgmt.replace('+','')) + hris) &gt;= 12) {<br \/>\n      ampm=ampm.replace('am', 'pm');<br \/>\n    }<br \/>\n    hris+=eval(eval(24 + eval('' + hoursoffgmt.replace('+','').split('.')[0])) % 24);<br \/>\n    if (('' + hoursoffgmt.replace('+','')).indexOf('.5') != -1) {<br \/>\n      if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1 && minis &gt;= 30) {<br \/>\n        minis-=30;<br \/>\n      } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {<br \/>\n        hris--;<br \/>\n        if (hris &lt; 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)]); } }<br \/>\n        minis+=30;<br \/>\n      } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') == -1 && minis &lt; 30) {<br \/>\n        minis+=30;<br \/>\n      } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {<br \/>\n        hris++;<br \/>\n        if (hris &gt; 24) { hris=24; ampm=ampm.replace('pm', 'am'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } }<br \/>\n        minis-=30;<br \/>\n      }<br \/>\n    } else if (('' + hoursoffgmt.replace('+','')).indexOf('.25') != -1) {<br \/>\n      if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1 && minis &gt;= 15) {<br \/>\n        minis-=15;<br \/>\n      } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {<br \/>\n        hris--;<br \/>\n        if (hris &lt; 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)]); } }<br \/>\n        minis+=15;<br \/>\n      } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') == -1 && minis &lt; 45) {<br \/>\n        minis+=15;<br \/>\n      } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {<br \/>\n        hris++;<br \/>\n        if (hris &gt; 24) { hris=24; ampm=ampm.replace('pm', 'am'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } }<br \/>\n        minis-=15;<br \/>\n      }<br \/>\n    } else if (('' + hoursoffgmt.replace('+','')).indexOf('.75') != -1) {<br \/>\n      if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1 && minis &gt;= 45) {<br \/>\n        minis-=45;<br \/>\n      } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {<br \/>\n        hris--;<br \/>\n        if (hris &lt; 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)]); } }<br \/>\n        minis+=45;<br \/>\n      } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') == -1 && minis &lt; 15) {<br \/>\n        minis+=45;<br \/>\n      } else if (('' + hoursoffgmt.replace('+','')).indexOf('-') != -1) {<br \/>\n        hris++;<br \/>\n        if (hris &gt; 24) { hris=24; ampm=ampm.replace('pm', 'am'); if (daybit != '') { ampm=ampm.replace(daybit, along.split(daybit + ',')[1].split(',')[0]); } }<br \/>\n        minis-=45;<br \/>\n      }<br \/>\n    }<br \/>\n    \/\/alert('' + hoursoffgmt + ' ' + hris + ' ' + minis + ' ' + gmtdatetimeis);<br \/>\n  <br \/> <br \/>\n    if (minis &gt; 45 && eval(hris % 12) == 0) {<br \/>\n      return ' ' + String.fromCodePoint(128336) + ampm;<br \/>\n    } else if (eval(hris % 12) == 0 && minis &lt;= 15) {<br \/>\n      return ' ' + String.fromCodePoint(128347) + ampm;<br \/>\n    } else if (eval(hris % 12) == 0) {<br \/>\n      return ' ' + String.fromCodePoint(128359) + ampm;<br \/>\n    } else if (minis &gt;= 45) {<br \/>\n      return ' ' + String.fromCodePoint(eval(eval(hris % 12) + 128336)) + ampm;<br \/>\n    } else if (minis &lt;= 15) {<br \/>\n      return ' ' + String.fromCodePoint(eval(eval(hris % 12) + 128335)) + ampm;<br \/>\n    } else {<br \/>\n      return ' ' + String.fromCodePoint(eval(eval(hris % 12) + 128347)) + ampm;<br \/>\n    }<br \/>\n    return '';<br \/>\n  }<br \/>\n  <br \/>\n  function emfilter(inih) {<br \/>\n     var bcxs=inih.split(' &#');<br \/>\n     var bitis='', ib=0;<br \/>\n     var outih=inih;<br \/>\n     for (ib=1; ib&lt;bcxs.length; ib++) {<br \/>\n       bitis=' &#' + bcxs[ib].split(' ')[0];<br \/>\n       outih=outih.replace(bitis, ' ' + eval('String.fromCodePoint(' + bitis.substring(3).replace(\/\\;\\&\\#\/g,',').replace(\/\\;\/g,'') + ')'));<br \/>\n     }<br \/>\n     bcxs=outih.split('(');<br \/>\n     for (ib=1; ib&lt;bcxs.length; ib++) {<br \/>\n       if (bcxs[ib].split(')')[0].indexOf(',') == -1 && bcxs[ib].split(')')[0].indexOf(' ') == -1 && (bcxs[ib].substring(0,1) == '-' || bcxs[ib].substring(0,1) == '+' || (bcxs[ib].substring(0,1) &gt;= '0' && bcxs[ib].substring(0,1) &lt;= '9'))) {<br \/>\n           outih=outih.replace('(' + bcxs[ib].split(')')[0] + ')', '(' + bcxs[ib].split(')')[0] + clockit(bcxs[ib].split(')')[0]) + ')');<br \/>\n       }<br \/>\n     }<br \/>\n     return outih;<br \/>\n  }<br \/>\n<\/code><\/p>\n<p>Also, in these same places we add in Time Place country ISO-2 character code based emoji flags, adding to information and colour pizazz in the informational parts to the workings of <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php-----GETME\" title=\"countries.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php-----GETME\" title=\"countries.php\">countries.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"Click picture\">web application<\/a> you can <a href='#countriesif'>also try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-timezone-times-tutorial\/'>GeoJson World Countries TimeZone Times Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwcsvgoset'>Previous relevant <a target=_blank title='GeoJson World Countries SVG Overlay Safari Error Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-svg-overlay-safari-error-tutorial\/'>GeoJson World Countries SVG Overlay Safari Error Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries SVG Overlay Safari Error Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_lime.jpg\" title=\"GeoJson World Countries SVG Overlay Safari Error Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Countries SVG Overlay Safari Error Tutorial<\/p><\/div>\n<p>Mostly on smaller devices (such as an iPhone), but elsewhere as well, but less drastically, this morning, using <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\">our current Display GeoJson Countries web application<\/a> we would get the Safari web browser error &#8230;<\/p>\n<blockquote><p>\nA problem repeatedly occurred with https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\n<\/p><\/blockquote>\n<p> &#8230; with web application work up to yesterday&#8217;s <a title='GeoJson World Countries SVG Overlay Colour Infill Tutorial' href='#gjwcsvgocit'>GeoJson World Countries SVG Overlay Colour Infill Tutorial<\/a>.<\/p>\n<p>On discovering our first solution theory of turning yesterday&#8217;s mapsvg.js external Javascript work into an <a target=_blank title='Javascript async information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Statements\/async_function'><i>async<\/i><\/a> piece of work made no difference to this situation, we surmised that the huge amount of content held in the Javascript (ie. client side) global variable <i>appendtoinnerHTML<\/i> was causing memory issues.  We couldn&#8217;t shift much to do with the overall amount of &#8220;data&#8221; needing to be handled, in order to implement country SVG colour infilling, but we could shift the data from being &#8230;<\/p>\n<ul>\n<li>client side (external) Javascript held &#8230; to, instead, (have that data) be (determined on the) &#8230;<\/li>\n<li>server side PHP filling in the contents of our (relevant) HTML div id=svgd ahead of the document.body onload event timing &#8230;<br \/>\n&lt;?php<br \/>\n<code><br \/>\n$icnt=0;<br \/>\n<br \/>\nfunction apptohtmstuff($coordsare, $origc) {<br \/>\n  global $icnt;<br \/>\n  $minl=-1;<br \/>\n  $mint=-1;<br \/>\n  $maxl=-1;<br \/>\n  $maxt=-1;<br \/>\n  $zysare=explode(',', $coordsare);<br \/>\n  $svgcis='';<br \/>\n  for ($ij=0; $ij&lt;sizeof($zysare); $ij+=2) {<br \/>\n    if ($minl &lt; 0) {<br \/>\n      $minl=$zysare[$ij];<br \/>\n      $maxl=$zysare[$ij];<br \/>\n      $mint=$zysare[1 + $ij];<br \/>\n      $maxt=$zysare[1 + $ij];<br \/>\n    } else {<br \/>\n      if ($zysare[$ij] &lt; $minl) { $minl=$zysare[$ij];  }<br \/>\n      if ($zysare[$ij] &gt; $maxl) { $maxl=$zysare[$ij];  }<br \/>\n      if ($zysare[1 + $ij] &lt; $mint) { $mint=$zysare[1 + $ij];  }<br \/>\n      if ($zysare[1 + $ij] &gt; $maxt) { $maxt=$zysare[1 + $ij];  }<br \/>\n    }<br \/>\n  }<br \/>\n  <br \/>\n  for ($ij=0; $ij&lt;sizeof($zysare); $ij+=2) {<br \/>\n    if ($svgcis == '') {<br \/>\n      $svgcis='' . ($zysare[$ij] - $minl) . ',' . ($zysare[1 + $ij] - $mint);<br \/>\n    } else {<br \/>\n      $svgcis.=' ' . ($zysare[$ij] - $minl) . ',' . ($zysare[1 + $ij] - $mint);<br \/>\n    }<br \/>\n  }<br \/>\n  <br \/>\n  $icnt++;<br \/>\n  return '&lt;div title=\"' . $coordsare . '\" id=\"dsa' . (-1 + $icnt) . '\" style=\"position:absolute;left:' . $minl . 'px;top:' . $mint . 'px;width:' . ($maxl - $minl) . 'px;height:' . ($maxt - $mint) . ';display:BLOCK;z-index:24;\"&gt;&lt;svg height=\"100%\" width=\"100%\"&gt;&lt;polygon points=\"' . $svgcis . '\" style=\"fill:lime;stroke:purple;stroke-width:1\"&gt;&lt;\/polygon&gt;&lt;\/svg&gt;&lt;\/div&gt;';<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<br \/>\n &#8230; meaning the web application&#8217;s underlying HTML size increased at the expense of no need for external Javascript involvement any more<\/li>\n<\/ul>\n<p> &#8230;  in <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php----GETME\" title=\"countries.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php----GETME\" title=\"countries.php\">countries.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"Click picture\">web application<\/a> you can <a href='#countriesif'>also try below<\/a>.<\/p>\n<p>We&#8217;re not exactly sure why, but &#8230;<\/p>\n<ul>\n<li>this improved web application stability &#8230;<br \/>\n<img src='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_iphone.jpg'><\/img><br \/>\n &#8230;everywhere &#8230; and an idea we&#8217;d ditched yesterday of &#8230;<\/li>\n<li>idea to pre-colour &#8220;land&#8221; parts of the world GeoJson map green (ahead of the document.body onload event) also came good (after causing problems yesterday)<\/li>\n<\/ul>\n<p> &#8230; meaning now, &#8220;overlay&#8221; wise, <font color=blue>we could say<\/font> &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-svg-overlay-colour-infill-tutorial\/'>\n<ul>\n<li>document.body lowest level &#8230;<\/li>\n<li>overlayed by HTML canvas element plotted with world country linework &#8230;<\/li>\n<li>overlayed by HTML img (transparent image) element and its associated image map area elements &#8230; and today we add into the mix &#8230;<\/li>\n<li>HTML div hosting <a target=_blank title='HTML svg information from w3schools' href='https:\/\/www.w3schools.com\/html\/html5_svg.asp'>SVG<\/a> elements overlay<font color=blue><strike>ing<\/strike> initialized with &#8220;land&#8221; parts green infilled SVG at a mid range z-index<\/font> (<font color=blue><strike>only<\/strike> as well as<\/font> when called upon) individual GeoJson entities overlay<\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; and we (reckon we&#8217;ve) improved the colour coding user experience at the same time.<\/p>\n<p>We noticed that tweaks in the changed &#8230;<\/p>\n<p><code><br \/>\nvar lastflagged='', appendtoinnerHTML='', waitplease=false; \/\/ used to make sure \"area\" element onclick code precedes any document.body onmousedown or ontouchdown code<br \/>\n<br \/>\nfunction checkdsa(ath) {<br \/>\n  waitplease=true;<br \/>\n  var wasih='';<br \/>\n  var athcoords=('' + ath.coords); \/\/.substring(0, Math.floor(eval(0.1 * ('' + ath.coords).length)));<br \/>\n  if (document.getElementById('svgd').innerHTML.indexOf(('' + athcoords)) != -1) {<br \/>\n    wasih='&lt;div title=' + String.fromCharCode(34) + '' + ath.coords + document.getElementById('svgd').innerHTML.split(ath.coords)[1].split('&lt;div ')[0];<br \/>\n    if (lastflagged == '') {<br \/>\n    if (wasih.indexOf(' id=' + String.fromCharCode(34)) != -1) { lastflagged=wasih.split(' id=' + String.fromCharCode(34))[1].split(String.fromCharCode(34))[0]; } else { lastflagged=''; }<br \/>\n    } else {<br \/>\n    document.getElementById(lastflagged).innerHTML=document.getElementById(lastflagged).innerHTML.replace(\/rgba\\(255\\,87\\,51\\,0.5\\)\/g, 'rgba(200,200,200,0.3)');<br \/>\n    if (wasih.indexOf(' id=' + String.fromCharCode(34)) != -1) { lastflagged=wasih.split(' id=' + String.fromCharCode(34))[1].split(String.fromCharCode(34))[0]; } else { lastflagged=''; }<br \/>\n    }<br \/>\n    if (lastflagged != '') {<br \/>\n    document.getElementById(lastflagged).innerHTML=document.getElementById(lastflagged).innerHTML.replace('z-index:24;', 'z-index:123;').replace('lime;', 'rgba(255,87,51,0.5);');<br \/>\n    document.getElementById(lastflagged).title=ath.title;<br \/>\n    } else {<br \/>\n    document.getElementById('svgd').innerHTML=document.getElementById('svgd').innerHTML.replace(wasih, '&lt;div title=' + String.fromCharCode(34) + '' + ath.title + wasih.split(ath.coords)[1].split('&lt;div ')[0].replace('none;', 'block;z-index:123;').replace('lime;', 'rgba(255,87,51,0.5);'));<br \/>\n    }<br \/>\n  } else if (('' + appendtoinnerHTML).indexOf(('' + athcoords)) != -1) {<br \/>\n    if (document.getElementById('svgd').innerHTML.indexOf(' title=' + String.fromCharCode(34) + '' + ath.title + '' + String.fromCharCode(34) + '') != -1) {<br \/>\n    document.getElementById('svgd').innerHTML=document.getElementById('svgd').innerHTML.replace(\/rgba\\(255\\,87\\,51\\,0.5\\)\/g, 'rgba(200,200,200,0.3)');<br \/>\n    document.getElementById('svgd').innerHTML+='&lt;div title=' + String.fromCharCode(34) + '' + ath.title + appendtoinnerHTML.split(ath.coords)[1].split('&lt;div ')[0].replace('none;', 'block;z-index:123;').replace(\/\\ id\\=\/g, ' data-id=').replace('lime;', 'rgba(255,87,51,0.5);');<br \/>\n    } else {<br \/>\n    document.getElementById('svgd').innerHTML=document.getElementById('svgd').innerHTML.replace(\/rgba\\(255\\,87\\,51\\,0.5\\)\/g, 'rgba(200,200,200,0.3)');<br \/>\n    document.getElementById('svgd').innerHTML+='&lt;div title=' + String.fromCharCode(34) + '' + ath.title + appendtoinnerHTML.split(ath.coords)[1].split('&lt;div ')[0].replace('none;', 'block;z-index:123;').replace('lime;', 'rgba(255,87,51,0.5);');<br \/>\n    }<br \/>\n  }<br \/>\n  waitplease=false;<br \/>\n  return '';<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; also lessened the burden on the client side by only asking any Javascript DOM command operations act on single HTML element at a time, not a whole swathe of hosted ones, in any operation.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/new-geojson-world-countries-svg-overlay-colour-infill-tutorial\/'>New GeoJson World Countries SVG Overlay Colour Infill Tutorial<\/a> ...<\/p>\n\n\n\n\n\n<hr>\n\n\n\n\n\n<p id='gjwcsvgocit'>Previous relevant <a target=_blank title='GeoJson World Countries SVG Overlay Colour Infill Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-svg-overlay-colour-infill-tutorial\/'>GeoJson World Countries SVG Overlay Colour Infill Tutorial<\/a> is shown below.<\/p>\n\n\n\n[caption id=\"\" align=\"alignnone\" width=\"220\" caption=\"GeoJson World Countries SVG Overlay Colour Infill Tutorial\"]<a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries SVG Overlay Colour Infill Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countriessvg.jpg\" title=\"GeoJson World Countries SVG Overlay Colour Infill Tutorial\"  style=\"float:left;\" \/><\/a>[\/caption]\n\n\n\n<p>The \"overlay\" situation as of yesterday's <a title='GeoJson World Countries Geo Chart Tutorial' href='#gjwcgct'>GeoJson World Countries Geo Chart Tutorial<\/a> was ...<\/p>\n\n\n\n\n\n<ul>\n\n\n<li>document.body lowest level ...<\/li>\n\n\n\n\n<li>overlayed by HTML canvas element plotted with world country linework ...<\/li>\n\n\n\n\n<li>overlayed by HTML img (transparent image) element and its associated image map area elements ... and today we add into the mix ...<\/li>\n\n\n\n\n<li>HTML div hosting <a target=_blank title='HTML svg information from w3schools' href='https:\/\/www.w3schools.com\/html\/html5_svg.asp'>SVG<\/a> elements overlaying (only when called upon) individual GeoJson entities overlay<\/li>\n\n\n<\/ul>\n\n\n\n\n\n<p>What can this achieve?  The GeoJson can become more user friendly via colour coding ...<\/li>\n\n\n\n\n\n<ul>\n\n\n<li>country linework is black and background colour is white to start with ... and ...<\/li>\n\n\n\n\n<li>as a user clicks an individual GeoJson entity the canvas element has a plotting circle created at a <a target=_blank title='CSS z-index information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp'>z-index<\/a> below that of ...<\/li>\n\n\n\n\n<li>overlayed new div and SVG element initialized to <span style='color:rgba(255,87,51,0.5);'>infill colour<\/span> rgba(255,87,51,0.5) while any other previous infills become <span style='color:rgba(200,200,200,0.3);'>dimmer infill colour<\/span> rgba(200,200,200,0.3) ... the transparency of which allows the canvas plotting circle to show through<\/li>\n\n\n<\/ul>\n\n\n\n\n\n<p> ... helping contextualize in other \"drilled into\" maps presented, in <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php---GETME\" title=\"countries.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php---GETME\" title=\"countries.php\">countries.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"Click picture\">web application<\/a> you can <a href='#countriesif'>also try below<\/a>, now helped out by <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/mapsvg.js--GETME\" title=\"mapsvg.js\">the tweaked<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/mapsvg.js--GETME\" title=\"mapsvg.js\">mapsvg.js<\/a> external Javascript helper last talked about at <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/html-map-element-svg-context-google-search-tutorial\/' title='HTML Map Element SVG Context Google Search Tutorial'>HTML Map Element SVG Context Google Search Tutorial<\/a>.  Its analysis of existent HTML webpage image map area subelements is called via a new Javascript function ...<\/p>\n\n\n\n<code>\nfunction checkdsa(ath) {\n  if (('' + appendtoinnerHTML).indexOf(('' + ath.coords)) != -1) {\n    if (document.getElementById('svgd').innerHTML.indexOf(' title=' + String.fromCharCode(34) + '' + ath.title + '' + String.fromCharCode(34) + '') != -1) {\n    document.getElementById('svgd').innerHTML=document.getElementById('svgd').innerHTML.replace(\/rgba\\(255\\,87\\,51\\,0.5\\)\/g, 'rgba(200,200,200,0.3)');\n    document.getElementById('svgd').innerHTML+='&lt;div title=' + String.fromCharCode(34) + '' + ath.title + appendtoinnerHTML.split(ath.coords)[1].split('&lt;div ')[0].replace('none;', 'block;z-index:123;').replace(\/\\ id\\=\/g, ' data-id=').replace('lime;', 'rgba(255,87,51,0.5);');\n    } else {\n    document.getElementById('svgd').innerHTML=document.getElementById('svgd').innerHTML.replace(\/rgba\\(255\\,87\\,51\\,0.5\\)\/g, 'rgba(200,200,200,0.3)');\n    document.getElementById('svgd').innerHTML+='&lt;div title=' + String.fromCharCode(34) + '' + ath.title + appendtoinnerHTML.split(ath.coords)[1].split('&lt;div ')[0].replace('none;', 'block;z-index:123;').replace('lime;', 'rgba(255,87,51,0.5);');\n    }\n  }\n}\n<\/code>  \n\n<!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-svg-overlay-colour-infill-tutorial\/'>GeoJson World Countries SVG Overlay Colour Infill Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwcgct'>Previous relevant <a target=_blank title='GeoJson World Countries Geo Chart Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-geo-chart-tutorial\/'>GeoJson World Countries Geo Chart Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries Geo Chart Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_geo_chartmore.jpg\" title=\"GeoJson World Countries Geo Chart Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Countries Geo Chart Tutorial<\/p><\/div>\n<p>There are many advantages regarding today&#8217;s task to &#8230;<\/p>\n<blockquote><p>\nIntegrate <a title=\"Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.\" href=\"https:\/\/developers.google.com\/chart\/interactive\/docs\/index\" target=\"_blank\">Google Chart<\/a> <a title=\"Google Chart Geo Chart information from Google\" href=\"https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/geochart\" target=\"_blank\">Geo Chart<\/a>\n<\/p><\/blockquote>\n<p> &#8230; as an additional &#8220;drill down&#8221; map option, functionality adding onto the work of yesterday&#8217;s <a title='GeoJson World Countries Tutorial' href='#gjwct'>GeoJson World Countries Tutorial<\/a>.<\/p>\n<p>What deducible data item needs to be determined for these Geo Charts to work?  We need a way to deduce ISO-2 character country codes from the ISO-3 character codes existing in the GeoJson &#8220;countries.geojson&#8221; data from yesterday&#8217;s work.  We happened upon the <a target=_blank title='Useful link' href='http:\/\/gist.github.com\/tadast\/8827699'>extremely generous mapping data webpage<\/a> <font color=blue>to help with these ISO-2 character deductions<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$geojsonis=file_get_contents('countries.geojson');<br \/>\n$parts=explode(\"]]\", $geojsonis);<br \/>\n$globalattr=\"\";<br \/>\n<font color=blue>$mappings=file_get_contents('ht<\/font><font color=blue>tp:\/\/gist.github.com\/tadast\/8827699');  \/\/ thanks<br \/>\nif (strpos($mappings, '&gt;IN&lt;\/td&gt;') !== false) {<br \/>\n  $mappings.='&lt;td&gt;IN&lt;\/td&gt;&lt;td&gt;KAS&lt;\/td&gt;&lt;td&gt;EH&lt;\/td&gt;&lt;td&gt;SAH&lt;\/td&gt;&lt;td&gt;SO&lt;\/td&gt;&lt;td&gt;SOL&lt;\/td&gt;&lt;td&gt;SS&lt;\/td&gt;&lt;td&gt;SDS&lt;\/td&gt;&lt;td&gt;XK&lt;\/td&gt;&lt;td&gt;KOS&lt;\/td&gt;&lt;td&gt;CY&lt;\/td&gt;&lt;td&gt;CYN&lt;\/td&gt;&lt;\/body&gt;';<br \/>\n}<\/font><br \/>\n<br \/>\nfor ($i=0; $i&lt;(-1 + sizeof($parts)); $i++) {<br \/>\n  if (strpos($parts[$i], '\"sr_sov_a3\":\"') !== false) {<br \/>\n    $globalattr=' data-iso3=\"' . explode('\"', explode('\"sr_sov_a3\":\"', $parts[$i])[1])[0] . '\"';<br \/>\n    if (strpos($mappings, '&gt;' . explode('\"', explode('\"sr_sov_a3\":\"', $parts[$i])[1])[0] . '&lt;\/td&gt;') !== false) {<br \/>\n      $iparts=explode('&gt;' . explode('\"', explode('\"sr_sov_a3\":\"', $parts[$i])[1])[0] . '&lt;\/td&gt;', $mappings);<br \/>\n      $globalattr.=' data-iso2=\"' . explode('&gt;', explode('&lt;\/td&gt;', $iparts[0])[-2 + sizeof(explode('&lt;\/td&gt;', $iparts[0]))])[-1 + sizeof(explode('&gt;', explode('&lt;\/td&gt;', $iparts[0])[-2 + sizeof(explode('&lt;\/td&gt;', $iparts[0]))]))] . '\"';<br \/>\n    } else if (substr(explode('\"', explode('\"sr_sov_a3\":\"', $parts[$i])[1])[0],-1,1) &gt;= '0' && substr(explode('\"', explode('\"sr_sov_a3\":\"', $parts[$i])[1])[0],-1,1) &lt;= '9') {<br \/>\n      $globalattr.=' data-iso2=\"' . substr(explode('\"', explode('\"sr_sov_a3\":\"', $parts[$i])[1])[0],0,2) . '\"';<br \/>\n    }<br \/>\n  }<br \/>\n  if (strpos($parts[$i], '\"sr_subunit\":\"') !== false) {<br \/>\n    $globalattr.=' data-cname=\"' . explode('\"', explode('\"sr_subunit\":\"', $parts[$i])[1])[0] . '\"';<br \/>\n  }<br \/>\n  $coords=str_replace('[','',str_replace(']','',explode('[[' , $parts[$i])[-1 + sizeof(explode('[[' , $parts[$i]))]));<br \/>\n  $newcoords=$coords;<br \/>\n  if (!$dolatlong || 1 == 1) {<br \/>\n  $lls=explode(\",\", $coords);<br \/>\n  $newcoords=\"\";<br \/>\n  for ($j=0; $j&lt;sizeof($lls); $j+=2) {<br \/>\n  $lls[$j]=($lls[$j] + $longoff) * $factor;<br \/>\n  $lls[$j + 1]=($lls[$j + 1] + $latoff) * $factor;<br \/>\n  if ($newcoords != \"\") { $newcoords.=\",\";  $htmlis=str_replace(\"}\", \" context.lineTo(\" . $lls[$j] . ',' . ((180.0 * $factor) - $lls[$j + 1]) . \"); \\n}\", $htmlis);  } else { $htmlis=str_replace(\"}\", \" context.stroke(); \\n context.beginPath(); \\n context.moveTo(\" . $lls[$j] . ',' . ((180.0 * $factor) - $lls[$j + 1]) . \"); \\n}\", $htmlis); }<br \/>\n  $newcoords.='' . $lls[$j] . ',' . ((180.0 * $factor) - $lls[$j + 1]);<br \/>\n  }<br \/>\n  }<br \/>\n  $abit.=\"&lt;area\" . $globalattr . \" onclick=\\\"ouralert(this.getAttribute('data-cname'),this.getAttribute('data-iso3'),this.getAttribute('data-iso2'),'Longitude,Latitude coordinates are \" . $coords . \"');\\\" shape='poly' coords='\" . $newcoords . \"'&gt;&lt;\/area&gt;\\n\";<br \/>\n  \/\/echo \"&lt;area type='poly' coords='\" . $newcoords . \"'&gt;&lt;\/area&gt;\\n\";<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; in our image map area elements PHP creation code above.  As you can see, extra &#8220;intelligence&#8221;, moving forward, is contained in area element <a target=_blank href='https:\/\/www.w3schools.com\/tags\/att_global_data.asp' title='Global data attributes information from W3schools'>global data attributes<\/a>.<\/p>\n<p>Which leaves us with why any of this helps functionality within <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php--GETME\" title=\"countries.php\">our changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php--GETME\" title=\"countries.php\">countries.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"Click picture\">web application<\/a> you can <a href='#countriesif'>also try below<\/a>?<\/p>\n<ul>\n<li>Geo Chart can zoom into a country view &#8230;<\/li>\n<li>Geo Chart can involve emoji (&#127968; &amp;127968;) or image (SVG) circle based symbology for the &#8220;User Clicked Place&#8221; and nearby TimeZone places respectively &#8230;<\/li>\n<li>all these symbols can be clicked to open popup windows containing TimeZone Place <a target=_blank title='Wikipedia ... thanks' href='http:\/\/wikipedia.org'>Wikipedia<\/a> webpages of relevance &#8230;<\/li>\n<li>an emoji national flag (eg. Zambia &#8220;ZA&#8221; could be used to derive &amp;#127487;&amp;#127462; &#127487;&#127462; flag emoji) derived from those ISO-2 character codes can supplement the GeoJson (more ISO-3 character based) names presented in the underlying data, in the Geo Chart title &#8230;<\/li>\n<li>contextualizing the accompanying Map Chart &#8230; and &#8230;<\/li>\n<li>vice versa regarding hovering over symbology (which works on Map Chart, but not Geo Chart) &#8230;<\/li>\n<li>within the Map Chart iframe a &#8220;Geo&#8221; link can glean a &#8220;zoomed out&#8221; world Geo Chart view of your TimeZone places<\/li>\n<\/ul>\n<p>And feel free to (re-)try <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php---GETME\" title=\"regions.php\">our tweaked &#8220;to make thinner the coastline linework&#8221;<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php---GETME\" title=\"regions.php\">regions.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php\" title=\"GeoJson PHP web application\">GeoJson PHP web application<\/a> in a new window, or you can <a href='#regionsif'>also try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-geo_chart-tutorial\/'>GeoJson World Countries Geo Chart Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwct'>Previous relevant <a target=_blank title='GeoJson World Countries Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-tutorial\/'>GeoJson World Countries Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Countries Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries_ontop.jpg\" title=\"GeoJson World Countries Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Countries Tutorial<\/p><\/div>\n<p>Know your GeoJson!  Yes, pretty obviously, any two GeoJson datasets might display the same in that &#8220;map plotting&#8221; sense, but one might have different and\/or more &#8220;intelligence&#8221; than the other.  Often, an XML has more &#8220;intelligence&#8221; than equivalent HTML (barring the use of global data attributes, <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=PtR4cWb4HNg'>that is<\/a>), as today&#8217;s <strike>Corolla<\/strike>corollary.<\/p>\n<p>And so, moving on from yesterday&#8217;s <a title='GeoJson World Coastline TimeZone Tutorial' href='#gjwctzt'>GeoJson World Coastline TimeZone Tutorial<\/a>, today, we present a new GeoJson <a target=_blank href='https:\/\/d2ad6b4ur7yvpq.cloudfront.net\/naturalearth-3.3.0\/ne_50m_admin_0_scale_rank.geojson'>admin 0 countries we download, and upload as &#8220;countries.geojson&#8221;<\/a> data set, again via the excellent <a target=_blank title='http:\/\/geojson.xyz\/' href='HTTP:\/\/geojson.xyz\/'>HTTP:\/\/geojson.xyz\/<\/a> repository, thanks.<\/p>\n<p>From it, we do get a <font color=blue>different JSON additional &#8220;intelligence&#8221;<\/font> &#8230;<\/p>\n<p><code><br \/>\n{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\"<font color=blue>,\"properties\":{\"scalerank\":1,\"labelrank\":1,\"sr_sov_a3\":\"ZWE\",\"sr_adm0_a3\":\"ZWE\",\"sr_gu_a3\":\"ZWE\",\"sr_su_a3\":\"ZWE\",\"sr_subunit\":\"Zimbabwe\",\"featureclass\":\"Admin-0 scale ranks\"}<\/font>,\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[31.287890625000017,-22.40205078125001],[31.197265625,-22.34492187500001],[31.07343750000001,-22.30781250000001],[30.916113281250006,-22.29072265625001],[30.71162109375001,-22.2978515625],[30.46015625000001,-22.32900390625001],[30.1904296875,-22.291113281250006],[29.90234375,-22.184179687500006],[29.6630859375,-22.146289062500003],[29.37744140625,-22.19277343750001],[29.36484375,-22.193945312500006],[29.315234375000017,-22.15771484375],[29.237207031250023,-22.07949218750001],[29.106835937500023,-22.065722656250003],[29.07148437500001,-22.047460937500006],[29.042382812500023,-22.018359375],[29.023339843750023,-21.98125],[29.01582031250001,-21.93994140625],[29.03730468750001,-21.811328125],[29.02558593750001,-21.796875],[28.99072265625,-21.78144531250001],[28.919335937500023,-21.766015625],[28.74775390625001,-21.707617187500006],[28.532031250000017,-21.65126953125001],[28.181640625,-21.58935546875],[28.04560546875001,-21.573046875],[28.014062500000023,-21.55419921875],[27.974609375,-21.50673828125001],[27.90742187500001,-21.35908203125001],[27.844140625000023,-21.261523437500003],[27.693457031250006,-21.11103515625001],[27.66943359375,-21.064257812500003],[27.67695312500001,-20.94482421875],[27.688085937500006,-20.84833984375001],[27.70429687500001,-20.76640625],[27.69697265625001,-20.689746093750003],[27.69482421875,-20.59453125],[27.699609375000023,-20.53066406250001],[27.679296875,-20.503027343750006],[27.624609375,-20.48359375000001],[27.46894531250001,-20.47480468750001],[27.28076171875,-20.47871093750001],[27.27460937500001,-20.3818359375],[27.256738281250023,-20.23203125],[27.221484375000017,-20.145800781250003],[27.17822265625,-20.10097656250001],[27.091796875,-20.05419921875],[26.91669921875001,-19.99013671875001],[26.67822265625,-19.89277343750001],[26.474609375,-19.748632812500006],[26.241015625000017,-19.5693359375],[26.168066406250006,-19.53828125000001],[26.081933593750023,-19.369921875],[25.95068359375,-19.08173828125001],[25.95917968750001,-18.985644531250003],[25.939355468750023,-18.93867187500001],[25.811914062500023,-18.79707031250001],[25.78369140625,-18.72353515625001],[25.76123046875,-18.64921875],[25.55830078125001,-18.441796875],[25.4892578125,-18.35126953125001],[25.43671875000001,-18.234960937500006],[25.384375,-18.14199218750001],[25.340234375000023,-18.1044921875],[25.28242187500001,-18.04121093750001],[25.242285156250006,-17.969042968750003],[25.224023437500023,-17.91523437500001],[25.239062500000017,-17.843066406250003],[25.2587890625,-17.793554687500006],[25.451757812500006,-17.84511718750001],[25.55712890625,-17.84951171875001],[25.6396484375,-17.82412109375001],[25.741601562500023,-17.858203125],[25.86328125,-17.951953125],[25.995898437500017,-17.969824218750006],[26.139550781250023,-17.91171875],[26.333398437500023,-17.929296875],[26.577539062500023,-18.022558593750006],[26.779882812500006,-18.04150390625],[27.020800781250017,-17.95839843750001],[27.235742187500023,-17.728320312500003],[27.437890625000023,-17.51191406250001],[27.63671875,-17.262109375],[27.75654296875001,-17.060351562500003],[27.932226562500006,-16.89619140625001],[28.16376953125001,-16.76972656250001],[28.399804687500023,-16.66279296875001],[28.760644531250023,-16.53193359375001],[28.760546875000017,-16.53212890625001],[28.83271484375001,-16.424121093750003],[28.856738281250017,-16.30615234375],[28.856738281250017,-16.14228515625001],[28.875585937500006,-16.0361328125],[28.9130859375,-15.98779296875],[28.973046875000023,-15.950097656250009],[29.050585937500017,-15.901171875],[29.287890625000017,-15.776464843750006],[29.4873046875,-15.69677734375],[29.729589843750006,-15.644628906250006],[29.994921875000017,-15.64404296875],[30.25068359375001,-15.643457031250009],[30.39609375,-15.64306640625],[30.39814453125001,-15.80078125],[30.409375,-15.978222656250011],[30.437792968750017,-15.995312500000011],[30.630175781250017,-15.999218750000011],[30.938769531250017,-16.01171875],[31.236230468750023,-16.02363281250001],[31.426171875000023,-16.15234375],[31.48984375,-16.1796875],[31.687597656250006,-16.214160156250003],[31.939843750000023,-16.428808593750006],[32.243261718750006,-16.44873046875],[32.45195312500002,-16.515722656250006],[32.635839843750006,-16.589453125],[32.741796875,-16.67763671875001],[32.81025390625001,-16.69765625],[32.902929687500006,-16.704199218750006],[32.94804687500002,-16.71230468750001],[32.93789062500002,-16.775976562500006],[32.87626953125002,-16.88359375],[32.884375,-17.03779296875001],[32.969335937500006,-17.2515625],[32.98076171875002,-17.4375],[32.9546875,-17.765429687500003],[32.95556640625,-18.08291015625001],[32.96464843750002,-18.1962890625],[32.978515625,-18.271484375],[32.99638671875002,-18.312597656250006],[32.99306640625002,-18.35957031250001],[32.942480468750006,-18.49267578125],[32.90166015625002,-18.632910156250006],[32.90029296875002,-18.6890625],[32.88457031250002,-18.728515625],[32.8544921875,-18.763671875],[32.72197265625002,-18.828417968750003],[32.69921875,-18.868457031250003],[32.69970703125,-18.94091796875],[32.71650390625001,-19.00185546875001],[32.766210937500006,-19.02431640625001],[32.826171875,-19.05878906250001],[32.84980468750001,-19.10439453125001],[32.85,-19.152441406250006],[32.83095703125002,-19.24140625000001],[32.77763671875002,-19.388769531250006],[32.83076171875001,-19.558203125],[32.89042968750002,-19.668066406250006],[32.97265625,-19.79541015625],[33.00673828125002,-19.873828125],[33.0048828125,-19.93017578125],[32.992773437500006,-19.98486328125],[32.86962890625,-20.2171875],[32.780859375,-20.36152343750001],[32.67255859375001,-20.51611328125],[32.529296875,-20.613085937500003],[32.49238281250001,-20.659765625],[32.477636718750006,-20.712988281250006],[32.48281250000002,-20.82890625],[32.476171875,-20.95009765625001],[32.353613281250006,-21.136523437500003],[32.429785156250006,-21.29707031250001],[32.41240234375002,-21.311816406250003],[32.37109375,-21.33486328125001],[32.19472656250002,-21.515429687500003],[32.01630859375001,-21.698046875],[31.88593750000001,-21.83154296875],[31.737695312500023,-21.9833984375],[31.57148437500001,-22.15351562500001],[31.429492187500017,-22.298828125],[31.287890625000017,-22.40205078125001]]]}}<br \/>\n<\/code><\/p>\n<p> &#8230; and &#8220;mapping look&#8221; because country borders are added in, and some JSON attributes we can call on to allow for &#8230;<\/p>\n<ul>\n<li>the similar  <a title=\"Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.\" href=\"https:\/\/developers.google.com\/chart\/interactive\/docs\/index\" target=\"_blank\">Google Chart<\/a> <a title=\"Google Chart Map Chart information from Google\" href=\"https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/map\" target=\"_blank\">Map Chart<\/a> maps introduced yesterday into the user interaction mix &#8230; as well as &#8230;<\/li>\n<li><a target=_blank title='Wikipedia ... thanks' href='http:\/\/wikipedia.org'>Wikipedia<\/a>, thanks, webpage lookup possibilities calling on those new GeoJson property attributes presented within the dataset above<\/li>\n<\/ul>\n<p>We enable this, as we just add in some Javascript popup window type equals &#8220;prompt&#8221; to the existant &#8220;confirm&#8221; and &#8220;alert&#8221; logic of yesterday.<\/p>\n<p>Feel free to try <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php-GETME\" title=\"countries.php\">the how we got there<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php-GETME\" title=\"countries.php\">regions.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\" title=\"GeoJson PHP web application\">GeoJson PHP World Countries web application<\/a> in a new window, or below &#8230;<\/p>\n<div style='width:800px;height:700px;-webkit-overflow-scrolling:touch;overflow:auto;'>\n<iframe id=countriesif style='width:100%;height:600px;' src=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.php\"><\/iframe>\n<\/div>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-countries-tutorial\/'>GeoJson World Countries Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwctzt'>Previous relevant <a target=_blank title='GeoJson World Coastline TimeZone Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-coastline-timezone-tutorial\/'>GeoJson World Coastline TimeZone Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Coastline TimeZone Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions_tz.jpg\" title=\"GeoJson World Coastline TimeZone Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Coastline TimeZone Tutorial<\/p><\/div>\n<p>Luckily for programmers all over, the organization of TimeZones has had an International flavour in its development and maintenance.  As such, given the &#8220;purely coastline&#8221; GeoJson data involved in our fledgling PHP web application of yesterday&#8217;s <a title='GeoJson World Coastline Primer Tutorial' href='#gjwcpt'>GeoJson World Coastline Primer Tutorial<\/a> a useful arrangement for improvement involves &#8230;<\/p>\n<ul>\n<li>document.body onclick event co-ordinates &#8230; able to be converted to &#8230;<\/li>\n<li>longitude, latitude <font size=1>(easily, only because of our simplistic map projection, of course)<\/font> &#8230; onfed to &#8230;<\/li>\n<li>our inhouse <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tz_places.php\">&#8220;TimeZone Places&#8221; web application<\/a> PHP helper<\/li>\n<\/ul>\n<p> &#8230; can have us helping out your curious web &#8220;clicking&#8221; user with the 3 nearest TimeZone places, as a reference as to where they are &#8220;clicking&#8221; in the world.<\/p>\n<p>Feel free to try <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php-GETME\" title=\"regions.php\">our improved<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php-GETME\" title=\"regions.php\">regions.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php\" title=\"GeoJson PHP web application\">GeoJson PHP web application<\/a> in a new window, or below &#8230;<\/p>\n<div style='width:800px;height:700px;-webkit-overflow-scrolling:touch;overflow:auto;'>\n<iframe id=regionsif style='width:100%;height:600px;' src=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php\"><\/iframe>\n<\/div>\n<p><b><i>Stop Press<\/i><\/b><\/p>\n<p>Our efforts in making <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php--GETME\" title=\"regions.php\">our new tweaked<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php--GETME\" title=\"regions.php\">regions.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php\" title=\"GeoJson PHP web application\">GeoJson PHP web application<\/a> more mobile platform user friendly reminds us about a salutary issue regarding touch gestures &#8230;<\/a><\/p>\n<ul>\n<li>in a discrete click methodology of interest, you could adopt a non-mobile &#8220;onmousedown&#8221; logic set that does not get interfered with by a mobile &#8220;ontouchdown&#8221; logic set (perhaps leaving &#8220;onclick&#8221; event, which both non-mobile and mobile both recognise, for another event logic role) &#8230; and &#8230;<\/li>\n<li>neither will interrupt the mobile gestures associated with swiping and pinching, which refer to the events &#8220;ontouchstart&#8221; and &#8220;ontouchend&#8221; at either end of their lifespan<\/li>\n<\/ul>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/new-geojson-world-coastline-primer-tutorial\/'>New GeoJson World Coastline Primer Tutorial<\/a>.<\/p-->\n<hr>\n<p id='gjwcpt'>Previous relevant <a target=_blank title='GeoJson World Coastline Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-coastline-primer-tutorial\/'>GeoJson World Coastline Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"GeoJson World Coastline Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/geojson_coastline.jpg\" title=\"GeoJson World Coastline Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">GeoJson World Coastline Primer Tutorial<\/p><\/div>\n<p>We&#8217;re keen to further explore the possibilities of <a target=_blank title='GeoJson information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/GeoJSON'>GeoJson<\/a> public data sets, further to yesterday&#8217;s <a target=_blank title='Swift Playgrounds on macOS Map Emoji Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/swift-playgrounds-on-macos-map-emoji-tutorial'>Swift Playgrounds on macOS Map Emoji Tutorial<\/a>.<\/p>\n<p>And then we remembered some of the methodologies we used with <a target=_blank title='Responsive Web Design Landing Page Image Map Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/responsive-web-design-landing-page-image-map-tutorial\/'>Responsive Web Design Landing Page Image Map Tutorial<\/a>, talking about <a target=_blank title='HTML map element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_map.asp'>image maps<\/a> &#8230;<\/p>\n<blockquote cite='https:\/\/www.rjmprogramming.com.au\/ITblog\/responsive-web-design-landing-page-image-map-tutorial\/'><p>\nAnd so, we arrive at a long planned for tilt at Image Map functionality that we often turn to Mobilefish.Com and its excellent Image Map Creation to help us out \u2026 but not today?! Why not?  We have a funny set of needs, they being \u2026<br \/>\n<\/p>\n<ul>\n<li>our Image Map\u2019s image will have a variable set of width x height dimensions \u2026<\/li>\n<li>our Image Map\u2019s image will be transparent<\/li>\n<li>our Image Map needs to have a hole left aside inside it where the functionality that originally existed (and pointed to WordPress Blog content like you are reading), is still working<\/li>\n<\/blockquote>\n<p> &#8230; the first two ideas of which, along with &#8230;<\/p>\n<ul>\n<li><a target=_blank title='HTML Canvas element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>canvas<\/a> element where the &#8230;<\/li>\n<li>GeoJson coordinates &#8230; thanks to <a target=_blank title=https:\/\/d2ad6b4ur7yvpq.cloudfront.net\/naturalearth-3.3.0\/ne_110m_coastline.geojson href='https:\/\/d2ad6b4ur7yvpq.cloudfront.net\/naturalearth-3.3.0\/ne_110m_coastline.geojson'>https:\/\/d2ad6b4ur7yvpq.cloudfront.net\/naturalearth-3.3.0\/ne_110m_coastline.geojson<\/a> via <a target=_blank title='http:\/\/geojson.xyz\/' href='HTTP:\/\/geojson.xyz\/'>HTTP:\/\/geojson.xyz\/<\/a> &#8230;<\/li>\n<li>will be plotted &#8230; but the canvas element &#8230;<\/li>\n<li>has a <a target=_blank title='CSS z-index information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp'>z-index<\/a> set below the image and image map above &#8230; meaning &#8230;<\/li>\n<li>we can add some region specific coding into the &#8230;<\/li>\n<li>image map <a target=_blank title='HTML area element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_area.asp'>area<\/a> element (shape=poly) onclick logics<\/li>\n<\/ul>\n<p> &#8230; in our &#8220;early days&#8221; &#8220;proof of concept&#8221; <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php_GETME\" title=\"regions.php\">regions.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/regions.php\" title=\"GeoJson PHP web application\">GeoJson PHP web application<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d57945' onclick='var dv=document.getElementById(\"d57945\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/geojson\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d57945' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d57962' onclick='var dv=document.getElementById(\"d57962\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/integration\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d57962' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d57970' onclick='var dv=document.getElementById(\"d57970\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/countries\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d57970' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d57985' onclick='var dv=document.getElementById(\"d57985\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/geo-chart\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d57985' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58002' onclick='var dv=document.getElementById(\"d58002\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/overlay\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58002' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58015' onclick='var dv=document.getElementById(\"d58015\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/dom\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58015' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58021' onclick='var dv=document.getElementById(\"d58021\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/emoji\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58021' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58027' onclick='var dv=document.getElementById(\"d58027\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/zoom\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58027' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58034' onclick='var dv=document.getElementById(\"d58034\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/google-directions\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58034' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58049' onclick='var dv=document.getElementById(\"d58049\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/airport\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58049' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58055' onclick='var dv=document.getElementById(\"d58055\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/plot\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58055' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58063' onclick='var dv=document.getElementById(\"d58063\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/port\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58063' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58072' onclick='var dv=document.getElementById(\"d58072\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/quiz\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58072' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s time to turn our attention away from GeoJson World Countries, as talked about with yesterday&#8217;s GeoJson World Countries Plotted Ports Tutorial, and back to GeoJson World Coastline ideas. Why? We want to add a &#8230; Rivers Quiz &#8230; via &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/geojson-world-coastline-rivers-quiz-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[2248,67,69,2516,99,2360,1614,1688,184,212,4207,3374,2690,4202,2081,290,3197,342,354,385,3192,4210,2242,1619,4198,485,499,4206,513,518,2969,527,2229,557,576,587,590,592,599,4208,4209,3290,614,4205,3513,626,631,3636,3635,3266,652,664,745,2126,776,830,861,1919,2219,4204,872,873,894,932,2134,954,967,968,1772,997,1761,3449,2232,1022,1038,1065,2681,1122,1168,1200,1226,4211,1279,1693,1294,4203,1319,1891,3575,3214,1373,1404,2579,2580,1431,1496,1498],"class_list":["post-58072","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-adverb","tag-airport","tag-ajax","tag-alert","tag-area","tag-async","tag-asynchronous","tag-attributes","tag-canvas","tag-client","tag-color","tag-colour-coding","tag-confirm","tag-countries","tag-country","tag-data","tag-dataset","tag-div","tag-dom","tag-emoji","tag-emoji-flag","tag-fillrect","tag-flag","tag-geo-chart","tag-geojson","tag-gesture","tag-global-airport-database","tag-global-data-attributes","tag-google","tag-google-chart","tag-google-directions","tag-google-maps","tag-hash","tag-hashtag","tag-html","tag-iframe","tag-image","tag-image-map","tag-img","tag-infill","tag-infill-colour","tag-initialize","tag-integration","tag-intelligence","tag-interactive-input","tag-ios","tag-iphone","tag-iso-639-2","tag-iso-639-3","tag-iso-code","tag-javascript","tag-json","tag-map","tag-map-chart","tag-meta","tag-navigation","tag-onclick","tag-onmousedown","tag-onmousemove","tag-ontouchdowm","tag-ontouchend","tag-ontouchstart","tag-overlay","tag-php","tag-place","tag-plot","tag-popup","tag-popup-window","tag-port","tag-programming","tag-prompt","tag-properties","tag-property","tag-quiz","tag-reference","tag-rgb","tag-rgba","tag-server","tag-software-integration","tag-stop-press","tag-svg","tag-synchronous","tag-time","tag-timezone","tag-touch","tag-touch-gesture","tag-tutorial","tag-user","tag-user-input","tag-user-interaction","tag-viewport","tag-web-browser","tag-when","tag-where","tag-wikipedia","tag-z-index","tag-zoom"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58072"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=58072"}],"version-history":[{"count":13,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58072\/revisions"}],"predecessor-version":[{"id":58085,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58072\/revisions\/58085"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=58072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=58072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=58072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}