Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

need help in google map configuration.

how do i start with google map configuration? As a start up i loaded some scripts given by qlik view,

// Google Maps Key

// get a key here http://code.google.com/apis/maps/signup.html

gmap_key = 'AIzaSyAw1FICfvk2CSjZughFUBE_WhrrxIMPhr8';

max_zoom_level = 14; //maximum value 17

def_zoom_level = 1;

def_map_size = 400;

var_pi180= '=pi()/180';

var_lat_offset= '0';

var_mc2= '=256*pow(2,$(var_zoom))';

var_mc1= '=256*pow(2,($(var_zoom)-1));

var_mid_lat= ‘=median(Latitude)';

var_mid_long= '=median(Longitude)';

var_zoom= '=If(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)) )

<def_map_size 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()))))<def_map_size,_zoom_level,null()),_zoom_level))>def_zoom_level,

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)) ) <def_map_size 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()))))<def_map_size,_zoom_level,null()),_zoom_level)),def_zoom_level)';

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

SET HidePrefix='_' ;

_zoom_level:

Load RecNo( ) as _zoom_level autogenerate(max_zoom_level);

maptype:

LOAD * INLINE [

Maptype

roadmap

mobile

satellite

terrain

hybrid

];

also i copied google api key from google and copied it in the above script. Next , i am supposed to load some geocodes, latitude , longitude and related dimension. where do i get these geo codes?

Any help will be appreciated,

Thanks.

1 Reply
Not applicable

Re: need help in google map configuration.

You could use eg. http://81nassau.com/demos/geocode/ to find the geocodes yourself or try to find a db or list of geocodes for cities, zip codes from the internet.

If you have a small set of places of interest you could just load your own table with specific geocodes:

city_geo_codes:

LOAD * INLINE [

City,                latitude,               longitude

NewYork,            40.705628,      -74.014893

];

Community Browser