+ dataLayer.on("click", function (e) {
+ onSelect(e.layer);
+ });
+
+ map.on('layeradd', function (e) {
+ if (e.layer === dataLayer) {
+ $.ajax({ url: "/browse/start", success: function (sidebarHtml) {
+ startBrowse(sidebarHtml);
+ }});
+ }
+ });
+
+ map.on('layerremove', function (e) {
+ if (e.layer === dataLayer) {
+ closeSidebar();
+ }
+ });