[Qgis-user] Refresh layer at interval
Aron Gergely
aron.gergely at rasterra.nl
Mon Nov 2 01:31:11 PST 2020
Hi Robert,
I do not know the answer to your question, but I think you are asking in
the wrong list.
You may have better success on `qgis-developer` (I added it in, so this
is getting cross-posted)
On 01/11/2020 21:24, nagyrobi_r at yahoo.com wrote:
>
> Hi All!
>
> I am trying to understand the behavior of Layer->Render-> Refresh
> layer at interval in QGIS
>
> 1. I sat up a flask rest api which serves a geojson.
> 2. I added the geojson to QGIS via Add Layer->
> 1. a. Protocol HTTP/cloud/etc
> 2. b. Type: HTTP
> 3. c.URI: localhost/points.geojson The points are represented
> on the map correctly
> 3. I changed the layer->Properties->Rendering-> Refresh layer at
> interval (5 sec)
>
> I would have expected that there would be a call every 5 seconds
> towards the server and the map data would be updated accordingly.
> But the layer does not get refreshed. I don't see any changes
> neither when I remove a point from the json file on my local
> drive, nor if I change an attribute. If I press F5 then the canvas
> refreshes and it automatically loads the new data and I can see
> the changes. Is this the behavior that is wanted or am I
> misunderstanding the function of this tool? It seems like the data
> is cached somewhere?
>
> |from flask import Flask from flask_restful import Api, Resource
> import json app = Flask(__name__) api = Api(app) class
> point(Resource): def get(self): with
> open('C:/points/venv/src/points.geojson') as json_file: data =
> json.load(json_file) return data
> api.add_resource(point,"/points.geojson") if __name__=="__main__":
> app.run(debug=True)|
>
> |Robert Nagy|
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
--
Email Signature Kind Regards,
Aron Gergely
+31 (0) 6 38 70 97 66
*Rasterra* | www.rasterra.nl <https://www.rasterra.nl>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201102/cca39382/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aron_gergely.vcf
Type: text/x-vcard
Size: 4 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201102/cca39382/attachment-0001.vcf>
More information about the Qgis-user
mailing list