Title: Map Zoom not working
Last modified: August 2, 2018

---

# Map Zoom not working

 *  Resolved [baldguy](https://wordpress.org/support/users/baldguy/)
 * (@baldguy)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/map-zoom-not-working/)
 * 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](https://wordpress.org/support/users/baldguy/)
 * (@baldguy)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/map-zoom-not-working/#post-10660803)
 * 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](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/map-zoom-not-working/#post-10720956)
 * Hello,
 * Thanks a lot for your feedback. I’ve [fixed](https://github.com/wpmetabox/meta-box/commit/88657e2cae0941b758995a7e16d25dfb83341875)
   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.

 * ![](https://ps.w.org/meta-box/assets/icon-128x128.png?rev=1100915)
 * [Meta Box](https://wordpress.org/plugins/meta-box/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/meta-box/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/meta-box/)
 * [Active Topics](https://wordpress.org/support/plugin/meta-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meta-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meta-box/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/map-zoom-not-working/#post-10720956)
 * Status: resolved