Jump to content

"our stores module"


Recommended Posts

Hello All,

 

Regarding the our stores / stockists tab and the map - I would like the map to be fully zoomed out once the customer lands on the page for the first time - ideally looking to cover the whole of europe

 

I have the coordinates entered in the backend, however i have looked in the modules folder but cant seem to see the code to "zoom out" the map...

 

any help is appreciated - using ps1.51

 

many thanks

 

Jamie

Link to comment
Share on other sites

There isn't anywhere in the admin panel to make this change, you'll have to edit a JS file in your theme.

 

In a default install, the file you're looking for it /themes/default/js/stores.js

 

Around line 195 you'll see where the map is being created in the JavaScript:

 

map = new google.maps.Map(document.getElementById('map'), {
 center: new google.maps.LatLng(defaultLat, defaultLong),
 zoom: 10,
 mapTypeId: 'roadmap',
 mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}
});

 

Change the zoom: line to what you need. The lower the number, the further out it will be. Higher zooms you in closer.

 

If you are going to zoom closer than 13, you'll need to comment out line 125 where is says:

if (map.getZoom() > 13) map.setZoom(13);

 

Good luck!

 

Andy

A2 Hosting

Link to comment
Share on other sites

×
×
  • Create New...