<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Google map API : Need Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Google-map-API-Need-Help/m-p/310714#M114744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use an API Google Map in my qv apps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 fields in my file : Customer; Sales; Location&lt;/P&gt;&lt;P&gt;In the field "Location", the GPS data are saved. Example : ﻿﻿﻿﻿49.897399,2.294941&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have put in the script the API code.&lt;/P&gt;&lt;P&gt;How to do after that to add the map on my sheet ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pierre.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;API sample :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gmap_key = 'ABQIAAAAyYiaEbA9t3e0YKNv7mwqyxSqqe4tBT902slFFxhPpJUJiAYiDRQOAaonJyylIxLYCWKdErJWPkLYRA';&lt;/P&gt;&lt;P&gt;max_zoom_level = 17; //maximum value 18&lt;/P&gt;&lt;P&gt;// Variables required for calculating map&lt;/P&gt;&lt;P&gt;// No need to change these&lt;/P&gt;&lt;P&gt;var_pi180= '=pi()/180';&lt;/P&gt;&lt;P&gt;var_lat_offset= '0';&lt;/P&gt;&lt;P&gt;var_mc2= '=256*pow(2,$(var_zoom))';&lt;/P&gt;&lt;P&gt;var_mc1= '=256*pow(2,($(var_zoom)-1))';&lt;/P&gt;&lt;P&gt;var_mid_lat= '=min(LATITUDE)+(1+var_lat_offset)*((max(LATITUDE)-min(LATITUDE))/2)';&lt;/P&gt;&lt;P&gt;var_mid_long= '=min(LONGITUDE)+(max(LONGITUDE)-min(LONGITUDE))/2';&lt;/P&gt;&lt;P&gt;var_zoom= '=max(aggr(if(max( round(256*pow(2,(_zoom_level -1)))+( LONGITUDE *((256*pow(2,_zoom_level ))/360)) )-min( round(256*pow(2,(_zoom_level -1)))+( LONGITUDE *((256*pow(2,_zoom_level ))/360)) ) &amp;lt;map_size_x AND max((256*pow(2,(_zoom_level-1)))+((0.5*log((1+(sin((LATITUDE)*pi()/180)))/(1-(sin((LATITUDE)*pi()/180)))))*((-256*pow(2,_zoom_level))/(2*pi()))))-min((256*pow(2,(_zoom_level-1)))+((0.5*log((1+(sin((LATITUDE)*pi()/180)))/(1-(sin((LATITUDE)*pi()/180)))))*((-256*pow(2,_zoom_level))/(2*pi()))))&amp;lt;map_size_y,_zoom_level,1),_zoom_level))';&lt;/P&gt;&lt;P&gt;var_maptype= '=if(isnull(only(maptype)),fieldvalue( '&amp;amp;chr(39)&amp;amp;'maptype'&amp;amp;chr(39)&amp;amp;', 1 ),maptype)';&lt;/P&gt;&lt;P&gt;map_size_x= '620';&lt;/P&gt;&lt;P&gt;map_size_y= '500';&lt;/P&gt;&lt;P&gt;SET HidePrefix='_' ;&lt;/P&gt;&lt;P&gt;// Field required for calcualting best zoom level&lt;/P&gt;&lt;P&gt;_zoom_level:&lt;/P&gt;&lt;P&gt;Load RecNo( ) as _zoom_level autogenerate(max_zoom_level);&lt;/P&gt;&lt;P&gt;maptype:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;maptype&lt;/P&gt;&lt;P&gt;roadmap&lt;/P&gt;&lt;P&gt;mobile&lt;/P&gt;&lt;P&gt;satellite&lt;/P&gt;&lt;P&gt;terrain&lt;/P&gt;&lt;P&gt;hybrid&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Aug 2011 14:13:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-30T14:13:14Z</dc:date>
    <item>
      <title>Google map API : Need Help</title>
      <link>https://community.qlik.com/t5/QlikView/Google-map-API-Need-Help/m-p/310714#M114744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use an API Google Map in my qv apps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 fields in my file : Customer; Sales; Location&lt;/P&gt;&lt;P&gt;In the field "Location", the GPS data are saved. Example : ﻿﻿﻿﻿49.897399,2.294941&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have put in the script the API code.&lt;/P&gt;&lt;P&gt;How to do after that to add the map on my sheet ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pierre.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;API sample :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gmap_key = 'ABQIAAAAyYiaEbA9t3e0YKNv7mwqyxSqqe4tBT902slFFxhPpJUJiAYiDRQOAaonJyylIxLYCWKdErJWPkLYRA';&lt;/P&gt;&lt;P&gt;max_zoom_level = 17; //maximum value 18&lt;/P&gt;&lt;P&gt;// Variables required for calculating map&lt;/P&gt;&lt;P&gt;// No need to change these&lt;/P&gt;&lt;P&gt;var_pi180= '=pi()/180';&lt;/P&gt;&lt;P&gt;var_lat_offset= '0';&lt;/P&gt;&lt;P&gt;var_mc2= '=256*pow(2,$(var_zoom))';&lt;/P&gt;&lt;P&gt;var_mc1= '=256*pow(2,($(var_zoom)-1))';&lt;/P&gt;&lt;P&gt;var_mid_lat= '=min(LATITUDE)+(1+var_lat_offset)*((max(LATITUDE)-min(LATITUDE))/2)';&lt;/P&gt;&lt;P&gt;var_mid_long= '=min(LONGITUDE)+(max(LONGITUDE)-min(LONGITUDE))/2';&lt;/P&gt;&lt;P&gt;var_zoom= '=max(aggr(if(max( round(256*pow(2,(_zoom_level -1)))+( LONGITUDE *((256*pow(2,_zoom_level ))/360)) )-min( round(256*pow(2,(_zoom_level -1)))+( LONGITUDE *((256*pow(2,_zoom_level ))/360)) ) &amp;lt;map_size_x AND max((256*pow(2,(_zoom_level-1)))+((0.5*log((1+(sin((LATITUDE)*pi()/180)))/(1-(sin((LATITUDE)*pi()/180)))))*((-256*pow(2,_zoom_level))/(2*pi()))))-min((256*pow(2,(_zoom_level-1)))+((0.5*log((1+(sin((LATITUDE)*pi()/180)))/(1-(sin((LATITUDE)*pi()/180)))))*((-256*pow(2,_zoom_level))/(2*pi()))))&amp;lt;map_size_y,_zoom_level,1),_zoom_level))';&lt;/P&gt;&lt;P&gt;var_maptype= '=if(isnull(only(maptype)),fieldvalue( '&amp;amp;chr(39)&amp;amp;'maptype'&amp;amp;chr(39)&amp;amp;', 1 ),maptype)';&lt;/P&gt;&lt;P&gt;map_size_x= '620';&lt;/P&gt;&lt;P&gt;map_size_y= '500';&lt;/P&gt;&lt;P&gt;SET HidePrefix='_' ;&lt;/P&gt;&lt;P&gt;// Field required for calcualting best zoom level&lt;/P&gt;&lt;P&gt;_zoom_level:&lt;/P&gt;&lt;P&gt;Load RecNo( ) as _zoom_level autogenerate(max_zoom_level);&lt;/P&gt;&lt;P&gt;maptype:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;maptype&lt;/P&gt;&lt;P&gt;roadmap&lt;/P&gt;&lt;P&gt;mobile&lt;/P&gt;&lt;P&gt;satellite&lt;/P&gt;&lt;P&gt;terrain&lt;/P&gt;&lt;P&gt;hybrid&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 14:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Google-map-API-Need-Help/m-p/310714#M114744</guid>
      <dc:creator />
      <dc:date>2011-08-30T14:13:14Z</dc:date>
    </item>
    <item>
      <title>Google map API : Need Help</title>
      <link>https://community.qlik.com/t5/QlikView/Google-map-API-Need-Help/m-p/310715#M114745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you're question is but you're first problem is that you have both latitude and longitude in the same field.&amp;nbsp; Notice in the variables there is LATITUDE and LONGITUDE.&amp;nbsp; Those names need to be the same as what you're latitude and longititude fields are called.&amp;nbsp; So if you decide to name the latitude field "city_latitude" then you need to replace "latitude" in all of the variables with "city_latitude".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I would find an example of a chart w/ Google Maps that already works and just copy/paste it into your .qvw.&amp;nbsp; There are a lot of little things that you'll forget so you're better off doing it that way.&amp;nbsp; You'll need to change all of the expressions to match your latitude and longitude field names along with making sure the dimension matches what you want (city?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally i would add a field for city and have two tables.&amp;nbsp; One with customer, sales, and city and the other with city, latitude, and longitude.&amp;nbsp; Then use city for the dimension in your chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another thing (that I'm not 100% sure about) is that you might need to make sure your longitude is negative (all of my graphs for the United States are, but I don't know what the coordinates are for Europe and how that works).&amp;nbsp; If the points are in weird places, that might be something to consider (but again... I don't know).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 16:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Google-map-API-Need-Help/m-p/310715#M114745</guid>
      <dc:creator />
      <dc:date>2011-08-30T16:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Google map API : Need Help</title>
      <link>https://community.qlik.com/t5/QlikView/Google-map-API-Need-Help/m-p/310716#M114746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out the attached. It is working for me.&lt;/P&gt;&lt;P&gt;hth,&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 16:24:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Google-map-API-Need-Help/m-p/310716#M114746</guid>
      <dc:creator />
      <dc:date>2011-08-30T16:24:56Z</dc:date>
    </item>
  </channel>
</rss>

