如何全选并重置传单中的所有选定标记

时间:2018-09-09 16:56:35

标签: javascript jquery leaflet

$.widget("wgm.imgNotes2", $.wgm.imgViewer2, {
    options: {

        addNote: function(data) {
            var map = this.map,
                loc = this.relposToLatLng(data.x, data.y);
            var popup = L.responsivePopup({ hasTip: true, autoPan: false})
                         .setContent(notesArray[data.id]);
            var myicon = L.icon({
                             iconUrl: 'assets/booknow/img/book_pin.png',
                iconSize:     [15, 15], // size of the icon            

                shadowAnchor: [4, 62],  // the same for the shadow
                popupAnchor:  [-3, -76]
            });
            var newicon = L.icon({
                              iconUrl: 'assets/booknow/img/book_pin_success.png',
                iconSize:     [15, 15], // size of the icon            

                shadowAnchor: [4, 62],  // the same for the shadow
                popupAnchor:  [-3, -76]
            });

            var highlight = L.icon({iconUrl: 'assets/booknow/img/book_pin.png',
                iconSize:     [45, 45],
            });



            var mark = L.marker(loc, {icon: myicon})
                        .addTo(map).on('click', markerOnClick)
                        .bindTooltip(data.tooltip,{direction: 'top'});

如何在传单中选择图像中的所有标记 甚至如何清除所有标记或重置为选定标记的标记

0 个答案:

没有答案