Author Topic: [Overlay] Google Weather Icon Overlay  (Read 7154 times)

Offline brotbuexe

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 148
  • Thanked: 1 times
    • View Profile
[Overlay] Google Weather Icon Overlay
« on: August 01, 2013, 17:07:18 »
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<providers>
      <provider id="11704" type="0" visible="true" background="-1">
      <name>Overlays</name>
      <mode>Google Weather Icons</mode>
      <area></area>
      <url><![CDATA[http://mts{s}.google.com/mapslt?&x={x}&y={y}&z={z}&s=Galileo&lyrs=weather_c_kph|invert:1&w=256&h=256]]></url>
      <serverPart>0;1</serverPart>
      <zoomPart>{z}-8</zoomPart>
      <zoomMin>8</zoomMin>
      <zoomMax>20</zoomMax>
      <tileSize>256</tileSize>
      <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
      <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
      <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
   </provider>
</providers>

[attachment=0:fjpf1grp]Screenshot_2013-08-01-17-05-47.png[/attachment:fjpf1grp]
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline brotbuexe

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 148
  • Thanked: 1 times
    • View Profile
Re: [Overlay] Google Weather Icon Overlay
« Reply #1 on: August 01, 2013, 17:20:13 »
This is fun.

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<providers>
   <provider id="11704" type="0" visible="true" background="-1">
      <name>Overlays</name>
      <mode>Google Weather Icons</mode>
      <area></area>
      <url><![CDATA[http://mts{s}.google.com/mapslt?&x={x}&y={y}&z={z}&s=Galileo&lyrs=weather_c_kph|invert:1&w=256&h=256]]></url>
      <serverPart>0;1</serverPart>
      <zoomPart>{z}-8</zoomPart>
      <zoomMin>8</zoomMin>
      <zoomMax>20</zoomMax>
      <tileSize>256</tileSize>
      <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
      <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
      <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
   </provider>
   <provider id="11705" type="0" visible="true" background="-1">
      <name>Overlays</name>
      <mode>Google Weather Clouds</mode>
      <area></area>
      <url><![CDATA[http://mts{s}.google.com/vt/lyrs=weather_0cloud&hl=de&src=app&x={x}&y={y}&z={z}&s=Galile]]></url>
      <serverPart>0;1</serverPart>
      <zoomPart>{z}-8</zoomPart>
      <zoomMin>8</zoomMin>
      <zoomMax>15</zoomMax>
      <tileSize>256</tileSize>
      <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
      <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
      <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
   </provider>
   <provider id="11706" type="0" visible="true" background="11705">
      <name>Overlays</name>
      <mode>Google Weather Icons and Clouds</mode>
      <area></area>
      <url><![CDATA[http://mts{s}.google.com/mapslt?&x={x}&y={y}&z={z}&s=Galileo&lyrs=weather_c_kph|invert:1&w=256&h=256]]></url>
      <serverPart>0;1</serverPart>
      <zoomPart>{z}-8</zoomPart>
      <zoomMin>8</zoomMin>
      <zoomMax>20</zoomMax>
      <tileSize>256</tileSize>
      <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
      <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
      <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
   </provider>
</providers>

Don't understand the strange behaviour when using the cloud overlay mit SRC_ATOP mode. See screenshots.

[attachment=0:23t7l4l6]Screenshot_2013-08-01-17-18-16.png[/attachment:23t7l4l6]

What else does google maps have?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline brotbuexe

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 148
  • Thanked: 1 times
    • View Profile
Re: [Overlay] Google Weather Icon Overlay
« Reply #2 on: August 01, 2013, 17:23:38 »
Looks like my combination of clouds and icons into one custom map does not work well with the overlay function.
When I use only the cloud layer it looks fine.
So you have to switch between icons and clouds.

Keep in mind, clouds only until zoom level 6. Icons only until 12.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline brotbuexe

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 148
  • Thanked: 1 times
    • View Profile
Re: [Overlay] Google Weather Icon Overlay
« Reply #3 on: August 01, 2013, 17:59:25 »
[attachment=1:3hre3g7o]Screenshot_2013-08-01-17-57-52.jpg[/attachment:3hre3g7o]

[attachment=0:3hre3g7o]Screenshot_2013-08-01-17-57-24.jpg[/attachment:3hre3g7o]
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline ta-ka

  • Premium
  • Padavan of Locus
  • ***
  • Posts: 250
  • Thanked: 3 times
    • View Profile
  • Device: SGNoteEdge
Re: [Overlay] Google Weather Icon Overlay
« Reply #4 on: September 10, 2013, 19:20:34 »
Hi, brotbuexe. Thank you for the information. After some trial and error,
I've successfully managed to overlay both clouds and weather icons onto map.



EDIT:
The code here was wrong. So deleted. Corrected code can be found below.
« Last Edit: September 10, 2013, 21:13:33 by ta-ka »
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1898
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: [Overlay] Google Weather Icon Overlay
« Reply #5 on: September 10, 2013, 19:34:23 »
I see the pictures, but what is to do? With your extract of the providers.xml I only get the weather icons, but no clouds.  :'(
Regards J.
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 699
  • Thanked: 96 times
    • View Profile
  • Device: MotoG
Re: [Overlay] Google Weather Icon Overlay
« Reply #6 on: September 10, 2013, 19:47:08 »
Me too. No clouds with this xml file, I'm afraid.

The good news is that the latest version of Locus works with the overlays at all zooms. So the clouds are zoom with the map (fine) and the  icons similarly (not so fine, but useful)

 

Offline ta-ka

  • Premium
  • Padavan of Locus
  • ***
  • Posts: 250
  • Thanked: 3 times
    • View Profile
  • Device: SGNoteEdge
Re: [Overlay] Google Weather Icon Overlay
« Reply #7 on: September 10, 2013, 19:56:39 »
Hmm...may be this? I can see clouds up to zoom level 6, too.

Keep in mind, clouds only until zoom level 6. Icons only until 12.
 

Offline ta-ka

  • Premium
  • Padavan of Locus
  • ***
  • Posts: 250
  • Thanked: 3 times
    • View Profile
  • Device: SGNoteEdge
Re: [Overlay] Google Weather Icon Overlay
« Reply #8 on: September 10, 2013, 21:05:25 »
Please change zoomMax to '14' and try again. Sorry for that.
I confirmed that both clouds and icons are shown with scaled size above zoom level 7.
It worked with Locus test version 2.14.1.11 on Galaxy Note 2. But it didn't work with Locus Pro 2.15.1.
EDIT:
Enabling [Automatic Zoom-lock] in [Settings]->[Map - control & panels], clouds and icons are scaled
for both test and pro version.



Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<providers>
    <provider id="11707" type="0" visible="true" background="-1">
        <name>Google Weather</name>
        <mode>Clouds and Weather Icons</mode>
        <url><![CDATA[http://mts{s}.google.com/vt/x={x}&y={y}&z={z}&lyrs=weather_c_kph|invert:0,weather_0cloud]]></url>
        <serverPart>0;1</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>14</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
        <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
    </provider>
</providers>
« Last Edit: September 11, 2013, 20:52:37 by ta-ka »
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1898
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: [Overlay] Google Weather Icon Overlay
« Reply #9 on: September 10, 2013, 22:25:14 »
Ah, ok. It works with zoom level 6 max.
Thank you for your hints. Above zoom level 6 the clouds disappear.
Regards J.
 

Offline eldron

  • Apprentice of Locus
  • **
  • Posts: 232
  • Thanked: 4 times
    • View Profile
  • Device: Galaxy Ace 2 (Android 4.4.4 - CM11)
Re: [Overlay] Google Weather Icon Overlay
« Reply #10 on: September 11, 2013, 15:29:33 »
This looks very interesting. Before i try it out i was wondering how practical it is?
How do you get the map to refresh? Won´t Locus just cache the map and thereby prevent refreshing by unloading and loading the map?
How could i know how old the data is that i am looking at? I mean other than by comparing my thermometer with the temparature on the map ;-)

 

Offline berkley

  • Premium
  • Master of Locus
  • ****
  • Posts: 900
    • View Profile
  • Device: 1+1, N7
Re: [Overlay] Google Weather Icon Overlay
« Reply #11 on: September 11, 2013, 19:06:41 »
Click on the tools sign, before you choose your map and hit "Set 'valid for' "


Then you enter a zero in the popup. Now you always get the newest tiles.
Search before posting!!!
XDA Orbit, HTC Touch HD, SGS1, SGS2, Nexus S, S4 Active, OnePlus One, Innos D6000
OnePlus X
 

Offline eldron

  • Apprentice of Locus
  • **
  • Posts: 232
  • Thanked: 4 times
    • View Profile
  • Device: Galaxy Ace 2 (Android 4.4.4 - CM11)
Re: [Overlay] Google Weather Icon Overlay
« Reply #12 on: September 12, 2013, 08:59:49 »
What a cool feature. Just tried it out and it looks great.
Thanks to you guys for showing us how to implement this!
The only problem is that the cloud layer is above the icon layer, making it very difficult to see the icons and temparature when there are clouds above that area. Is there any way of improving that? Maybe by changing the layers around so that the icon layer is above the cloud layer?
 

Offline ta-ka

  • Premium
  • Padavan of Locus
  • ***
  • Posts: 250
  • Thanked: 3 times
    • View Profile
  • Device: SGNoteEdge
Re: [Overlay] Google Weather Icon Overlay
« Reply #13 on: September 12, 2013, 17:41:05 »
The only problem is that the cloud layer is above the icon layer, making it very difficult to see the icons and temparature when there are clouds above that area. Is there any way of improving that? Maybe by changing the layers around so that the icon layer is above the cloud layer?

There is an another way to overlay clouds and icons onto maps. This method doesn't use Map-Overlays function. Instead, the map with clouds and icons is simply treated as one of online map.  The icons can be clearly seen even over the clouds however the clouds are only visible up to zoom level 6.

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
    <provider id="11708" type="0" visible="false" background="-1">
        <name>Google Weather</name>
        <mode>Satellite</mode>
        <url><![CDATA[http://mts{s}.google.com/vt/x={x}&y={y}&z={z}&lyrs=s,h@1,weather_nolabels]]></url>
        <serverPart>0;1</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>23</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
        <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
    </provider>
    <provider id="11709" type="0" visible="false" background="11708">
        <name>Google Weather</name>
        <mode>Clouds on Satellite</mode>
        <url><![CDATA[http://mts{s}.google.com/vt/x={x}&y={y}&z={z}&lyrs=weather_0cloud]]></url>
        <serverPart>0;1</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>14</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
        <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
    </provider>
    <provider id="11710" type="0" visible="true" background="11709">
        <name>Google Weather</name>
        <mode>Clouds and Weather Icons on Satellite</mode>
        <url><![CDATA[http://mts{s}.google.com/mapslt?x={x}&y={y}&z={z}&lyrs=weather_c_kph|invert:0]]></url>
        <serverPart>0;1</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>23</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
        <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
    </provider>
</providers>
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 699
  • Thanked: 96 times
    • View Profile
  • Device: MotoG
Re: [Overlay] Google Weather Icon Overlay
« Reply #14 on: September 16, 2013, 10:41:46 »
If you set the "Valid for" to zero for the above, then the satellite image has to be loaded every time, which won't help your bandwidth!
In the overlay version some posts previously, the icons enlarge ridiculously past zoom 6, so how about an overlay like this:
Code: [Select]
    <provider id="11711" type="0" visible="false" background="-1">
        <name>Overlays</name>
        <mode>Clouds</mode>
        <url><![CDATA[http://mts{s}.google.com/vt/x={x}&y={y}&z={z}&lyrs=weather_0cloud]]></url>
        <serverPart>0;1</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>14</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
        <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
    </provider>
    <provider id="11712" type="0" visible="true" background="11711">
        <name>Overlays</name>
        <mode>Weather - Clouds and Icons</mode>
        <url><![CDATA[http://mts{s}.google.com/mapslt?x={x}&y={y}&z={z}&lyrs=weather_c_kph|invert:0]]></url>
        <serverPart>0;1</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>23</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2011 Google - Map data (c)2011 Tele Atlas]]></attribution>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
        <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
    </provider>
Clouds only appear up to zoom 6, which seems the most usable arrangement, as they then do not obscure map detail when you want it.
The "Clouds" layer 11711 in my code above does not appear in the Locus menu, but is used to build the overlay.
PS It might be best to set "Valid for" to 1 hour in any case, as weather really doesn't change that quickly, even in England.
« Last Edit: September 16, 2013, 10:57:21 by john_percy »