Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Alexander_Thor
Employee
Employee

Google Maps - Cluster

Google Maps Extension with Cluster support.

QlikTech takes no responsibility for any code and QlikTech Support Agreement does not cover issues with this extension.

Please review Googles license agreement before you put this into production.

Introduction

This is a QlikView extension object that integrates Google Maps Javascript API V3 and a third party library called MarkerClusterPlus into QlikView.

Load a set a coordinates into QlikView and visualize them together with this extension. The clustering feature is create when you have alot of data points and needs to group/cluster them together for greater visability and performance.

The maxzoom property defines at what zoom level you want your markers clustered. The grid size property controls how big or small cluster grid size you want.

You can either use the extension 'as is' or use it as a base to further customize it to fit your needs.

Download the extension and view source code at: https://github.com/mindspank/GoogleMaps-Cluster-QV11

cluster.PNG

If you build something awesome please share it with the community!

Live long and prosper.


2015-02-15
Removed download from post, please grab the latest version from Github instead.

2014-02-03

Various fixes.


2014-01-09

There has been numerous upgrades to the extension.

Now clusters now display the value of your expression and with added support to include more information in pop-up labels.

Example grayscale styled map included.

Possibility to show only a single cluster icon style if you do not want it to scale according to the number of markers in the cluster.


2013-06-17

Added custom marker support. Now you can specify a url for an custom marker. Accepts all major image file types.


350 Replies
Alexander_Thor
Employee
Employee
Author

Sure - and you mean the actual markers? Not the cluster circles?

It's basically the same technique used for the normal marker extension where you can specifiy any image you want.

I'll upload a new version of the extension as soon as I'm finished.

Alexander_Thor
Employee
Employee
Author

Updated the orginal post with a new version of the extension.

Now you can specify an url for custom markers with normal QV expression support.

For example, =If(MyExpression='BAD VALUE','http://grumpy_cat.png','http://happy_cat'

sspe
Creator II
Creator II

Hi Alex,

Being fairly new to QlikView, I need a little guidance in getting your Map feature working.

I have installed the extension file on the server (by manually copying the files as per this instruction -- http://community.qlik.com/docs/DOC-1866 ).

The problem is still that when I open the document, I just get a blank frame saying "Unknown charttype", so it seems like it doesn't "see" the map /extension.

Secondly, I can't see where I can "map" by own dataset to be shown on the map. I can see the script you have is pointing to a csv file, and of course I can just add my own SELECT statement but how do I map my columns to the map/extension?

It might be very simple and just me that doesn't get the point so hopefully someone can guide me in the right direction.

Regards

Steen

Not applicable

please check whether the web view is enabled or not.

if yes, then open the qvw file you are currently working in and right click to add an extension object.

from the box that appears select the google map extension and drag and drop in the empty space.

now you need to mention the latitude and longitude for map. for this you need to have already loaded the fields having latitude and longitude data in your qlikview file.
after putting the latitude and longitude enter the expression for the calulated measure you want to see in the map.

hope this explation would help you...

sspe
Creator II
Creator II

Hi,

Thanks for your input.

Web view is enabled so that should be ok, but I'm not sure I get how to load the extension? You say I can right click to add the extension object, but I don't see that anywhere in the list of possible objects.

The only place I seems to be able to find something about extensions, is if I go to Settings - Document Properties and then Extensions tab. Here I have the Installed Extensions list, but I don't have any extensions in here, so maybe the issue is that I haven't got the extension installed.

If that's the case, how do I then get it installed?

Regards

Steen

sspe
Creator II
Creator II

Ok - now I found out how to add the extension...:-). I think I just missed to enable Webview when having a new document.

Now I was able to add the extension, but now it just doesn't show anything. I have a list of countries with langitude and longitude coordinates that I just want to show in the map for the test, but when I create a new map and chose my lat. and long. fields it doesn't show anything.

Do I have to do something else other than just "mapping" the fields in the charet object?

Regards

Steen

Not applicable

AFTER MAPPING THE LATITUDE AND LONGITUDE, YOU ALSO NEED TO SPECIFY THE FIELD YOU WANT TO MAP ON THE GOOGLE MAP.

YOU NEED TO GIVE AN EXPRESSION (USING A FUNCTION OR JUST THE FIELD ) THAT YOU WANT TO DISPLAY ON THE MAP.

Attached are the qar files fo the map extension for qlikview.

double click them to install the extension.

while using the maps make sure you are connected to the internet and the web view is enabled.

also after placing the map object press F5 to reload the map.

Not applicable

Hi Alexander,

Thanks for sharing, this map extension is really cool

I have tested this some days ago and this cluster map worked just fine for my data.

Today I try to open it again (with the same set of data) and I get the following syntax error:

http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.9/src/markercl...

I can't fix it with another F5, then I only get a map without the clusters.

Besides, I only get this syntax error with this cluster map, your heat map and marker map work perfectly.

Thanks for your help in advance

sspe
Creator II
Creator II

Hi,

Ok - I have now managed to get it to show some data. It seems like there are some scenarios where it doesn't show anything though.

In my dataset, I select some of our customers from our Customers dimension in our DW. I then join these customers with our Global Country table, where we have a Lattitude and Longitude pr country.

In my dataset, I then take the Longitude, Lattitude, Countryname and COntinent together with the customernumber.

In my map, I then have an expression that counts the number of customernumbers, which will then give the number of customers pr. country.

What I have found though, it that if my dataset only contain customers from 1 country, then the map doesn't show anything - just a grey screen. As soon as I add some more records and get more than one country, then it seems to be fine.

The same problem seems to occur when I see the map, and then in a Country list box select just one country. Then my map get just becomes gray until I select more than one country.

Does anyone know why this happens and if it can se fixed on some way?

Regards

Steen

Not applicable

Hi Alex.

Thank you for sharing this extension. It works wonders. I had a request, though.

Currently the number on the cluster icon indicates the count of markers grouped into it. Is it possible to show some other property associated with those markers (say average of scores OR sum of scores obtained by each individual that the marker represents) on the cluster icon?


eg: if there are 3 markers a => 10, b => 15 and c => 20, currently the cluster shows the count 3 when it combines a, b and c. I want to be able to see 10+15+20=45 on the cluster icon. (If the number is too large we can scale it accordingly so that the cluster icon doesn't have to be that large in size)

Also, it is possible to define colour and size of cluster icon for ranges of our choice?

eg: 0-10 should be red and of size 1, 10 - 50 orange and of size 2, 50 - 100 blue and of size 3, etc.

Thanks,

Mihir