Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
After having gone through a high level of frustration in getting something conceptually simple such as a map working or improving its resolution, I have a couple of quick updates that might be helpful.
Google Maps Static API v2
The main advantage of switching to this is that Google has added a scale feature which now allows you to obtain maps that are up to 1200x1200 in the free version. This is accomplished by choosing a 600x600 (maximum allowed for free) and then using a scale factor of 2. Note the mobile type has been removed and a new field has been added for mobile so that you can get any type of map optimized for a mobile platform.
The changes that are required from the standard mapping are as follows:
='http://maps.googleapis.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='&gmap_key
&
'&sensor=false'
&
'&scale='&map_scale
Check out the documentation at http://code.google.com/apis/maps/documentation/staticmaps/ as there are other nifty features that you can add just by modifying the string above.
Using Bing Static Maps instead of Google Maps
Bing seems to have fewer restrictions on use at this time so if you are running out of views etc or want to use the competition you can try this out.
The changes that are required from the standard mapping are as follows:
='http://dev.virtualearth.net/REST/v1/Imagery/Map/CollinsBart/'
&
num(var_mid_lat, '##############', '.', ',' )
&
','
&
num(var_mid_long, '##############', '.', ',' )
&
'/'
&
'$(var_zoom)'
&
'?'
&
'mapSize='&map_size_x &','&map_size_y
&
'&format=jpeg'
&
'&key='&bmap_key
Check out the documentation at http://msdn.microsoft.com/en-us/library/ff701724.aspx as there are other nifty features that you can add just by modifying the string above. For example you can have other types of maps by altering the http request above and replacing 'CollinsBart' with 'Road' for example.
One feature that is missing is that the background size can't be set programmatically using a variable as that would have allowed more automation of any resolution maps.
Enjoy!
Pramod
Thank you SO much Pramod. You just helped me - and hopefully other Qlikker's 🙂
http://community.qlik.com/message/245566#245566
Regards,
Messmann.
Hey Team
I am getting the map like this. I don't know how can I deal with .
I tried with the following codes... no impact.
='http://dev.virtualearth.net/REST/v1/Imagery/Map/CollinsBart/'
&
num(var_mid_lat, '##############', '.', ',' )
&
','
&
num(var_mid_long, '##############', '.', ',' )
&
'/'
&
'$(var_zoom)'
&
'?'
&
'mapSize='&map_size_x &','&map_size_y
&
'&format=jpeg'
&
'&key='& bmap_key
//='http://maps.google.com/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='& gmap_key & '&.jpg'
Kindly suggest.
I am taking longitude and latitude details from the excel.
Hi,
Try this
='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='& 'AIzaSyC0xK6Tjz2HqTO1wXJ0tYaZM8AxOnNKd1U' & '&sensor=false'
it will work...:)