Title: Intermittent Broken Shortcode Maps
Last modified: July 23, 2024

---

# Intermittent Broken Shortcode Maps

 *  Resolved [wiscwebs](https://wordpress.org/support/users/wiscwebs/)
 * (@wiscwebs)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/intermittent-broken-shortcode-maps/)
 * We are getting an error related to the maps displayed through shortcode. Sometimes
   the maps show but most of the time they don’t and we receive the following error:
 *     ```wp-block-code
       TypeError: Cannot read properties of undefined (reading 'ROADMAP')    at initialize (szbd-shortcode.min.js?ver=3.0.9:5:420)    at szbd-shortcode.min.js?ver=3.0.9:2:209    at Function.N (underscore.min.js?ver=1.13.4:2:9374)    at HTMLDocument.<anonymous> (szbd-shortcode.min.js?ver=3.0.9:2:82)    at e (jquery.min.js?ver=3.7.1:2:27028)    at t (jquery.min.js?ver=3.7.1:2:27330)
       ```
   
 * If you can see the map, refresh the page a few times and you’ll get the error.
   I added console.log(google) just before the error and I can see ROADMAP in the
   object. if I replace
 *     ```wp-block-code
       mapTypeId: google.maps.MapTypeId.ROADMAP
       ```
   
 * with
 *     ```wp-block-code
       mapTypeId: 'roadmap'
       ```
   
 * the error changes to
 *     ```wp-block-code
       TypeError: google.maps.Map is not a constructor    at initialize (szbd-shortcode.min.js?ver=3.0.9:5:474)    at szbd-shortcode.min.js?ver=3.0.9:2:209    at Function.N (underscore.min.js?ver=1.13.4:2:9374)    at HTMLDocument.<anonymous> (szbd-shortcode.min.js?ver=3.0.9:2:82)    at e (jquery.min.js?ver=3.7.1:2:27028)    at t (jquery.min.js?ver=3.7.1:2:27330)
       ```
   
 * I did update the plugins but I restored them all back to the previous versions
   and I can still see the error.
   The map on the backend when editing the shipping
   zone always shows.
    -  This topic was modified 1 year, 10 months ago by [wiscwebs](https://wordpress.org/support/users/wiscwebs/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fintermittent-broken-shortcode-maps%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [arosoft](https://wordpress.org/support/users/arosoft/)
 * (@arosoft)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/intermittent-broken-shortcode-maps/#post-17909386)
 * Hi, we intedified an issue with new Woocommerce and will release an updated version
   shortly.
 *  Plugin Author [arosoft](https://wordpress.org/support/users/arosoft/)
 * (@arosoft)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/intermittent-broken-shortcode-maps/#post-17915429)
 * Now updated.
 *  Thread Starter [wiscwebs](https://wordpress.org/support/users/wiscwebs/)
 * (@wiscwebs)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/intermittent-broken-shortcode-maps/#post-17915470)
 * The update fixed the issue. I’m no longer seeing the error. Thanks for your help.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Intermittent Broken Shortcode Maps’ is closed to new replies.

 * ![](https://ps.w.org/shipping-zones-by-drawing-for-woocommerce/assets/icon-256x256.
   png?rev=2034011)
 * [Shipping Zones by Drawing for WooCommerce](https://wordpress.org/plugins/shipping-zones-by-drawing-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shipping-zones-by-drawing-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shipping-zones-by-drawing-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/shipping-zones-by-drawing-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shipping-zones-by-drawing-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shipping-zones-by-drawing-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [wiscwebs](https://wordpress.org/support/users/wiscwebs/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/intermittent-broken-shortcode-maps/#post-17915470)
 * Status: resolved