{"id":80,"date":"2008-07-10T07:32:00","date_gmt":"2008-07-10T11:32:00","guid":{"rendered":"https:\/\/www.windracer.net\/private\/wordpress\/?p=80"},"modified":"2023-03-17T17:49:26","modified_gmt":"2023-03-17T21:49:26","slug":"fix-for-local-radar-image-in-galleons-weather-app","status":"publish","type":"post","link":"https:\/\/www.windracer.net\/blog\/2008\/07\/fix-for-local-radar-image-in-galleons-weather-app\/","title":{"rendered":"Fix for local radar image in Galleon&#8217;s weather app"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:3882,&quot;href&quot;:&quot;http:\\\/\\\/galleon.sourceforge.net&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20230606003248\\\/https:\\\/\\\/galleon.sourceforge.net\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-11 02:46:06&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-15 02:14:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-18 16:10:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-22 05:41:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-02 21:26:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-07 04:41:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-23 13:35:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-28 09:28:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-31 14:58:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-05 07:04:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 15:50:33&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-12 15:50:33&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:4397,&quot;href&quot;:&quot;https:\\\/\\\/www.tivocommunity.com\\\/community\\\/index.php?threads\\\/galleon-2-5-1-is-now-available.368059\\\/page-7#post6462628&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;https:\\\/\\\/www.tivocommunity.com\\\/threads\\\/galleon-2-5-1-is-now-available.368059\\\/page-7&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>A few weeks ago, the Local Radar screen in <a href=\"http:\/\/galleon.sourceforge.net\/\">Galleon<\/a>&#8216;s weather application started showing &#8220;N\/A&#8221; instead of the image from weather.com. Galleon has been dormant, development-wise, for a while. It was updated late last year with some bug fixes and HD support by s2kdave and jtkohl, but has lapsed into the realm of unsupported (but really useful) applications.<\/p>\n<p>s2kdave pointed me in the right direction as to which piece of the code contained the URLs for the local radar image (WeatherData.java). I&#8217;m not really a java programmer, but I <span style=\"font-style: italic;\">can<\/span> code, so I decided to take a look and see if I could figure out the problem. It took me a while, but the fix ended up being rather simple.<\/p>\n<p>In the determineLocalRadar function there are two try blocks. The first section grabs the weather page for the user&#8217;s specified ZIP code:<\/p>\n<pre>GetMethod get = new GetMethod(\"http:\/\/www.weather.com\/weather\/map\/\" + mZip);<\/pre>\n<p>It then parses through that HTML looking for the following strings:<\/p>\n<pre>String REGEX = \"var mapNURL = \\\"(.*)\\\";\";<\/pre>\n<p>or<\/p>\n<pre>REGEX = \"src=\\\"\/maps\/local\/local(.*)\\\"\";<\/pre>\n<p>This was used to detemine the URL of the web page containing the local radar image. The second try block then grabbed <span style=\"font-style: italic;\">that<\/span> page:<\/p>\n<pre>get = new GetMethod(\"http:\/\/www.weather.com\"+ radarurl);<\/pre>\n<p>and parsed it for the URL of the image itself:<\/p>\n<pre>String REGEX = \"NAME=\\\"mapImg\\\" SRC=\\\"([^\\\"]*)\\\"\";<\/pre>\n<p>What I found is that the first web page (the ZIP code-specific one) now contained the local radar image, so there was no need for the first try block anymore (the one creating the radarurl variable). I removed the block and re-compiled the code.<\/p>\n<p>It worked! I tested with three different area codes in Galleon and the proper local radar image was retrieved each time. Of course, I can&#8217;t stop weather.com from changing their layout again, but this should work for now.<\/p>\n<p>You can download my new <span class=\"removed_link\" title=\"https:\/\/www.windracer.net\/outgoing\/tc\/weather.jar\">weather.jar<\/span> file and place it in the apps directory where Galleon is installed. I also posted about my fix on the TiVo Community Forum <a href=\"https:\/\/www.tivocommunity.com\/community\/index.php?threads\/galleon-2-5-1-is-now-available.368059\/page-7#post6462628\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks ago, the Local Radar screen in Galleon&#8216;s weather application started showing &#8220;N\/A&#8221; instead of the image from weather.com. Galleon has been dormant, development-wise, for a while. It was updated late last year with some bug fixes and HD support by s2kdave and jtkohl, but has lapsed into the realm of unsupported (but &#8230;<\/p>\n<p><a href=\"https:\/\/www.windracer.net\/blog\/2008\/07\/fix-for-local-radar-image-in-galleons-weather-app\/\" class=\"more-link\">Continue reading &lsquo;Fix for local radar image in Galleon&#8217;s weather app&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[15,26],"tags":[17,31],"class_list":["post-80","post","type-post","status-publish","format-standard","hentry","category-software","category-tivo","tag-code","tag-weather"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/posts\/80","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":0,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}