You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The googlemap virtual field uses Google Maps JavaScript to display a Map.
It doesn't work in the Fields meta box displayed in the new block editor.
Expected output - Classic editor
When displayed using the Classic editor the Google Maps Map is correctly displayed
Actual output - Block editor
When the field is displayed in a meta box controlled by the new block editor the field is not displayed.
The following message appears in the console log
post.php?post=962&action=edit:505 Uncaught ReferenceError: google is not defined
at initialize1 (post.php?post=962&action=edit:505)
initialize1 @ post.php?post=962&action=edit:505
load (async)
(anonymous) @ post.php?post=962&action=edit:505
Explanation
The bw_fields_get_google_map function uses the Google Maps logic developed for the [bw_show_googlemap] shortcode.
The block editor expands the content during REST API processing. This causes the logic to increment a counter which is used to determine whether or not the Google initialisation code is required.
We need to ensure that the meta box enqueues the script.
Proposed solution
Insert the following line between the oik_require and bw_googlemap_v3 calls.
bw_gmap_map( null );
The text was updated successfully, but these errors were encountered:
The
googlemap
virtual field uses Google Maps JavaScript to display a Map.It doesn't work in the Fields meta box displayed in the new block editor.
Expected output - Classic editor
When displayed using the Classic editor the Google Maps Map is correctly displayed
Actual output - Block editor
When the field is displayed in a meta box controlled by the new block editor the field is not displayed.
The following message appears in the console log
Explanation
The
bw_fields_get_google_map
function uses the Google Maps logic developed for the[bw_show_googlemap]
shortcode.The block editor expands the content during REST API processing. This causes the logic to increment a counter which is used to determine whether or not the Google initialisation code is required.
We need to ensure that the meta box enqueues the script.
Proposed solution
Insert the following line between the oik_require and bw_googlemap_v3 calls.
The text was updated successfully, but these errors were encountered: