{"id":5478,"date":"2013-12-03T05:03:53","date_gmt":"2013-12-02T18:03:53","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5478"},"modified":"2013-12-03T05:03:53","modified_gmt":"2013-12-02T18:03:53","slug":"phpjavascripthtml-geographical-placename-integration-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascripthtml-geographical-placename-integration-tutorial\/","title":{"rendered":"PHP\/Javascript\/HTML Geographical Placename Integration Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/GeographicalIntegration.png\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP\/Javascript\/HTML Geographical Placename Integration Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/GeographicalIntegration.png\" title=\"PHP\/Javascript\/HTML Geographical Placename Integration Tutorial\" \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript\/HTML Geographical Placename Integration Tutorial<\/p><\/div>\n<p>Here is a tutorial that presents various functionality via placename lookups of Latitude and Longitude.  The inhouse functionality was applied in a centralized way when we did <a target=_blank title='PHP\/Javascript\/HTML Moon Angle Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5403'>PHP\/Javascript\/HTML Geographicals By Placename Tutorial<\/a> but for this tutorial, <a target=_blank title='as promised' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5403#aspromised'>as promised<\/a>, we  add individual forms of the functionality to each of that <i>&#8220;parent&#8221;<\/i> application <i>&#8220;child&#8221;<\/i> functions in <a target=_blank title='PHP\/Javascript\/HTML Sun Angle Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5353'>Sun Angles<\/a>, <a target=_blank title='PHP\/Javascript\/HTML Moon Angle Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5383'>Moon Angles<\/a> and <a target=_blank title='PHP\/Javascript\/HTML Great Circle Distance Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5339'>Great Circle Distances<\/a> so that they can also sit independently of their parents with their own geographical placename dropdowns included.  Am hoping it can give some pointers to ideas to do with supervision and automation, in that you can have an idea that works well (which is very important) but is not so user-friendly.   Sometimes in this scenario a supervisory layer can improve things and make the application easier to use.   Asking the question <i>&#8220;What would make this easier to use?&#8221;<\/i> is a good thing to step back and ask after you have created an application.  And, of course, with all things, there is the <i><a target=_blank title='why' href='http:\/\/www.youtube.com\/watch?v=VB5yrPl2a_I'>&#8220;why&#8221;<\/a><\/i>?  Doing that here made me realise what was needed to improve the application was a data source that linked geographicals to placenames.<\/p>\n<p>The Javascript embellishments in this tutorial mainly revolve around:<\/p>\n<ul>\n<li><a target=_blank title='window.open' href='http:\/\/www.w3schools.com\/jsref\/met_win_open.asp'>window.open<\/a><\/li>\n<\/ul>\n<p>The use of window.open can sometimes be blocked by web browsers depending on their settings and you can read a bit more about such issues <a target=_blank title='pop-up windows' href='http:\/\/en.wikipedia.org\/wiki\/Pop-up_ad'>here<\/a>.<\/p>\n<p>Useful tutorials that helped, and we give thanks to, were:<\/p>\n<ul>\n<li><a target=_blank title='Placename geographicals' href='http:\/\/stutzfamily.com\/mrstutz\/LatLong\/latlonglist.htm#AFGHANISTAN'>Placename geographicals<\/a> via <a target=_blank title='cURL in PHP and command line' href='http:\/\/php.net\/manual\/en\/book.curl.php'>cURL<\/a><\/li>\n<li>\n<hr \/>\n<\/hr>\n<\/li>\n<li><a target=_blank title='Subsolar Point' href='http:\/\/en.wikipedia.org\/wiki\/Subsolar_point'>Subsolar Point<\/a><\/li>\n<li><a target=_blank title='Subsolar Point calculator helper' href='http:\/\/www.timeanddate.com\/worldclock\/sunearth.html'>Subsolar Point calculator helper<\/a> via <a target=_blank title='cURL in PHP and command line' href='http:\/\/php.net\/manual\/en\/book.curl.php'>cURL<\/a><\/li>\n<li><a target=_blank title='Sun Angle formulae' href='http:\/\/www.google.com.au\/url?sa=t&#038;rct=j&#038;q=&#038;esrc=s&#038;source=web&#038;cd=1&#038;ved=0CC8QFjAA&#038;url=http%3A%2F%2Fgeoalliance.asu.edu%2Fazga_site%2Fsites%2Fdefault%2Ffiles%2FLessonFiles%2FDorn%2FPulse%2FDornPulse.ppt&#038;ei=QTGRUuiXEcGtiAfwlIGICw&#038;usg=AFQjCNEYL6f1yBLg5hdC5qgYnnfWS00nOg&#038;sig2=2kQ25M8OoDltE6baNCRlnQ&#038;bvm=bv.56988011,d.aGc'>Sun Angle formulae<\/a><\/li>\n<li><a target=_blank title='Sydney positioning' href='http:\/\/stutzfamily.com\/mrstutz\/LatLong\/latlonglist.htm#AUSTRALIA'>Sydney positioning<\/a><\/li>\n<li><a target=_blank title='CSS Border Radius' href='http:\/\/www.css3.info\/preview\/rounded-border\/'>CSS Border Radius<\/a><\/li>\n<li><a target=_blank title='CSS 2D Transformation Rotations' href='http:\/\/www.w3schools.com\/css\/css3_2dtransforms.asp'>CSS 2D Transformation Rotations<\/a><\/li>\n<li>\n<hr \/>\n<\/hr>\n<\/li>\n<li><a target=_blank title='Sublunary Point' href='http:\/\/translate.google.com.au\/translate?hl=en&#038;sl=de&#038;u=http:\/\/de.wikipedia.org\/wiki\/Sublunarer_Punkt&#038;prev=\/search%3Fq%3D%2522Sublunarer%2522%2Bwikipedia%26client%3Dfirefox-a%26hs%3D3co%26rls%3Dorg.mozilla:en-US:official%26biw%3D1213%26bih%3D619'>Sublunary Point<\/a><\/li>\n<li><a target=_blank title='Sublunary Point calculator helper' href='http:\/\/www.timeanddate.com\/worldclock\/sunearth.html'>Sublunary Point calculator helper<\/a> via <a target=_blank title='cURL in PHP and command line' href='http:\/\/php.net\/manual\/en\/book.curl.php'>cURL<\/a><\/li>\n<li><a target=_blank title='Moon Phase calculator helper' href='http:\/\/www.zodiacarts.com\/Calendar.shtml'>Moon Phase calculator helper<\/a> via <a target=_blank title='cURL in PHP and command line' href='http:\/\/php.net\/manual\/en\/book.curl.php'>cURL<\/a><\/li>\n<li><a target=_blank title='Sun Angle formulae applied to the case of the Moon Sublunary Point' href='http:\/\/www.google.com.au\/url?sa=t&#038;rct=j&#038;q=&#038;esrc=s&#038;source=web&#038;cd=1&#038;ved=0CC8QFjAA&#038;url=http%3A%2F%2Fgeoalliance.asu.edu%2Fazga_site%2Fsites%2Fdefault%2Ffiles%2FLessonFiles%2FDorn%2FPulse%2FDornPulse.ppt&#038;ei=QTGRUuiXEcGtiAfwlIGICw&#038;usg=AFQjCNEYL6f1yBLg5hdC5qgYnnfWS00nOg&#038;sig2=2kQ25M8OoDltE6baNCRlnQ&#038;bvm=bv.56988011,d.aGc'>Sun Angle formulae applied to the case of the Moon Sublunary Point<\/a><\/li>\n<li><a target=_blank title='Sydney positioning' href='http:\/\/stutzfamily.com\/mrstutz\/LatLong\/latlonglist.htm#AUSTRALIA'>Sydney positioning<\/a><\/li>\n<li><a target=_blank title='CSS 2D Transformation Rotations' href='http:\/\/www.w3schools.com\/css\/css3_2dtransforms.asp'>CSS 2D Transformation Rotations<\/a><\/li>\n<li>\n<hr \/>\n<\/hr>\n<\/li>\n<li><a target=_blank title='Great Circle Distance formulae' href='http:\/\/en.wikipedia.org\/wiki\/Great-circle_distance'>Great Circle Distance formulae<\/a><\/li>\n<li><a target=_blank title='Javascript rounding' href='http:\/\/stackoverflow.com\/questions\/11832914\/round-up-to-2-decimal-places-in-javascript'>Javascript rounding<\/a><\/li>\n<li><a target=_blank title='Javascript commas for thousands' href='http:\/\/www.mredkj.com\/javascript\/nfbasic.html'>Javascript commas for thousands<\/a><\/li>\n<li><a target=_blank title='Katmandu positioning via a Google search' href='https:\/\/www.google.com.au\/search?q=%22katmandu%22&#038;ie=utf-8&#038;oe=utf-8&#038;rls=org.mozilla:en-US:official&#038;client=firefox-a&#038;gfe_rd=ctrl&#038;ei=hk-QUriHM8qN8QeQzIDoDQ&#038;gws_rd=cr#q=%22katmandu+latitude%22&#038;rls=org.mozilla:en-US%3Aofficial '>Katmandu positioning via a Google search<\/a><\/li>\n<\/ul>\n<p><!--p>Here is a link to some downloadable PHP supervisory <i>\"parent\"<\/i> programming source code which you may want to rename to <a target=_blank title='place_latlong.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/place_latlong.php_GETME\">place_latlong.php<\/a><\/p-->\n<p>Here is a new link to some downloadable PHP <i>&#8220;independent child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='distance.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Distance\/distance.php--GETME\">distance.php<\/a><\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='distance.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Distance\/distance.php-GETME\">distance_lessold.php<\/a><\/p>\n<p>Here is an old link to some downloadable PHP programming source code which you may want to rename to <a target=_blank title='distance.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Distance\/distance.php_GETME\">distance_old.php<\/a> (for comparison purposes).<\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;independent child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='sun_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php--GETME\">sun_angle_now_at.php<\/a><\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='sun_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php-GETME\">sun_angle_now_at_lessold.php<\/a><\/p>\n<p>Here is an old link to some downloadable PHP programming source code which you may want to rename to <a target=_blank title='sun_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php_GETME\">sun_angle_now_at_old.php<\/a> (for comparison purposes).<\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;independent child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='moon_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php--GETME\">moon_angle_now_at.php<\/a><\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='moon_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php-GETME\">moon_angle_now_at_lessold.php<\/a><\/p>\n<p>Here is an old link to some downloadable PHP programming source code which you may want to rename to <a target=_blank title='sun_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php_GETME\">moon_angle_now_at_old.php<\/a> (for comparison purposes).<\/p>\n<p>Live link to <i>&#8220;independent child&#8221;<\/i> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Distance\/distance.php\" title='Live run'>Distance<\/a> application.<\/p>\n<p>Live link to <i>&#8220;independent child&#8221;<\/i> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php\" title='Live run'>Sun Angle<\/a> application.<\/p>\n<p>Live link to <i>&#8220;independent child&#8221;<\/i> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php\" title='Live run'>Moon Angle<\/a> application.<\/p>\n<p>These new <i>&#8220;independent child&#8221;<\/i> applications still work with the link to a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/place_latlong.php\" title='Live run'>live run<\/a> of that <i>&#8220;parent&#8221;<\/i> supervisory application.<\/p>\n<p><b>Did you know (PHP-wise)?<\/b><\/p>\n<blockquote><p>if ( basename(__FILE__) == basename($_SERVER[&#8220;SCRIPT_FILENAME&#8221;]) ) {<br \/>\n  echo &#8220;This will only happen when called directly, not when used with require_once nor include_once&#8221;;<br \/>\n}<\/p><\/blockquote>\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='#d5478' onclick='var dv=document.getElementById(\"d5478\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=59\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5478' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here is a tutorial that presents various functionality via placename lookups of Latitude and Longitude. The inhouse functionality was applied in a centralized way when we did PHP\/Javascript\/HTML Geographicals By Placename Tutorial but for this tutorial, as promised, we add &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascripthtml-geographical-placename-integration-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":[8,12,21,37],"tags":[119,481,513,527,576,652,932,949,997,1221,1319],"class_list":["post-5478","post","type-post","status-publish","format-standard","hentry","category-data-integration","category-elearning","category-land-surveying","category-tutorials","tag-automation","tag-geographicals","tag-google","tag-google-maps","tag-html","tag-javascript","tag-php","tag-placenames","tag-programming","tag-supervision","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5478"}],"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=5478"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5478\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=5478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=5478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=5478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}