Thank you for the great reply, this has lead to another issue.
The map won't display if contained within a condition.
For example if I check to see if an address exists for the map:
$contact_page_map_address = isset( $cp["{$prefix}contact_page_map_address"] ) ? $cp["{$prefix}contact_page_map_address"] : '';
if ( !empty ($contact_page_map_address) ) :
$contact_page_map = isset( $cp["{$prefix}contact_page_map"] ) ? $cp["{$prefix}contact_page_map"] : '';
// Map Args
$args = array(
'width' => '100%',
'height' => '480px',
'js_options' => array(
'mapTypeId' => 'HYBRID',
'zoomControl' => false,
)
);
$map = RWMB_Map_Field::render_map( $contact_page_map, $args );
echo '<section class="map">' . $map . '</section>';
endif;
If the condition is removed then the map displays perfectly.
I look forward to your reply.