[Overlay] Google Weather Icon Overlay

Started by brotbuexe, August 01, 2013, 17:07:18

0 Members and 1 Guest are viewing this topic.

john_percy

#15
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!
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

tjej01

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!
  •  

eldron

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.
  •  

john_percy

#18
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.

<?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>
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

wvb

Quote from: john_percy on September 17, 2013, 23:30:32
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

  •  

tjej01

John-Percy,,,,thank you very much for the assistance.
  •