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: 
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

I havent tried it with that large dataset but I have seen the stack overflow error before, usually when u add the extension for the first time and there is no valid coordinates as a dimension. A F5 will fix that.

Is your data set clean? It could be that it snuck in some crap data amongst the coordinates that throws the stack overflow error.

If you can share the data, just email me offline, I can try to debug it.

I'll add the possibility to use custom marker icons while I'm at it. I'll do some test to see if I can validate the data input also without a too big performance hit to avoid further problems.

Kind Regards

Alexander Karlsson

28 mar 2013 kl. 12:24 skrev "jgo" <qcwebmaster@qlik.com<mailto:qcwebmaster@qlik.com>>:

QlikCommunity<http://community.qlik.com/index.jspa>

Re: Google Maps - Cluster

created by jgo<http://community.qlik.com/people/jgo> in Integration and Extensions - View the full discussion<http://community.qlik.com/message/327622#327622>

Julie_Main
Employee
Employee

Thanks Alexander .. I tried the F5 and still getting the error - also, I'm down to under 700 records .. I do have a couple of other extension objects on their .. I wonder if this is causing problems.

Ok, so have taken off ALL other extension objects, cut down data and tried again and same error .. I even cleaned the entire cache .. very strange .. especially as it's fine in my other app ..   If it's ok, will send you a copy - it's something for demo.qlikview, so don't want to post it here till it's complete ;0)

Not applicable

Hi!

I have installed IE10, running QV11SR1, Win8 64-bit. In 2 apps (1 - about 1000 coordinate pairs, 2- 5 coordinate pairs).

2nd app works fine, but using 1st app I get stack errors (as jgo writes): Stack Overflow at line 24, Stack Overflow at line 25, Stack Overflow at line 27.

Do you have an opinion on the reasons?

Thanks!

Alexander_Thor
Employee
Employee
Author

Hey,

Ye we found the issue. If you get emtpy rows in your data model for lat/lng that will throw the error.

I'm gonna add in default suppression of NULL rows for the dimensions and validation of the coordinates so any "crap" data is filtered out. I'll upload it later tonight for you.

Kind Regards

Alexander Karlsson

10 apr 2013 kl. 16:18 skrev "Miguel Angel Baeyens" <qcwebmaster@qlik.com<mailto:qcwebmaster@qlik.com>>:

QlikCommunity<http://community.qlik.com/index.jspa>

Re: Google Maps - Cluster

reply from Miguel Angel Baeyens<http://community.qlik.com/people/mby> in Integration and Extensions - View the full discussion<http://community.qlik.com/message/334131#334131>

Alexander_Thor
Employee
Employee
Author

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

  • Now suppressing NULL rows to avoid Stack Overflow errors. The extension will still throw an error if you have coordinate pairs that's not valid, i.e bad data quality.
  • Added an option to allow popup windows when you hover over an marker. The value in the infowindow is controlled by your expression. You can style the contents by regular html tags. Example:

     ='<B>Total Number of Visits: </B>' & Sum(CountVisit) & '<img src="http://www.bhsah.com/wp-content/uploads/2010/01/happy-cat1-150x150.jpg">'

     clustercat.PNG

  • Worked around a bug in the SelectRow method so now when you select a marker that share latitude with other markers it will work.
  • Moved over to a newer version of markerclustererplus.
Not applicable

Thank you very much, Alexander!

I'll try new version of your expression today.

Popup windows in extension must be very useful!

About my problem with Stack errors:

My source data with coordinates I was loaded from Excel format, separator in coordinates was dot (XX.XXXXXXX).

After operation with coordinates in QV script (synthetic object allocation) OR after load data to QV separator has been changed to comma (XX,XXXXXXX).

Your extension not work properly with coordinates in such format (google static map works).

I stored the table in Excel format, replaced comma to dot and BINGO!

Thank you!

Alexander_Thor
Employee
Employee
Author

Perfect! Yes coordinate sets has to be in ISO 6709 format, I probably should document that somewhere

Not applicable

Is there a way to refresh a Table Box when you zoom in on the Google Maps?  So if you have 100 items in the Table Box and when I click on a cluster of 9, the Table Box is filtered down to only those 9?

Anonymous
Not applicable

there are some way to change the marker picture? for example a green marker for the better places and the red one for the worst?

Alexander_Thor
Employee
Employee
Author

Not in any easy way I could think off.

I could trigger selections back to QV whenever you zoom into a cluster however that would cause the chart to re-render it-self and having to plot all the markers again which I guess is going to be a pain.