Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    hi,

    here’s another thread which may help you with this – https://www.ads-software.com/support/topic/google-maps-zoom-level?replies=12

    Thread Starter patsky

    (@patsky)

    I tried all those and still not working and some ideas in other threads I found. Was hoping I’d missed a zoom setting somewhere.

    I couldn’t find anyone who’d actually made it work.

    So unless there’s another suggestion, I’ll have to revert to my normal maps plugin for this. It seems to be the only thing I can’t make work with this amazing plugin!

    Have you tried adding alert(“testing”); to the code you’re using to check it’s being run when the page loads?

    Thread Starter patsky

    (@patsky)

    Yes and I get the alert box with OK in it.

    This is the code I have put in my theme header.php

    <script type="text/javascript">
    alert("testing");
    jQuery(document).ready(function($){
      $(document).bind('em_maps_locations_hook', function( e, map, infowindow, marker ){
        map.setZoom(2);
      });
    });
    </script>

    Do you still see it if you put it under the line below?

    jQuery(document).ready(function($){

    Thread Starter patsky

    (@patsky)

    No!!

    Plugin Support angelo_nwl

    (@angelo_nwl)

    did you add the custom js below the wp_head() in your header.php ?

    Thread Starter patsky

    (@patsky)

    No ?? but I have now and I can see the alert box but the map stays the same zoom regardless of the setting.

    The map is in a textwidget in the sidebar as stated earlier. I have tried putting the code directly in a page but still the same. Can’t change the zoom…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Change Map zoom’ is closed to new replies.