Unable to display openstreetmaps in Bricks

Support MB Settings Page Unable to display openstreetmaps in BricksResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #40208
    spipdesignsspipdesigns
    Participant

    Hi all.

    im having some trouble displaying an openstreetmap in bricks. i have been able to set it up no problem in custom fields.

    however, it has been set up in custom field but the custom field is in a settings page, slug basic-information.

    whatever i try, its not rendering in front end but fine in the settings page.

    i have tried rwmb_the_value ( 'truck_map', $args )

    even mb_basic-information_truck_map, {mb_basic-information_truck_map} nothing makes it render.

    https://imgur.com/a/wYAHyKn

    attached screenshots

    #40216
    PeterPeter
    Moderator

    Hello there,

    To display a map from a settings page on the frontend, you need to add the setting 'object_type' => 'setting' to the second parameter and add the option name to the third parameter of the helper function. For example:

    $args = [
        'width'        => '640px',
        'height'       => '480px',
        'zoom'         => 14,
        'marker'       => true,
        'object_type' => 'setting' // here
    
    ];
    rwmb_the_value( 'my_field_id', $args, 'settings_page_option_name' );

    Please read more on the documentation https://docs.metabox.io/extensions/mb-settings-page/#data

    #40223
    spipdesignsspipdesigns
    Participant

    Thank you Peter, this has worked!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.