Skip to main content
edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
added 483 characters in body
Source Link

QGIS allows us to use any HTML in the map tip which can be used to show a corresponding image for a hovered feature in the map.

Example of such a code in the map tip definition:

<img src="http://imageserver.com/images/features/[% "id" %]" width="600"></img>

However, the server resource may require authentication. How to satisfy the server authentication requirement from the QGIS? How to supply the required credentials to be used in the image request?

Our server uses the basic authentication.

What I have tried:

  1. Just let show the map tip in hope that QGIS prompts a login dialog. It did not happen.

  2. I provided the authentication credentials in the "Options / Authentication" for the same base URL but it does not work. The QGIS seems to not respect the options. enter image description here

I am still not getting the picture but just an error image placeholder: enter image description here

I can clearly see from the server logs the requests are not authenticated and resulting in the 401 HTTP error.

EDIT 2 If you want to experiment, here is a simple Python script which is a HTTP web server with a basic authentication and hardcoded user "demouser" and password "demopass".

https://pastebin.com/vSQ9Le3C

Start the script python .\imgsrv.py. The server listens on http://localhost:8090/ and returns an image from the Pixabay.

Unfortunately, even this map tip in QGIS with this server does not work: <img src="http://demouser:demopass@localhost:8090"></img>

QGIS allows us to use any HTML in the map tip which can be used to show a corresponding image for a hovered feature in the map.

Example of such a code in the map tip definition:

<img src="http://imageserver.com/images/features/[% "id" %]" width="600"></img>

However, the server resource may require authentication. How to satisfy the server authentication requirement from the QGIS? How to supply the required credentials to be used in the image request?

Our server uses the basic authentication.

What I have tried:

  1. Just let show the map tip in hope that QGIS prompts a login dialog. It did not happen.

  2. I provided the authentication credentials in the "Options / Authentication" for the same base URL but it does not work. The QGIS seems to not respect the options. enter image description here

I am still not getting the picture but just an error image placeholder: enter image description here

I can clearly see from the server logs the requests are not authenticated and resulting in the 401 HTTP error.

QGIS allows us to use any HTML in the map tip which can be used to show a corresponding image for a hovered feature in the map.

Example of such a code in the map tip definition:

<img src="http://imageserver.com/images/features/[% "id" %]" width="600"></img>

However, the server resource may require authentication. How to satisfy the server authentication requirement from the QGIS? How to supply the required credentials to be used in the image request?

Our server uses the basic authentication.

What I have tried:

  1. Just let show the map tip in hope that QGIS prompts a login dialog. It did not happen.

  2. I provided the authentication credentials in the "Options / Authentication" for the same base URL but it does not work. The QGIS seems to not respect the options. enter image description here

I am still not getting the picture but just an error image placeholder: enter image description here

I can clearly see from the server logs the requests are not authenticated and resulting in the 401 HTTP error.

EDIT 2 If you want to experiment, here is a simple Python script which is a HTTP web server with a basic authentication and hardcoded user "demouser" and password "demopass".

https://pastebin.com/vSQ9Le3C

Start the script python .\imgsrv.py. The server listens on http://localhost:8090/ and returns an image from the Pixabay.

Unfortunately, even this map tip in QGIS with this server does not work: <img src="http://demouser:demopass@localhost:8090"></img>

Became Hot Network Question
Tweeted twitter.com/StackGIS/status/1399470758250885122
added 385 characters in body
Source Link

QGIS allows us to use any HTML in the map tip which can be used to show a corresponding image for a hovered feature in the map.

Example of such a code in the map tip definition:

<img src="http://serverimageserver.namecom/images/features/[% "id" %]" width="600"></img>

However, the server resource may require authentication. How to satisfy the server authentication requirement from the QGIS? How to supply the required credentials to be used in the image request?

Our server uses the basic authentication.

What I have tried to provide authentication credentials in the "Options / Authentication" for:

  1. Just let show the map tip in hope that QGIS prompts a login dialog. It did not happen.

  2. I provided the authentication credentials in the "Options / Authentication" for the same base URL but it does not work. The QGIS seems to not respect the options. enter image description here

I am still not getting the same base URLpicture but it doesjust an error image placeholder: enter image description here

I can clearly see from the server logs the requests are not workauthenticated and resulting in the 401 HTTP error. Is it supposed to work?

QGIS allows us to use any HTML in the map tip which can be used to show a corresponding image for a hovered feature in the map.

Example of such a code in the map tip definition:

<img src="http://server.name/images/features/[% "id" %]" width="600"></img>

However, the server resource may require authentication. How to satisfy the server authentication requirement from the QGIS? How to supply the required credentials to be used in the image request?

Our server uses the basic authentication. I tried to provide authentication credentials in the "Options / Authentication" for the same base URL but it does not work. Is it supposed to work?

QGIS allows us to use any HTML in the map tip which can be used to show a corresponding image for a hovered feature in the map.

Example of such a code in the map tip definition:

<img src="http://imageserver.com/images/features/[% "id" %]" width="600"></img>

However, the server resource may require authentication. How to satisfy the server authentication requirement from the QGIS? How to supply the required credentials to be used in the image request?

Our server uses the basic authentication.

What I have tried:

  1. Just let show the map tip in hope that QGIS prompts a login dialog. It did not happen.

  2. I provided the authentication credentials in the "Options / Authentication" for the same base URL but it does not work. The QGIS seems to not respect the options. enter image description here

I am still not getting the picture but just an error image placeholder: enter image description here

I can clearly see from the server logs the requests are not authenticated and resulting in the 401 HTTP error.

Source Link
Loading