Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Map

Hi all ,

  I have created the google map everything is working fine, but iam not able to change the maptype for the following variable   

       maptype

       roadmap

       mobile

       satellite

       terrain

       hybrid

when i select any one of the following field  which i have brought  on dashboard as a list box , then also the map dont change

can some one guide me please

Dynamic image

='http://maps.google.com/maps/api/staticmap?center='   &   num(var_mid_lat, '##############', '.', ',' )   &   ','   &   num(var_mid_long, '##############', '.', ',' )   &   '&zoom=$(var_zoom)'   &   '&maptype='&var_maptype   &   '&size='&map_size_x&'x'&map_size_y   &   '&key='& 'AIzaSyAABZIVacmXaH_m5XNM2PzcJo3uDr12Rzk' & '&sensor=false'

maptype:

LOAD * INLINE [

    maptype

    roadmap

  mobile

  satellite

  terrain

  hybrid

];

4 Replies
Roop
Specialist
Specialist

What is the string for the dyanamic image, and what is full content for the maptype?

Thanks

Roop
Specialist
Specialist

Sorry am away from my desk. I don't think that the key string is required any longer. You can try removing it to see if that helps.

Anonymous
Not applicable
Author

do you have this line in your script?


var_maptype= '=if(isnull(only(maptype)),fieldvalue( '&chr(39)&'maptype'&chr(39)&', 1 ),maptype)';

you need this line in your script along with other variables needed for google maps image to show up and function properly.

Roop
Specialist
Specialist

I have the following in the Dynamic Image:

='http://google.com/maps/api/staticmap?center='

& num(var_mid_lat, '##############', '.', ',' )

& ',' & num(var_mid_long, '##############', '.', ',' )

& '&zoom=$(var_zoom)'

& '&maptype='&var_maptype

& '&size='&map_size_x&'x'&map_size_y

& '&sensor=false'

and make sure that you have the following variable defined in the script otherwise it will not be picked up:

var_maptype= '=if(isnull(only(MapType)),fieldvalue( '&chr(39)&'maptype'&chr(39)&', 1 ),MapType)';