var map, toolip, overlay; var layer = new ol.layer.Vector(); var imgLayer = new ol.layer.Image(); var center = ol.proj.transform([116.46, 39.92], 'EPSG:4326', 'EPSG:3857'); var extent = [center[0] - 6290…
1.在PublicController控制器中写好判断手机端方法. <?php namespace Home\Controller; use Think\Controller; class PublicController extends Controller { //判断是否是手机端还是电脑端 function isMobile(){ // 如果有HTTP_X_WAP_PROFILE则一定是移动设备 if (isset ($_SERVER['HTTP_X_WAP_PROFILE'])){ re…