标签:view dma oom ddt and layer ast font 隐藏
可以在选项卡中加个click事件,调用下
<a href="#tab1" >tab1</a>
<a href="#tab2" onclick="$.expandMap();">tab2</a>
var map = null;
$(function(){
//加载gis地图
var southWest = L.latLng(*, *),
northEast = L.latLng(*, *),
bounds = L.latLngBounds(southWest, northEast);
map = L.map(‘ExampleMap‘, {
zoomControl: true,
attributionControl: false,//隐藏copyright
maxBounds: bounds,
minZoom: 9,
maxZoom: 12,
invalidateSize:true
}).setView([*, *], 9);
console.log(‘test‘);
new L.TileLayer.TileLoad(‘./maps/NJBaseMap‘).addTo(map);
})
$.expandMap = function() {
L.Util.requestAnimFrame(map.invalidateSize,map,!1,map._container);
}
标签:view dma oom ddt and layer ast font 隐藏
原文地址:http://www.cnblogs.com/alaric888/p/6272440.html