diff --git a/resources/views/latlong.blade.php b/resources/views/latlong.blade.php index a8f4ff9..3457713 100644 --- a/resources/views/latlong.blade.php +++ b/resources/views/latlong.blade.php @@ -8,10 +8,10 @@
- +
- +
diff --git a/src/Map/Amap.php b/src/Map/Amap.php index 0167066..808fc55 100644 --- a/src/Map/Amap.php +++ b/src/Map/Amap.php @@ -18,14 +18,14 @@ function init(name) { var map = new AMap.Map(name, { zoom:11, - center: [lat.val()|| 0, lng.val()|| 0],//中心点坐标 + center: [lng.val() || 0, lat.val() || 0],//中心点坐标 viewMode:'3D'//使用3D视图 }); var marker = new AMap.Marker({ map: map, draggable: true, - position: [lat.val() || 0, lng.val()|| 0], + position: [lng.val() || 0, lat.val() || 0], }) map.on('click', function(e) {