javascript - Some control functions not working in leaflet map after adding bxslider -
i using bxslider in 1 of web application. slider had been initiated successfully. had created separate div displaying maps using leaflet. moment when add slier pan , popup function in map not working. may know wrong?there no error in browser console though.
$(document).ready(function () { $('.slider1').bxslider({ slidewidth: 150, minslides: 0, maxslides: 7, moveslides: 5, slidemargin: 20, onsliderload: function(){ $.material.init(); var map = l.map('map').setview([21.14985, 79.080598], 4); var mapquest = l.tilelayer('http://otile{s}.mqcdn.com/tiles/1.0.0/{type}/{z}/{x}/{y}.png',{ subdomains: '1234', type: 'osm' }).addto(map); var osm = l.tilelayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: '© <a href="http://osm.org/copyright">openstreetmap</a> contributors' }); {% stn, val in stations.items %} var {{ stn.split|join:"_" }} = l.marker([{{ val.0.1 }}, {{ val.0.0 }} ]).addto(map); var {{ stn.split|join:"_" }}_popup = {{ stn.split|join:"_" }}.bindpopup("<h4><b>{{ stn }}</b></h4>"); {% endfor %} } }); });
Comments
Post a Comment