leaflet加载超图PC端能显示,手机端显示不了
原因是手机端加载的图层地址的scale=0.000003461454994642332&x=1685&y=775
和PC端的scale=0.000027691639957138656&x=13612&y=6637的这三个参数不一样,我把手机端的某个图层地址的三个参数改成pc端的参数,就能单独显示这个图层
var yx_yz = this.mapLoad(this.mbtilesUrl)
var yx_yq = this.mapLoad(this.url)
var yxMap = L.layerGroup([yx_yz, yx_yq])
// 矢量
var sl_yq = this.mapLoad(this.sl_url)
var slMap = L.layerGroup([sl_yq])
var baseLayers = {
'影像': yxMap,
'矢量': slMap
}
// 地图底图加载start
map = L.map('mapContainer', {
center: [32.28119, 119.11477],
minZoom: 0,
zoom: 12,
crs: L.CRS.EPSG3857,
// crs: L.CRS.EPSG4326,
layers: [yxMap] // 默认图层展示
})
不知道代码哪里设置不对