Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using the script below to incorporate maps into my qlikview document.
// Google Maps Key
// get a key here http://code.google.com/apis/maps/signup.html
let
gmap_key = 'ABQIAAAA5bl62kS6z0rphaDWHORuGxS-1e5eBlFSI2yxODmWMQJWVmxijxTjxrIpt2HMUo_ORjaOHFqGULHSwA';let
max_zoom_level = 14;//maximum value 17
let
def_zoom_level = 1;let
def_map_size = 800;// Variables required for calculating map
// No need to change these
var_pi180= '=pi()/180';let
let
var_lat_offset= '0';let
var_long_offset= '-1';let
var_mc2= '=256*pow(2,$(var_zoom))';let
var_mc1= '=256*pow(2,($(var_zoom)-1))';let
var_mid_lat= '=median(Latitude)';let
var_mid_long= '=median(Longitude)';let
var_zoom= '=If(max(aggr(if(max( round(256*pow(2,(_zoom_level -1)))+( Longitude *((256*pow(2,_zoom_level;let
var_maptype= '=if(isnull(only(maptype)),fieldvalue( '&chr(39)&'maptype'&chr(39)&', 4 ),maptype)';I want to be able to use slider bars to zoom in and out, and to scroll left to right and scroll up and down. I believe it has something to do with a modification to the following:
let
let
var_mid_long= '=median(Longitude)'; var_mid_lat= '=median(Latitude)';I have seen an example document posted on this forum for an example using the city of London (UK) at http://community.qlik.com/forums/p/16118/62649.aspx#62649
in this example, the user has the following in their script
var_mid_lat= '=min(latitude)+(1+var_lat_offset)*((max(latitude)-min(latitude))/2)';
var_mid_long= '=min(longitude)+(max(longitude)-min(longitude))/2';
I can't seem to figure out how to get scrolling to work on my document but it seems to work in the example like above.
can somebody offer some help??
I have the same issue here ...
Anyone has suggestions?
Found the solution ...
...
var_long_offset = '0';
...
var_mid_long= '=min(Longitude)+(1-var_long_offset)*((max(Longitude)-min(Longitude))/2)';...
...
Hopes this helps ... it did for me
Anita
It seems that when zooming in by selecting on the map some zooming is not working as I thought it would ...
Think the var_long_offset as used in my idea has to do with this ....
Got to research this further.