• Resolved MartinW2

    (@martinw2)


    How can I access/modify a map created by the plugin with own leaflet javascript code? Is there a way to get access to the corresponding map object without modifying the plugin?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor hupe13

    (@hupe13)

    Bozdoz answers this question in the FAQ.
    Or see the code of Extensions for Leaflet Map in the php directory.
    Examples are on this page also:

    • How to include Leaflet plugin leaflet-geosearch
    • Nautic Scale
    • How to set maxBounds conditionally
    • This reply was modified 3 years, 1 month ago by hupe13.
    Thread Starter MartinW2

    (@martinw2)

    Shame on me…. 🙁
    I found this in FAQ (as mentioned above by hupe13) …

    // iterate any of these arrays: maps, markers, lines, circles, geojsons
    var maps = window.WPLeafletMapPlugin.maps;

    … which should be all I need to continue.
    Thank you!

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

The topic ‘Access to leaflet map variable’ is closed to new replies.