Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SVG Map Issues

Hello, I have an issue with SVG Maps and wondered if someone had a solution? I have a document with the SVG on tab number 4 or 5. When I first open the document the map shows. If I move off the tab and return the map is blank. (Sensitive data so only photos at present). I can only get it to reappear if I open its properties and tick / untick a box or switch webview off then on again. (neither an option if deployed to a server. I am reluctant to upgrade to IE11 as colleagues have had different issues at the version. I have downloaded SVG 1.10 and created my map again but still the same issue.

IE10.0.92 / Windows 8.0 / .net framework v4.0.30319

before moving off page

svgbefore.JPG.jpg

after moving off and returning to the page

svgafter.JPG.jpg

20 Replies
Not applicable
Author

Dear Brian,

when I change to another worksheet via the tabrow everything is fine.

But when I use buttons with action "Activate Sheet" the map is blank.

Can you reproduce? Am I missing something?

Alexander_Thor
Employee
Employee

I quickly looked it over and it seems related to this block in script.js

if (!window["ref" + r]) {

  window["ref" + r] = "no"

}

$(".qvtr-tabs li").click(function () {

  if ($(this).attr("class") != "selectedtab" && $(this).attr("id") == t) {

                window["ref" + r] = "yes"

        }

});

As a temporary fix try to just comment that block out, line 429, and replace it with

window["ref" + r] = "yes"

The click event handler won't fire as you are not switching sheets through the tabrow but instead through actions.

( Ping bmz )

Not applicable
Author

Hi Alexander, thanks for the help, your answer saved lots and lots of hours !

And it works!

Not applicable
Author

That does the job, thank you!

Not applicable
Author

Hey Alex

I was wondering if you could provide a little bit more context in terms of the scripting, or a screenshot of the revised script itself. Am I supposed to comment out the entire block of script and replace it with  window["ref" + r] = "yes"?



Not applicable
Author

Where is the file script.js?

In the file script.js (folder C:\ProgramData\QlikTech\QlikViewServer\Extensions\Objects\svgMap), I don't find these liens

manisha_qlik
Contributor
Contributor

Hi,

I am facing same problem. Whenever I am using Tab, SVG Map for US states are working fine. But if I navigating using buttons from tab to tab, it is not working. I also modified Script.js file as below. But still having problem. Kindly help if you know the solution.

Not applicable
Author

Hi Manisha,

you should replace the whole section indicated by Alexander:

        if (!window["ref" + r]) {

            window["ref" + r] = "no"

        }

        $(".qvtr-tabs li").click(function () {

            if ($(this).attr("class") != "selectedtab" && $(this).attr("id") == t) {

                window["ref" + r] = "yes"

            }

        });

Replace with:

        window["ref" + r] = "yes"


BUT, as anticipated by Alex, this is just a temporary fix, as it solves the problem of the disappearing map, nevertheless it generates a new one: once you click on a region, to select a different one you should remove the filter on the selected region first - in the original version by Brian, you could simply click on a different region, much more user friendly.


Did anybody find a solution to this?

Thanks

sparur
Specialist II
Specialist II

Hi, bmz Brian.

As I know, in earlier versions of SVG Reader extension there were some additional files like "Maps Info.xlsx" and doc file with manual (I hope).

I can't find something similar with new version from github: https://github.com/brianwmunz/svgReader-QV11

Where I could find it now?

Thank you so much.

Arnaud_GUILLEMIN
Contributor
Contributor

I found a solution, change into this file: Script.js

(C:\ProgramData\QlikTech\QlikViewServer\Extensions\Objects\svgMap )

if (!window["ref" + r]) {
window["ref" + r] = "no"
}
$(".qvtr-tabs li").click(function () {
if ($(this).attr("class") != "selectedtab" && $(this).attr("id") == t) {
window["ref" + r] = "yes"
}
});

 

TO

if (!window["ref" + r]) {
window["ref" + r] = "no"
}
$(".qvtr-tabs li").click(function () {
window["ref" + r] = "yes"
});