Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
yjin
Contributor II
Contributor II

Map chart background layer questions

I am trying to use custom image as map chart background for Qlik Cloud.  I have whitelisted the 3rd party website URL under "Content Security Policy," but the map chart still comes up blank. 

  1. How do I know if I have configured the whitelist correctly? Is there a way to test/verify this?
  2. Is there a way to upload the image and use it "locally" to bypass the default security restriction?
  3. Under Background layer->Data, What are the "image position" lat lng values refer to?  If I set the upper left to (100, 0) and lower right to (0, 100). Does this scale the image to 100x100, or does it crop the image to only display first 100x100 pixels?  Do these values' unit relates to "Map settings" unit (degree or meter)?

 

Thank you!

Labels (2)
1 Solution

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello @yjin,

 

I think natively this is not supported. The only as close as possible functionality that I was able to find is "Auto-zoom". You can go to Map settings and uncheck the "Auto-zoom" option. After that you can set the default view to where you want it to be. However, it might not cover the exact use case scenario that you need. In this case, you can submit a feature request [1] and elaborate in details as to why this is going to be beneficial for you and for other users. 

 

---

[1] https://community.qlik.com/t5/Knowledge-Base/How-To-Submit-Feature-Requests-For-Qlik-Products/ta-p/1...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

8 Replies
Patricia_Silva
Specialist II
Specialist II

Hello @yjin, could you please check with the developer tools on your browser if there is any kind of error? If so, could you please attach a screenshot? Thank you!

Help users find answers! Don't forget to mark a correct resolution 🙂
yjin
Contributor II
Contributor II
Author

Hi @Patricia_Silva ,  there's no error on FireFox (but the Network tab also doesn't show Qlik is requesting any URL from upload.wikimedia.org).  I got the following error on Chrome when opening the page containing map chart with background image directly.

yjin
Contributor II
Contributor II
Author

Ok, after deleted and redid the map chart, I found the problem isn't the image wasn't loaded into Qlik. The problem is I used "User defined projection (meters)"  and the image went to an unknown/invisible region.  That brought me 2 other questions:

  1. Is there a way to center and auto-zoom on the custom background image?
  2. A detailed explanation of the how to set upper left and lower right coordinates of the custom image in background layer?

Thanks!

Andrei_Cusnir
Specialist
Specialist

Hello @yjin,

 

The suggestion that @Patricia_Silva has provided is very important as it will help you identify if the URL was properly whitelisted. I can see that you have already confirmed that the issue is not because the image is not loaded but because the zoom level is wrong. Allow me to elaborate in detail to the questions that you have raised initially:

  1. Adding to what Patricia has already shared, you can use the Developers Console to identify if the URL is whitelisted properly. If there some issues then you will get an error message stating "Refused to load the image" and it will also state which policy is causing the issue, such as "img-src" for example. With these details, you can go back to the Content Security Policy section and check the policy that is causing the issue.
  2.  Answer for your second question can be found in this post [1]
  3. The question regarding the values is also addressed in the same post [1]. You can just read through the comments and you should find the answers there.

Now in your particular use case scenario, as you have also already confirmed, the issue is not related to image failing to load, but due to zoom level being super far. This can also be seen from the Scale bar that will show you "1000km" and if you zoom all the way in, you will notice that the image is actually visible. Under "Appearance > Presentation > Limit zoom levels", you can check the switch option and limit the zoom to 17 - 20. This should show you the image that you have specified. 

 

I hope that this information was helpful.

---

[1] https://community.qlik.com/t5/Qlik-Sense-Documents/Adding-a-background-layer-in-Qlik-Sense-maps/ta-p...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
yjin
Contributor II
Contributor II
Author

@Andrei_Cusnir 

Thanks for explanation and link, those will be helpful as I move to use advanced features in the future.  I think the problem with user defined meter projection is user has natural inclination of use 0,0 based coordinate, and the map was not defaulted to that location at the beginning.  If I change the map to none before moving to 0,0 and projection to meter, I will never able to find the background image due to relative scale of the map and image. 

One last question, is there a way to manually set the default view/coordinate in Edit mode ?  I need a better and more precise way to navigate map charts.

Andrei_Cusnir
Specialist
Specialist

Hello,

 

I understand that this can be a little bit confusing, therefore if you have some recommendations on how to improve Map charts functionality you can submit a feature request [1].

 

Regarding your last question, I am not 100% sure if I have understood properly the use case scenario. Are you looking to limit the default zoom level of the Map chart? To ensure that the user is not going to zoom out completely and loose the image from the view? In case I have misunderstood the use case scenario, please provide some further details. 

---

[1] https://community.qlik.com/t5/Knowledge-Base/How-To-Submit-Feature-Requests-For-Qlik-Products/ta-p/1...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
yjin
Contributor II
Contributor II
Author

@Andrei_Cusnir ,  I meant a way for me to manually enter specific lat, lng in Edit Sheet mode, so map chart can center at said location (such as 0,0 which is likely to be the lower left of  a custom image background).  Thanks!

Andrei_Cusnir
Specialist
Specialist

Hello @yjin,

 

I think natively this is not supported. The only as close as possible functionality that I was able to find is "Auto-zoom". You can go to Map settings and uncheck the "Auto-zoom" option. After that you can set the default view to where you want it to be. However, it might not cover the exact use case scenario that you need. In this case, you can submit a feature request [1] and elaborate in details as to why this is going to be beneficial for you and for other users. 

 

---

[1] https://community.qlik.com/t5/Knowledge-Base/How-To-Submit-Feature-Requests-For-Qlik-Products/ta-p/1...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂