关于在网络上拖延工作但不在移动设备上工作,我找不到这个问题背后的原因。
<div map-lazy-load="https://maps.google.com/maps/api/js" class="ng-map">
<ng-map center="{{vm.map.center}}"
ng-class="{'drag-start' : vm.dragging, 'drag-end': !vm.dragging && !vm.isLoading, 'is-loading': vm.isLoading}"
on-dragstart="vm.dragStart()"
on-drag="vm.drag()"
on-dragend = "vm.dragEnd()"
zoom="{{vm.map.zoom}}"
map-type-control="{{vm.map.options.mapTypeControl}}"
zoom-control="{{vm.map.options.zoomControl}}">
<custom-marker on-click="vm.loadRestaurants()" position="{{vm.marker.position}}">
<div class="current-marker">
<img ng-src="{{vm.marker.options.icon}}" />
</div>
</custom-marker>
<custom-marker ng-repeat="restaurant in vm.models" position="{{restaurant.address.latitude}}, {{restaurant.address.longitude}}" id="{{restaurant.id}}">
<div>
<img ng-src="{{restaurant.options.icon}}" />
</div>
</custom-marker>
</ng-map>
</div>
vm.drag = function() {
vm.marker.position = [vm.mapInstance.center.lat(), vm.mapInstance.center.lng()];
};