Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Google map on grid chart doesn't correspond to coordinates

Hi All,

I've found this example of pie charts on google map on Community and thought it will be useful for my analyses. I've changed the cities to Polish ones. However, I think there is some kind of zooming problem. When one city is selected only, then the dot is marked in the right place e.g. for Krakow. When multiple cities are visible - the dots are in incorrect places. So looks like because of zooming error the map picture doesn't correspond to latitude and longitude axes.

Has anyone built a map like that and can solve the problem here or attach your object?

Many thanks in advance.

Justyna

7 Replies
migueldelval
Specialist
Specialist

Hi j.kaliszczak,

Try this, //def_zoom_level = 6; in your script, If not attach excel file to see what is the problem.

Regards

Miguel del Valle

Not applicable
Author

Hi Miguel,

I already tried with def_zoom_level but with no success.

Here is the excel file.

Justyna

migueldelval
Specialist
Specialist

!Hi,

Try this qvw and tell me please.

Regards

Miguel del Valle

Not applicable
Author

Hi Miguel,

thanks for your effort. However, it's still incorrect.

When you deselect all Cities then the pie charts are in totally wrong places - you can see one is even in Baltic Sea (should be Gdansk), one in Belarus instead of Poland (should show Warsaw).

Also, I'd prefer the zoom not go into the street map of the city center when selecting one city, just zoom a bit to show still a piece of the country.

Thanks

Justyna

migueldelval
Specialist
Specialist

Hi j.kaliszczak,

I think that your first problem could be the axes. Try This values as picture show.

Max

=(256*pow(2,($(var_zoom)-1)))+( var_mid_long  *((256*pow(2,$(var_zoom)))/360)) -round(map_size_x/2)

Min

=( (256*pow(2,($(var_zoom)-1)))+( var_mid_long  *((256*pow(2,$(var_zoom)))/360)) + round(map_size_x/2))

Max:

=((256*pow(2,($(var_zoom)-1)))+((0.5*log((1+(sin(var_mid_lat*pi()/180)))/(1-(sin(var_mid_lat*pi()/180)))))*((-256*pow(2,$(var_zoom)))/(2*pi())))+round(map_size_y/2))

Min

=((256*pow(2,($(var_zoom)-1)))+((0.5*log((1+(sin(var_mid_lat*pi()/180)))/(1-(sin(var_mid_lat*pi()/180)))))*((-256*pow(2,$(var_zoom)))/(2*pi())))-round(map_size_y/2))

Regards

Miguel del Valle

Anil_Babu_Samineni

Mighuel,

In this chart, Those Scales are hidden

Update: How to create Zoom Symbol for that graph like Google Maps....

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Hi Miguel,

axes properties are not active in case of the map on grid chart, so I can't change them.

Justyna