<div dir="ltr">hello<div><br></div><div>i try to use 

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">XYZ tiles Service:<span> </span></span><a href="https://tile.openweathermap.org/map/%7Blayer%7D/%7Bz%7D/%7Bx%7D/%7By%7D.png?appid={api_key}" rel="noreferrer" target="_blank" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">https://tile.openweathermap.<wbr>org/map/{layer}/{z}/{x}/{y}.<wbr>png?appid={api_key}</a>  (using layer name and my key like docs) but dont add me layer is empty,any idea why ?</div><div>and i am sure that is not real time is a static map correct ?</div><div><br></div><div>thank for rensponse<br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-04-24 11:29 GMT+03:00 Michel Stuyts <span dir="ltr"><<a href="mailto:michel.stuyts@edegem.be" target="_blank">michel.stuyts@edegem.be</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OpenWeatherMap deprecated WMS support. You should use their XYZ tiles Service: <a href="https://tile.openweathermap.org/map/{layer}/{z}/{x}/{y}.png?appid={api_key}" rel="noreferrer" target="_blank">https://tile.openweathermap.<wbr>org/map/{layer}/{z}/{x}/{y}.<wbr>png?appid={api_key}</a><br>
<br>
More info on: <a href="https://openweathermap.org/api/weathermaps" rel="noreferrer" target="_blank">https://openweathermap.org/<wbr>api/weathermaps</a><br>
<br>
Michel<br>
<span class=""><br>
On 23 April 2018 at 21:28, Xristos Xristoou <<a href="mailto:saxri89@gmail.com">saxri89@gmail.com</a><mailto:<a href="mailto:saxri89@gmail.com">saxr<wbr>i89@gmail.com</a>>> wrote:<br>
<br>
I would like to add in QGIS real time weather data.<br>
<br>
</span>I found this link<<a href="https://www.packtpub.com/mapt/book/application_development/9781783984985/5/ch05lvl1sec98/adding-real-time-weather-data-from-openweathermap" rel="noreferrer" target="_blank">https://www.packtpub.com/<wbr>mapt/book/application_<wbr>development/9781783984985/5/<wbr>ch05lvl1sec98/adding-real-<wbr>time-weather-data-from-<wbr>openweathermap</a>> and this link<<a href="https://www.gislounge.com/adding-real-time-weather-data-from-openweathermap-qgis-python-programming-cookbook/" rel="noreferrer" target="_blank">https://www.gislounge.<wbr>com/adding-real-time-weather-<wbr>data-from-openweathermap-qgis-<wbr>python-programming-cookbook/</a>> and I tried to follow the example, but without any success.<br>
<span class=""><br>
I've added a WMS weather data layer for precipitation to the QGIS map, as follows:<br>
<br>
First, the parameters for the service:<br>
<br>
service = 'crs=EPSG:900913&dpiMode=7&<wbr>featureCount=10&format=image/<wbr>png&layers=precipitation&<wbr>styles=&url=<a href="http://wms.openweathermap.org/service" rel="noreferrer" target="_blank">http://wms.<wbr>openweathermap.org/service</a>'<br>
<br>
Next, create the raster layer, specifying WMS as the type:<br>
<br>
rlayer = QgsRasterLayer(service, "precip", "wms")<br>
<br>
Finally, add the precipitation layer to the map:<br>
<br>
QgsMapLayerRegistry.instance()<wbr>.addMapLayers([rlayer])<br>
<br>
the example didn't show any error in the code and no data was added to the weather layer either, I'm not sure why?<br>
<br>
<br>
______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
</span><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><<wbr>mailto:<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.<wbr>org</a>><br>
<div class="HOEnZb"><div class="h5">List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
<br>
</div></div></blockquote></div><br></div>