Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Google Maps error with regional settings

Hi all!

I'm trying to use the fantastic google maps app in my QV file but there's a problem - I'm using european settings regarding the decimal (comma) and thousands (dot) separator and the original application I downloaded from this forum is the other way around (comma for thousands and dot for decimals). When I change it to my settings, it won't work, the bubbles won't appear on top of the right places.

I have tried a lot of the more obvious things to try and solve this, but I'm at a loss...

Please see attached example, I have it with it's original settings, please then change it to comma for decimals and dot for thousands and see what happens (you may have to reopen the document).

Thanks in advance

Alexandra



1 Solution

Accepted Solutions
Not applicable
Author

Hi,

if you look in your old version at the variables var_mid_lat and var_mid_long when selecting several countries, you can see that sometimes they´re filled with comma-seperated-values and sometimes with dot-seperated-values. I can´t figure out why QV is doing that, because in your excel source all the values are formated the same.

So, but in fact, google needs dot-seperated values. What you can do is to replace the comma in the variable, when it happens. This works with


var_mid_lat =replace(min(latitude)+(1+var_lat_offset)*((max(latitude)-min(latitude))/2),',','.')
var_mid_long=replace(min(longitude)+(max(longitude)-min(longitude))/2,',','.')


I´ve attached an example with ne variables.

It would be interesting to know why QV distinguish the values from the excel-sheet. Perhaps someone else has an idea.

Regards.

View solution in original post

3 Replies
Not applicable
Author

Here is the excel source file

Not applicable
Author

Hi,

if you look in your old version at the variables var_mid_lat and var_mid_long when selecting several countries, you can see that sometimes they´re filled with comma-seperated-values and sometimes with dot-seperated-values. I can´t figure out why QV is doing that, because in your excel source all the values are formated the same.

So, but in fact, google needs dot-seperated values. What you can do is to replace the comma in the variable, when it happens. This works with


var_mid_lat =replace(min(latitude)+(1+var_lat_offset)*((max(latitude)-min(latitude))/2),',','.')
var_mid_long=replace(min(longitude)+(max(longitude)-min(longitude))/2,',','.')


I´ve attached an example with ne variables.

It would be interesting to know why QV distinguish the values from the excel-sheet. Perhaps someone else has an idea.

Regards.

Not applicable
Author

That's exactly it! Works perfectly now! Thank you, Pascal!