Skip to content

Commit

Permalink
修复高德地图经纬度坐标反转的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans941 committed Mar 13, 2019
1 parent d207749 commit ef2d4b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions resources/views/latlong.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

<div class="row">
<div class="col-md-3">
<input id="{{$id['lat']}}" name="{{$name['lat']}}" class="form-control" value="{{ old($column['lat'], $value['lat']) }}" {!! $attributes !!} />
<input id="{{$id['lng']}}" name="{{$name['lng']}}" class="form-control" value="{{ old($column['lng'], $value['lng']) }}" {!! $attributes !!} />
</div>
<div class="col-md-3">
<input id="{{$id['lng']}}" name="{{$name['lng']}}" class="form-control" value="{{ old($column['lng'], $value['lng']) }}" {!! $attributes !!} />
<input id="{{$id['lat']}}" name="{{$name['lat']}}" class="form-control" value="{{ old($column['lat'], $value['lat']) }}" {!! $attributes !!} />
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/Map/Amap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ef2d4b7

Please sign in to comment.