Jump to content

backoffice: settings for google map?


Recommended Posts

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

  • Like 1
Link to comment
Share on other sites

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 by Chris2013 (see edit history)
  • Like 2
Link to comment
Share on other sites

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);
});
}
});
  • Like 1
Link to comment
Share on other sites

  • 6 months later...

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

×
×
  • Create New...