xMartin Posted May 23, 2014 Share Posted May 23, 2014 In BO, there is right of the delivery address a small google map. Can anyone tell me how I can change the parameters for the display? So map type, zoom level, etc. Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted May 23, 2014 Share Posted May 23, 2014 Hi, you can change this settings at the next tpl file: adm/themes/default/template/controllers/orders/helpers/view/view.tpl for example: var delivery_map = new google.maps.Map(document.getElementById('map-delivery-canvas'), { zoom: 10, mapTypeId: google.maps.MapTypeId.ROADMAP, center: results[0].geometry.location }); Regards 1 Link to comment Share on other sites More sharing options...
Chris2013 Posted May 23, 2014 Share Posted May 23, 2014 (edited) Hi Martin This is how I have done it, there may be a better way. To change the zoom level of that google map you need to go to the view.tpl which is as follows Your Admin---themes---default---template---controllers---orders---helpers---view---view.tpl then look for line delivery_map = new google.maps.Map(document.getElementById('map-delivery-canvas'), { zoom: 10, and change the zoom: to what suits you, 13 looks pretty good to me just noticed Alex beat me to it Edited May 23, 2014 by Chris2013 (see edit history) 2 Link to comment Share on other sites More sharing options...
xMartin Posted May 23, 2014 Author Share Posted May 23, 2014 You guys are awesome! Thank you! Here's my adaptation: geocoder.geocode({ address: '{$addresses.delivery->address1},{$addresses.delivery->postcode},{$addresses.delivery->city}{if ($addresses.delivery->id_state)},{$addresses.deliveryState->name}{/if},{$addresses.delivery->country}' }, function(results, status) { if (status === google.maps.GeocoderStatus.OK) { delivery_map = new google.maps.Map(document.getElementById('map-delivery-canvas'), { zoom: 18, mapTypeId: google.maps.MapTypeId.HYBRID, center: results[0].geometry.location }); var delivery_marker = new google.maps.Marker({ map: delivery_map, position: results[0].geometry.location, url: 'http://maps.google.com?q={$addresses.delivery->address1|urlencode},{$addresses.delivery->postcode|urlencode},{$addresses.delivery->city|urlencode}{if ($addresses.delivery->id_state)},{$addresses.deliveryState->name|urlencode}{/if},{$addresses.delivery->country|urlencode}' }); google.maps.event.addListener(delivery_marker, 'click', function() { window.open(delivery_marker.url); map.setTilt(45); }); } }); 1 Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted May 25, 2014 Share Posted May 25, 2014 Thank you for your code) Now you can edit name of the topic with "[sOLVED]" Best regards Link to comment Share on other sites More sharing options...
weckie Posted December 24, 2014 Share Posted December 24, 2014 Does anyone know how to disable the map at all, so that it shows only the address details not the map. I think backend will be much faster without the map. We have a very bad internet connection, and we need to disable anything that slows down working with prestashop. thanks. Link to comment Share on other sites More sharing options...
Recommended Posts