전단지로 가능합니다. 여기 전단지 및 jquery로 스 와이프 맵을 수행 한 작업이 있습니다.
$(document).ready(function() {
var currentX = $("#viewport").width() / 2;
var resetPosition = function(x){
var pos = $(".leaflet-map-pane").position(),
coordLeft = ( - pos.top ) + "px, " + ( x - pos.left + 3 ) + "px, " + ( $("#viewport").height() - pos.top ) + "px, " + -pos.left + "px",
coordRight = ( - pos.top ) + "px, " + ( $("#viewport").width() - pos.left ) + "px, " + ( $("#viewport").height() - pos.top ) + "px, " + ( x - pos.left + 3 ) + "px";
$(".leaflet-layer:nth-child(3)").css("clip", "rect(" + coordLeft + ")");
$(".leaflet-layer:nth-child(2)").css("clip", "rect(" + coordRight + ")");
};
resetPosition(currentX);
map.on("move", function(){
resetPosition(currentX);
})
map.on("zoomend", function(){
resetPosition(currentX);
});
if( $.browser.msie && parseInt($.browser.version) < 9 ){
$("#vbar-divider").draggable({
drag: function(e){
currentX = $("#vbar-divider").position().left;
resetPosition(currentX);
},
axis: "x"
});
}else{
$("#vbar-divider").draggable({
drag: function(e){
currentX = $("#vbar-divider").position().left;
resetPosition(currentX);
$("#vbar-divider div").hide();
},
stop: function(){
$("#vbar-divider div").show();
},
axis: "x",
containment: "parent"
});
}
$('#vbar-divider').animate({
left: currentX,
},
500
);
});