1

I would like to send requests from a webbrowser to QGIS-desktop, For example sending a WMS or WFS URL and add that in QGIS.

What options does it exist for this ? I have in earlier systems doen this intgration through a database table that the browser saves information into and that ArcGIS-desktop reads from. That are though a quite Heavy solution.

Would it be possible to run QGIS-desktop as a tiny webbserver on a port like 8090 and let QGIS accept incling requests from the browser like http://localhost:8090/addLayer?URL=http://www.mywms.se/aWMSServer

Using something like whats discussed in:

https://ruslanspivak.com/lsbaws-part1/

I have also previsouly tested in a .net application to start the webbrowser within a .net application as host. Then I could call back to parent application with windows.external in Javascript. But maybe that is only working for Internet Explorer and .Net desktop applications.

Anyone have an idea or better (modern) idea for communication between browser and a desktop app?

/Michael

  • 2
    Strange to see that you try to do. QGIS like http server are the QGIS Server or NextGIS Web solution, where you can call REST API to create, modify or delete layers to/from map. Please explain what are you try to achieve. – Dmitry Baryshnikov Nov 9 '17 at 7:49
  • I'm not interested in serving data. I want to be able to be able to preview WFS services or add a referenced OWS-file from a catalog and show that in QGIS. I find service-URLs im interested in on a website and want to show these in QGIS. – Michael Östling Nov 11 '17 at 18:29
  • It seems to me QuickMapServices plugin does the same (plugins.qgis.org/plugins/quick_map_services). Anyhow you can use python requests module for HTTP requests in your own plugin. – Dmitry Baryshnikov Nov 13 '17 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.