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

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 698
  • Thanked: 96 times
    • View Profile
  • Device: MotoG
Re: [Overlay] Google Weather Icon Overlay
« Reply #15 on: September 17, 2013, 13:06:22 »
But now I'm getting a Locus message "More than 1000 tiles was not saved or loaded correctly..." on all these Google weather overlays, with the number increasing by 1000s at a time. There's no error with other overlays (like Hike & Bike Hillshade). Is there something fundamentally wrong with this code?

Edit: I found that the problem was that the name I had given to the map "Weather: Clouds and Icons" was used as a filename, so the colon ( : ) was illegal. Now I have changed it to  "Weather - Clouds and Icons" and all is well!
« Last Edit: September 17, 2013, 23:36:14 by john_percy »
 

Offline tjej01

  • More than Newbie
  • *
  • Posts: 22
    • View Profile
Re: [Overlay] Google Weather Icon Overlay
« Reply #16 on: September 17, 2013, 22:26:11 »
Very newbie question..looked in history and didn't find an answer......

Where does one put this code?

Maybe it is if you have to ask then don't try!
 

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 #17 on: September 17, 2013, 22:39:53 »
You have to edit the providers.xml.
If i remember correctly you will find it in locus\mapsonline\custom .
Just make sure to create a backup copy before you edit that file.
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 698
  • Thanked: 96 times
    • View Profile
  • Device: MotoG
Re: [Overlay] Google Weather Icon Overlay
« Reply #18 on: September 17, 2013, 23:30:32 »
Better to make another file (say) providers-overlays.xml and place in that directory. This will be read as well as the standard providers.xml from Locus tweaks and avoids any problems of messing up the original file.

Edit: Attached is my providers-overlays.xml file. Download it and drop it into the locus\mapsonline\custom folder. It includes my modified versions of the various methods suggested so far. Remember to set the "Valid for" to 1 hour for the weather and 0 for the Traffic, as described previously. There are a number of overlay versions (Traffic, Clouds, Icons, Clouds and Icons, Icons and Clouds, of which the last one can give lots of missing tiles - though setting "Valid for" to 0 for this one  vastly improves this) and a standalone map, which appears under Google in the map dialogue.

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
    <providers>
          <provider id="11701" type="0" visible="true" background="-1">
          <name>Overlays</name>
          <mode>Traffic</mode>
          <area></area>
          <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&lyrs=traffic&x={x}&y={y}&z={z}&style=15&w=256&h=256]]></url>
            <serverPart>0;1;2;3</serverPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>12</zoomMin>
          <zoomMax>23</zoomMax>
          <tileSize>256</tileSize>
          <attribution><![CDATA[(c)2013 Google]]></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="11704" type="0" visible="true" background="-1">
          <name>Overlays</name>
          <mode>Clouds</mode>
          <area></area>
          <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&lyrs=weather_0cloud&src=app&x={x}&y={y}&z={z}&s=Galileo]]></url>
          <serverPart>0;1;2;3</serverPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>14</zoomMax>
          <tileSize>256</tileSize>
          <attribution><![CDATA[(c)2013 Google]]></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>Weather Icons</mode>
          <area></area>
          <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&x={x}&y={y}&z={z}&s=Galileo&lyrs=weather_c_mph|invert:1&s=Galileo]]></url>
          <serverPart>0;1;2;3</serverPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>26</zoomMax>
          <tileSize>256</tileSize>
          <attribution><![CDATA[(c)2013 Google]]></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="-1">
        <name>Overlays</name>
        <mode>Clouds and Icons</mode>
          <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&x={x}&y={y}&z={z}&s=Galileo&lyrs=weather_0cloud,weather_c_mph|invert:1&s=Galileo]]></url>
        <serverPart>0;1;2;3</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>26</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2013 Google]]></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="11711" type="0" visible="false" required="false" background="-1">
        <name>Overlays</name>
        <mode>Clouds base</mode>
        <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&x={x}&y={y}&z={z}&lyrs=weather_0cloud&s=Galileo]]></url>
        <serverPart>0;1;2;3</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>14</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2013 Google]]></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>Icons and Clouds</mode>
        <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&x={x}&y={y}&z={z}&lyrs=weather_c_mph|invert:0&s=Galileo]]></url>
        <serverPart>0;1;2;3</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>26</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2013 Google]]></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="11713" type="0" visible="false" required="false" background="-1">
        <name>Google</name>
        <mode>Satellite and Clouds</mode>
        <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&x={x}&y={y}&z={z}&lyrs=s,h@1,weather_nolabels,weather_0cloud&s=Galileo]]></url>
        <serverPart>0;1;2;3</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>14</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2013 Google]]></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="11714" type="0" visible="true" background="11713">
        <name>Google</name>
        <mode>Weather Satellite</mode>
        <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&x={x}&y={y}&z={z}&lyrs=weather_c_mph|invert:0&s=Galileo]]></url>
        <serverPart>0;1;2;3</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>26</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2013 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 19, 2013, 13:42:36 by john_percy »
 

Offline wvb

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 218
    • View Profile
  • Device: Z1, Nexus 7, TrueSmart
Re: [Overlay] Google Weather Icon Overlay
« Reply #19 on: September 19, 2013, 19:38:53 »
Edit: Attached is my providers-overlays.xml file.

thanks a lot for this!
Never got around don't to copy pasting it :-)
Now I can finally start discovering the Overlay functionality :-)

Sent from my GT-I9100 using Tapatalk 4

 

Offline tjej01

  • More than Newbie
  • *
  • Posts: 22
    • View Profile
Re: [Overlay] Google Weather Icon Overlay
« Reply #20 on: September 20, 2013, 05:00:08 »
John-Percy,,,,thank you very much for the assistance.