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
Exactly this. In v1, we are able to add an even listener that when clicking on a Marker, to populate the Sidebar with details from the Marker and then open the Sidebar.
In v2, I'm having trouble doing this same procedure. How do you reference to open up the sidebar when clicking on a Marker?
I have found a way to do it. This is using the "leaflet-sidebar.js" script. Also, in my version, i have MODAL tabs inside of the sidebar, which is what the "a:eq(0).tab('show')" means. The 0 in the parenthesis is the array number of the tab, starting at 0.
This will open the sidebar and then open any modal tabs inside:
sidebar.open("details");
$('#details .modal-body .nav-tabs a:eq(0)').tab('show');
Then, you will need to push the content to the HTML div you are wanting.
var content = "
";
'DATA GOES HERE'
content += "
";
Then, send the above table data to the HTML div for the modal tab you are wanting to show that data.
$("#gisSites-Info_DATA").html(content);
The marker show on map doesn't open any popup windows. I wanted to show the popup filed in sidebar like the plugin sidebar-v1.
The text was updated successfully, but these errors were encountered: