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
// List of meta fields
'fields' => array(
// HEADING
array(
'type' => 'heading',
'name' => __( 'Google Map One Detail', 'rwmb' ),
),
array(
'id' => 'address-one',
'name' => __( 'Address', 'rwmb' ),
'type' => 'text',
),
array(
'id' => 'loc',
'name' => __( 'Location', 'rwmb' ),
'type' => 'map',
'style' => 'width: 500px; height: 500px',
'address_field' => 'address-one', // Name of text field where address is entered. Can be list of text fields, separated by commas (for ex. city, state)
),
)
This works good.
My code for showing the map:
$args = array(
'type' => 'map',
'width' => 640, // Map width, default is 640px
'height' => 480, // Map height, default is 480px
'zoom' => 14, // Map zoom, default is the value set in admin, and if it's omitted - 14
'marker' => true, // Display marker? Default is 'true',
'marker_title' => '', // Marker title when hover
'info_window' => '<h3>Info Window Title</h3>Info window content. HTML <strong>allowed</strong>', // Info window content, can be anything. HTML allowed.
);
echo rwmb_meta( 'loc', $args ); // For current post
I can't show a map properly
I followed the documentation (http://www.deluxeblogtips.com/meta-box/how-to-display-google-map-in-the-front-end/) but it didn't work.
My code for the meta box:
This works good.
My code for showing the map:
This doesn't work.
I've also tried this:
Which works, but not as I wanted. the first method can produce what I need, the second can't do this that easily.
The text was updated successfully, but these errors were encountered: