Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Map problem

Hi, I am trying to do some distance analysis based on the postal codes of new South Wales, Australia. I get the desired results in the Pivot table and i think also in the Map. But the background image is not rendering at all correctly. Can you please help?

Thanks a lot.

Ram

Image.PNG.png

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello.

It seems, your Lat1 and Long1 fields are wrong. They are about -0.5 and 2.5, respectively. It places your points in the middle of the Atlantic, near São Tomé e Príncipe, by the coast of Africa. Hence the blue image: it's the ocean. If you put a listbox with the field _zoom_level and select around 5, you'll see what I'm talking about.

So, you should not do what you did in the script:

     Lat * pi() /180 as Lat,

     Long * pi()/180 as Long,

If you use the latitude and longitude from the csv file directly, you'll have the points around Sydney, Australia. But the map won't be ok yet. You'll have to fix the if condition in the latitude and longitude expressions. If you remove them, you'll at least see the points in the correct places.

By the way, the latitude expression is missing a closing parenthesis.

Hope it helps.

Regards.

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hello.

It seems, your Lat1 and Long1 fields are wrong. They are about -0.5 and 2.5, respectively. It places your points in the middle of the Atlantic, near São Tomé e Príncipe, by the coast of Africa. Hence the blue image: it's the ocean. If you put a listbox with the field _zoom_level and select around 5, you'll see what I'm talking about.

So, you should not do what you did in the script:

     Lat * pi() /180 as Lat,

     Long * pi()/180 as Long,

If you use the latitude and longitude from the csv file directly, you'll have the points around Sydney, Australia. But the map won't be ok yet. You'll have to fix the if condition in the latitude and longitude expressions. If you remove them, you'll at least see the points in the correct places.

By the way, the latitude expression is missing a closing parenthesis.

Hope it helps.

Regards.

Not applicable
Author

Thanks Bruno. I've made the changes, and it is looking good now. PFA. Please let me know if you still see anything wrong.

Once again many thanks for spending time for me.

Anonymous
Not applicable
Author

You're welcome, Ramkumar.

Your new qvw looks good to me.

Glad I could be of assistance.

Best regards.

Not applicable
Author

Hi Bruno, When I opened the file today I lost the background map image. Would you know why? I have a demo in a couple of days and i can't afford this to be this unstable.

regards,

Ram

Anonymous
Not applicable
Author

Hi, Ramkumar.

Make sure the computer on which you open the file can access the internet, specifically the URL of the Google Maps API. That's the only thing I can think of.

Regards.