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: 
Anonymous
Not applicable

Script generated KML fields with coordinate ?

Hi All,

In Qlik Sense it look like it's possible to load a KML in the script to overlay the standard map with forms.

I've in my data some coordinates, longitude and latitude for a start and End points, and I've the feeling that it should be possible to create "lines" in the KML sense in the script to make this dynamic (new coordinate = new lines without having to build a KML file).

Has anyone done that already ?

I will keep trying, if some has done that...

Thank-you.

3 Replies
Anonymous
Not applicable
Author

Hi,

Partial answer

just add a field in the script where the coordinates are :

,'[[[['& OrigLon &CHR(44)& OrigLat &']'&CHR(44)

  &'['& DestLon &CHR(44)& DestLat &']]]]' as Line

and add a command

TAG FIELDS "Line" WITH $geopolygon;

that create lines on the map.

Warning : if there is too many polygons, the map is not displayed. I started with more than 6000, it did not work, with around 600 it's working.

But the line is black, and the indicator have no effect.

I suppose that I can the same way create a 4 corner polygon, a line thicker by few fraction of degree. That will allows to have a filling that will change color.

But it look like messy as I need to calculate an offset that depend on the angle of the line... I don't even want to try.

Any better idea ?

Stephane.

Not applicable
Author

Hi Stephane,

Another option would be to use IdevioMaps, handles very well on-the-fly generated lines. Width and color of the line can then be controlled with Qlik expressions. Here's small examples where street data from Open Barcelona is parsed and combined with traffic information.

BCN.png

In this case the indata looked like this:

2.11203535639414,41.3841912394771,0 2.101502862881051,41.3816307921222,0

and was formatted at load time to: [[long1,lat1],[long2,lat2],...]

We would be happy to send you a test license, just visit Contact Form « idevio.com‌ to request one!

Thanks,

Patric Nordström

Idevio

ergustafsson
Partner - Specialist
Partner - Specialist

Hi!

Did you manage to get this to work?

Whenever I try this I get "Error - JSON protocol parse error" in the map. I tag the dimension with $geomultipolygon but still the map shows below, although it recognizes the field as an area map.

20170405 085910-TMS _ Sheets - Qlik Sense.png

Cheers,

Erik