Browse Source

表单地图组件:修复有坐标时地图展示级别问题

听风 4 years ago
parent
commit
1bb4459d77
1 changed files with 2 additions and 1 deletions
  1. 2 1
      resources/views/form/map.blade.php

+ 2 - 1
resources/views/form/map.blade.php

@@ -217,7 +217,8 @@
             position: new AMap.LngLat(lng.val(), lat.val()),
             position: new AMap.LngLat(lng.val(), lat.val()),
             draggable: true,
             draggable: true,
             map:map,
             map:map,
-            icon:'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png'
+            icon:'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png',
+            zoom:15
         });
         });
         if (!lng.val() || !lat.val()){
         if (!lng.val() || !lat.val()){
             var geolocation = new AMap.Geolocation({
             var geolocation = new AMap.Geolocation({