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

Google Maps - Marker

Google Maps Extension with Markers.

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 into QlikView.

Load a set a coordinates into QlikView and visualize them together with this extension. This extension will plot every single data point as a marker on the map so if you have a large amount of markers please be aware that it might have some performance impact. If you are experiencing performance issues look into the cluster extension instead: http://community.qlik.com/message/325640

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

Custom Markers

Added support for custom markers images. In the properties dialog you now have the option to specify a custom image.

You can either have a static image or let the expression evaluate one for you, for example:

=If(MyExpression > 1, 'http://image_for_true', 'http://image_for_false'). If you do not specify an url or enter an invalid one the extension will fallback to the standard marker.

Supported image extensions are bmp, jpg, jpeg, tiff, png and gif.

You can host the images through the qlikview webserver or through IIS.

marker.PNG

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

Live long and prosper.

99 Replies
Anonymous
Not applicable

Hi, I wonder how could insert two different markers , ie , one for employees and one for the place where they work, two different markers.

Thanks.

Regards

Not applicable

You sure can – You simply need to select your image from your QMEM source area and apply your If,then,else condition referencing the appropriate image to get the desired result.

If you want to post your key fields I can try to help you write the expression.

Anonymous
Not applicable

Thanks for your reply, I have two tables of users and other companies and would like to represent on the same map the positions of both tables separately, that is, when filtered by user the user's position and the position of the display company.

Thank you.

Regards.

Not applicable

Ok.

In this case, create a flag in your load script in each table.

'User' as type and 'company' as type. You may need to create a link table too to get all location information in one table with the flag delineation.

I hope this helps.

Anonymous
Not applicable

Ok, we already have realized the problem is that when you insert the field names of the coordinates (are four fields, ie, two fields forusers and two for now) only me two fields letyou insert and 4 from extension properties.

Thanks.

Regards.

Not applicable

Hello, I'm french so pardon me for my possible mistakes in english..

I loaded your version and I have a problem :

I created an Excel file were I put some adresses in france. My goal is to have a marker on each adress on my map.

The colums are :

Country, Adresse, Latitude, Longitude.

I searched on internet to convert my adresses on latitude and Longitude.

When I load my map, the markers doesn't work, Indeed, the marker who schould be on Paris is on Orlean.

Is there anything to do to make my markers work?

Thank you.

Raphael scavenius.

hariprasadqv
Creator III
Creator III

How to supress null values

Not applicable

Hi, this is really cool stuff!

I'm trying to use the extension to create dynamic markers, that pick up an expression. I'm trying to use the Custom Marker URL parameter, but it seems to me that it doesn't like the script on the following URL:

http://chart.apis.google.com/chart?chst=d_map_spin&chld=1|0|FF0000|12|_|3

The expression in the Custom Marker URL I'm trying to create is something along the following lines:

='http://chart.apis.google.com/chart?chst=d_map_spin&chld=1|0|FF0000|12|_|' & $(myParameter)

Is this because of the supported image extensions? Seeing as the API doesn't really return one of bmp, jpg, jpeg, tiff, png and gif, I'm assuming that the lack of a recognisable extension throws the code.

Thanks for the good work though!

Per Christian Nødtvedt

Alexander_Thor
Employee
Employee
Author

Hey Per Christian,

Yes that is correct, I arbitrarily hardcoded a check for certain file extensions.

In theory I would guess it would work with a dynamic image from google charts also.

In script.js you should be able to find the conditional check just allow any kind of image.

Not applicable

Thank you for the quick reply Alexander,

I brute forced the regular expression in the validation of the picture URL in script.js and changed it from:

var reg = /\.(gif|jpg|jpeg|tiff|png|bmp)$/;

to

var reg = /(.*chart\.apis\.google\.com.*)|(\.(gif|jpg|jpeg|tiff|png|bmp))$/;

That did the trick, by allowing google api urls in addition to the current list of file extensions, and now allows me to do stuff like the following to the Custom Marker URL:

='http://chart.apis.google.com/chart?chst=d_map_spin&chld=1|0|FF0000|12|_|' & $(myParameter)

and get this:

dynamic_map_markers.png

The next obvious candidate for modification is of course to use a qlikview function to generate a colour based on the parameter value to permit visual distinctions between the markers as well. This should be fairly straightforward, by using parameter expansion in the URL.

Thank you again for a useful extension.

Per Christian