Hi Bas,
Just to make sure we’re talking about the same thing: Do you mean the grey area appearing at the top and bottom of the map on the homepage?
Adding this to the header or footer template of your theme should work:
<?php if(is_front_page()) { ?>
<script type="text/javascript">
jQuery(document).ready(function($){
map.setZoom(14);
});
</script>
<?php } ?>
Just change 14 to whatever works best.
Thread Starter
ruijt
(@ruijt)
Hi Caimin,
I’m sorry but it doesn’t work for me π
I don’t know why…
Please any other solutions?
Thanks!
@ruijt Did you try the suggestion from @samatva ?
If you use this modified code, do you see an alert box pop up when the page loads?
<?php if(is_front_page()) { ?>
<script type="text/javascript">
jQuery(document).ready(function($){
alert("testing");
map.setZoom(14);
});
</script>
<?php } ?>
Thread Starter
ruijt
(@ruijt)
Hi Caimin,
Yes, I see the pop-up box. http://repaircafe.org/
(I’ll remove the code because the site is live).
Thanks.
Thread Starter
ruijt
(@ruijt)
(but the map is still completely zoomed out…)
maybe you can try something like this
jQuery(document).ready(function($){
$(document).bind('em_maps_location_hook', function( e, map, infowindow, marker ){
map.set('scrollwheel', false); //change this with your zoom code
});
});