v1.0.2-opt branch: for opt
This commit is contained in:
@@ -12,6 +12,7 @@ import android.view.View;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import com.amap.api.maps.AMap;
|
||||
import com.amap.api.maps.AMapUtils;
|
||||
import com.amap.api.maps.CameraUpdateFactory;
|
||||
import com.amap.api.maps.model.BitmapDescriptorFactory;
|
||||
import com.amap.api.maps.model.CameraPosition;
|
||||
@@ -33,6 +34,7 @@ import com.amap.api.navi.model.NaviInfo;
|
||||
import com.mogo.map.IMogoMap;
|
||||
import com.mogo.map.IMogoMapView;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.exception.MogoMapException;
|
||||
import com.mogo.map.impl.amap.marker.AMapMarkerWrapper;
|
||||
import com.mogo.map.impl.amap.message.AMapMessageListener;
|
||||
import com.mogo.map.impl.amap.message.AMapMessageManager;
|
||||
@@ -679,4 +681,12 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
mMapView.getMap().runOnDrawFrame();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateLineDistance( MogoLatLng p1, MogoLatLng p2 ) throws Exception {
|
||||
if ( p1 == null || p2 == null ) {
|
||||
throw new Exception( "计算距离的点不能为 null" );
|
||||
}
|
||||
return AMapUtils.calculateLineDistance( ObjectUtils.fromMogo2( p1 ), ObjectUtils.fromMogo2( p2 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,4 +208,12 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
mClient.forceRender();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateLineDistance( MogoLatLng p1, MogoLatLng p2 ) throws Exception {
|
||||
if ( mClient != null ) {
|
||||
return mClient.calculateLineDistance( p1, p2 );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,4 +168,12 @@ public interface IMogoMapUIController {
|
||||
* 强制刷新地图
|
||||
*/
|
||||
void forceRender();
|
||||
|
||||
/**
|
||||
* 计算两点之间的距离
|
||||
* @param p1
|
||||
* @param p2
|
||||
* @return
|
||||
*/
|
||||
float calculateLineDistance(MogoLatLng p1, MogoLatLng p2) throws Exception;
|
||||
}
|
||||
|
||||
@@ -201,4 +201,12 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
mDelegate.forceRender();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateLineDistance( MogoLatLng p1, MogoLatLng p2 ) throws Exception {
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.calculateLineDistance( p1, p2 );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
5
map-upload.sh
Executable file
5
map-upload.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
./gradlew :libraries:mogo-map-api:clean :libraries:mogo-map-api:uploadArchives
|
||||
./gradlew :libraries:map-amap:clean :libraries:map-amap:uploadArchives
|
||||
./gradlew :libraries:mogo-map:clean :libraries:mogo-map:uploadArchives
|
||||
Reference in New Issue
Block a user