Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Google Maps Plotting Issue

I am using the personal edition of Qlikview and am trying to map locations using the google map static map api. I have about 3,000 records and am able to get the google map to display with the locations pinned to the map but the locations are not aligned properly to their lat, lon.

I have used the code in the example su[pplied with Qlikview. I am using a unique identifier, a seven digit number as the dimension. on the expressions tab of the map my expressions ar for latitude, longitude and sum of sales.

The definition of the longitude and latitude expression,

=

avg( round (256*pow(2,($(var_zoom)-1)))+( longitude *((256*pow(2,$(var_zoom)))/360)) )

=

avg

(

((

256*pow(2,($(var_zoom)-1)))+((0.5*log((1+(sin((latitude)*pi()/180)))/(1-(sin((latitude)*pi()/180)))))*((-256*pow(2,$(var_zoom)))/(2*pi

()))))

changes the X and Y value to a field other than Latitude and Longitude and the definition ends up being Sum ([longitude]) and Sum ([latitude]).

I suspect this may be the issue but I have not been able to solve the problem so the data displays properly.

Any help would be appreciated.

13 Replies
Not applicable
Author

Hi,

Could you post your app, I'll take a look.

Are you sure Long / Lat are in the correct projection (WGS84) ?

JJJ

Not applicable
Author

Thank you for your quick response.

For code, I am using the example that comes with Qlikview. It was my understanding from reading the documentation that since the Google Map static API was based on the mercator projection that the calculus in Qlikview modified the Lat Lon coordinates so they could be accurately placed over the Google Map.

Here is an example

The expressions tab of the chart properties (advanced mode) has sum ([Longitude]) or sum ([latitude]) in the definirtion of the label rather than the code that is in the example. When I insert the code from the example in the label definition box, then the X and Y values change to another field in my data that makes the map disappear.

Thanks for considering a solution to this dilema.

deepakk
Partner - Specialist III
Partner - Specialist III

HI,

I am just guessing it.Since the variable $(var_zoom) is shown in red colour I think u have not declared it properly.

Not applicable
Author

Very strange Map ! where are the coordinates from ?

Please send the file with just the Long/Lat I will check

JJJ

Not applicable
Author

I have attached the lat lon file.

Thaks for reviewing

Anonymous
Not applicable
Author

See if the checkbox "Plot Area Only" is checked. If not, you get the map shifted, and the data points are not in the right places.

Not applicable
Author

Hi,

Finally it's not var_zoom or the suggestion of Michael or a projection problem.

I built a little example with you coordinates. As you can see, it seems smart. I've just add an Id and some datas (Sales, Type).

I can't explain what is wrong in your app maybe an option you checked but i suggest you to use my chart and integrate your data

Regards

JJ

Not applicable
Author

Thank you for taking time to assist me. However, since I am using the personal version of Qlikview, I cannot open your file.

😞

Not applicable
Author

I'm also with a personal edition in v10.

Do you have a valid licence key ? what is your version ?

JJ