• Hi , first thanx for the really great plugin ??

    I’m trying to add 2 plugin for leaflet ,and I’ve read already the part of github docu “How Can I Add another Leaflet Plugin?”, but can′t make it work…

    1. Gesture Control (https://github.com/elmarquis/Leaflet.GestureHandling/)
    and
    2. Marker Clustering plugin for Leaflet (https://github.com/Leaflet/Leaflet.markercluster)

    1.
    I’ve added this part to functions.php
    add_action(‘leaflet_map_loaded’, ‘fs_leaflet_loaded’);
    function fs_leaflet_loaded() {
    wp_enqueue_script( ‘xyz-leafgesthand-js’, get_template_directory_uri() . ‘/js/LeafletGestureHandling/leaflet-gesture-handling.min.js’, Array(‘wp_leaflet_map’), ‘1.0’, true);
    wp_enqueue_style( ‘xyz-leafgesthand-css’, get_template_directory_uri() . ‘/js/LeafletGestureHandling/leaflet-gesture-handling.min.css’, false, ‘1.1.8’ );

    —-> till now the gesture control works, if I add in class.map-shortcode.php
    in options gestureHandling: true. but is hardcoded, so with the next update get lost….

    But if I try this way including the script in functions.php
    // custom js
    //wp_enqueue_script(‘xyz-leafgesthand-custom’, get_template_directory_uri() . ‘js/leaflet-plugins.js’, Array(‘gesture_control’), ‘1.0’, true);
    }

    I dont know, what to put in leaflet-plugins.js to make it work?

    the same way i would like to try with the option2 , clusterer, any idea how?

    Thanx in advance

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Enhancing with plugins’ is closed to new replies.