Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter this-is-me

    (@this-is-me-1)

    Hi Michael,

    thank you for your response and shame on me …
    I just forgot to assing the correct cpt also in WPML again, so everything is working fine and saved me a lot of time as I do not have to edit the database table column for changing the slug.
    Thank you again for this great new feature in your plugin.

    Hi Ian,

    great and thank you for this information. I did not realized that there is a filter for the options, because I had not read until the end of the function.
    I removed my hacking and it is working fine with the bgmp_map-options filer now, which I would like to share (put this in you functions.php):

    function bgmp_default_style($options) {

    $options['clustering']['styles'] = array(
    'default' => array(
    array(
    'url' => get_bloginfo('stylesheet_directory') . '/images/m1.png', __FILE__ ,
    'height' => 52,
    'width' => 53,
    'opt_anchor' => array( 30, 0 ),
    'opt_textColor' => '#ffffff',
    'opt_textSize' => 11
    ),

    array(
    'url' => get_bloginfo('stylesheet_directory') . '/images/m2.png', __FILE__,
    'height' => 55,
    'width' => 56,
    'opt_anchor' => array( 32, 0 ),
    'opt_textColor' => '#ff0000',
    'opt_textSize' => 11
    ),

    array(
    'url' => get_bloginfo('stylesheet_directory') . '/images/m3.png', __FILE__,
    'height' => 65,
    'width' => 66,
    'opt_anchor' => array( 44, 0 ),
    'opt_textColor' => '#ffffff',
    'opt_textSize' => 12
    ),
    array(
    'url' => get_bloginfo('stylesheet_directory') . '/images/m4.png', __FILE__,
    'height' => 77,
    'width' => 78,
    'opt_anchor' => array( 55, 0 ),
    'opt_textColor' => '#ffffff',
    'opt_textSize' => 12
    ),
    array(
    'url' => get_bloginfo('stylesheet_directory') . '/images/m5.png', __FILE__,
    'height' => 89,
    'width' => 90,
    'opt_anchor' => array( 66, 0 ),
    'opt_textColor' => '#ffffff',
    'opt_textSize' => 12
    )
    )
    );

    return $options;

    }
    add_filter('bgmp_map-options', 'bgmp_default_style' );

    Hello,

    I was also wondering about loading marker images via google although they exist in the plugin image folder.
    You can fix this problem by altering the core.php file. Search for public function getMapOptions and add the ‘default’ style. I use this as default style:
    'default' => array(
    array(
    'url' => plugins_url( 'includes/marker-clusterer/images/m1.png', __FILE__ ),
    'height' => 52,
    'width' => 53,
    'opt_anchor' => array( 30, 0 ),
    'opt_textColor' => '#ffffff',
    'opt_textSize' => 11
    ),

    array(
    'url' => plugins_url( 'includes/marker-clusterer/images/m2.png', __FILE__ ),
    'height' => 55,
    'width' => 56,
    'opt_anchor' => array( 32, 0 ),
    'opt_textColor' => '#ff0000',
    'opt_textSize' => 11
    ),

    array(
    'url' => plugins_url( 'includes/marker-clusterer/images/m3.png', __FILE__ ),
    'height' => 65,
    'width' => 66,
    'opt_anchor' => array( 44, 0 ),
    'opt_textColor' => '#ffffff',
    'opt_textSize' => 12
    ),
    array(
    'url' => plugins_url( 'includes/marker-clusterer/images/m4.png', __FILE__ ),
    'height' => 77,
    'width' => 78,
    'opt_anchor' => array( 55, 0 ),
    'opt_textColor' => '#ffffff',
    'opt_textSize' => 12
    ),
    array(
    'url' => plugins_url( 'includes/marker-clusterer/images/m5.png', __FILE__ ),
    'height' => 89,
    'width' => 90,
    'opt_anchor' => array( 66, 0 ),
    'opt_textColor' => '#ffffff',
    'opt_textSize' => 12
    )
    ),

    I also realized that the defined arrays anchor, textColor and textSize will not be used by the markerclusterer_packed.js. A quick search ponited me to the right direction by changing them (put opt_ before) to get it work with th js file.

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