• Resolved baldguy

    (@baldguy)


    I noticed that the map wasn’t working properly after a couple of years of working just fine. I generated/added an API key and now the map is working again, except it’s zoomed all the way out (to the global view) – the zoom is set in the code to 11.

    <?php if (rwmb_meta('my_map')) {
    // Display the map
    $map_args = array(
      'type'          =>  'map',
      'width'         =>  '100%',
      'height'        =>  '300px',
      'zoom'          =>  11,
      'marker'        =>  true,
      'marker_title'  =>  '',
    );
                       	
    echo rwmb_meta( 'my_map', $map_args );

    The marker on the map is in the correct place, but you have to zoom in manually.

    What am I doing wrong?

    (Meta Box 4.15.1 on WP 4.9.7)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter baldguy

    (@baldguy)

    Meta Box 4.15.4 on WP 4.9.8.

    Still not working. Nothing I do to change the zoom level results in any change on the front end.

    This is the opening div tag for the map as it’s displayed:

    <div class="rwmb-map-canvas" data-map_options="{"latitude":"43.2455302","longitude":"-78.19403869999996","width":"100%","height":"300px","marker":true,"marker_title":"","info_window":"<h3>My Place Name<\/h3><p>My place address<br \/>My City, State ZIP<\/p>","js_options":{"zoom":"","mapTypeId":"ROADMAP"},"api_key":"MyAPIkeygoeshere","type":"map","zoom":11}" style="width: 100%;height: 300px;position: relative;overflow: hidden;">

    I notice there are two places where ‘zoom’ is populated. One has nothing, the other has my 11.

    Plugin Author Anh Tran

    (@rilwis)

    Hello,

    Thanks a lot for your feedback. I’ve fixed the bug on Github. New version will be released soon.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Map Zoom not working’ is closed to new replies.