设置家和公司

This commit is contained in:
zhangyuanzhen
2020-01-12 15:31:18 +08:00
parent 590ef1fc1f
commit e4605a1a1f
18 changed files with 365 additions and 97 deletions

View File

@@ -23,15 +23,15 @@ public class MogoNavi implements IMogoNavi {
private static volatile MogoNavi sInstance;
private MogoNavi( Context context ) {
mDelegate = NaviClient.getInstance( context );
private MogoNavi(Context context) {
mDelegate = NaviClient.getInstance(context);
}
public static MogoNavi getInstance( Context context ) {
if ( sInstance == null ) {
synchronized ( MogoNavi.class ) {
if ( sInstance == null ) {
sInstance = new MogoNavi( context );
public static MogoNavi getInstance(Context context) {
if (sInstance == null) {
synchronized (MogoNavi.class) {
if (sInstance == null) {
sInstance = new MogoNavi(context);
}
}
}
@@ -43,65 +43,65 @@ public class MogoNavi implements IMogoNavi {
}
@Override
public void naviTo( MogoLatLng endPoint ) {
if ( mDelegate != null ) {
mDelegate.naviTo( endPoint );
public void naviTo(MogoLatLng endPoint) {
if (mDelegate != null) {
mDelegate.naviTo(endPoint);
}
}
@Override
public void naviTo( MogoLatLng endPoint, MogoNaviConfig config ) {
if ( mDelegate != null ) {
mDelegate.naviTo( endPoint, config );
public void naviTo(MogoLatLng endPoint, MogoNaviConfig config) {
if (mDelegate != null) {
mDelegate.naviTo(endPoint, config);
}
}
@Override
public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints ) {
if ( mDelegate != null ) {
mDelegate.naviTo( endPoint, wayPoints );
public void naviTo(MogoLatLng endPoint, List<MogoLatLng> wayPoints) {
if (mDelegate != null) {
mDelegate.naviTo(endPoint, wayPoints);
}
}
@Override
public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints, MogoNaviConfig config ) {
if ( mDelegate != null ) {
mDelegate.naviTo( endPoint, wayPoints, config );
public void naviTo(MogoLatLng endPoint, List<MogoLatLng> wayPoints, MogoNaviConfig config) {
if (mDelegate != null) {
mDelegate.naviTo(endPoint, wayPoints, config);
}
}
@Override
public void reCalculateRoute( MogoNaviConfig config ) {
if ( mDelegate != null ) {
mDelegate.reCalculateRoute( config );
public void reCalculateRoute(MogoNaviConfig config) {
if (mDelegate != null) {
mDelegate.reCalculateRoute(config);
}
}
@Override
public void stopNavi() {
if ( mDelegate != null ) {
if (mDelegate != null) {
mDelegate.stopNavi();
}
}
@Override
public void startNavi( boolean isRealNavi ) {
if ( mDelegate != null ) {
mDelegate.startNavi( isRealNavi );
public void startNavi(boolean isRealNavi) {
if (mDelegate != null) {
mDelegate.startNavi(isRealNavi);
}
}
@Override
public boolean isNaviing() {
if ( mDelegate != null ) {
if (mDelegate != null) {
return mDelegate.isNaviing();
}
return false;
}
@Override
public List< MogoCalculatePath > getCalculatedStrategies() {
if ( mDelegate != null ) {
public List<MogoCalculatePath> getCalculatedStrategies() {
if (mDelegate != null) {
return mDelegate.getCalculatedStrategies();
}
return null;
@@ -109,30 +109,36 @@ public class MogoNavi implements IMogoNavi {
@Override
public OnCalculatePathItemClickInteraction getItemClickInteraction() {
if ( mDelegate != null ) {
if (mDelegate != null) {
return mDelegate.getItemClickInteraction();
}
return null;
}
@Override
public void setLineClickInteraction( OnCalculatePathItemClickInteraction itemClickInteraction ) {
if ( mDelegate != null ) {
mDelegate.setLineClickInteraction( itemClickInteraction );
public void setLineClickInteraction(OnCalculatePathItemClickInteraction itemClickInteraction) {
if (mDelegate != null) {
mDelegate.setLineClickInteraction(itemClickInteraction);
}
}
@Override
public void clearCalculatePaths() {
if ( mDelegate != null ) {
if (mDelegate != null) {
mDelegate.clearCalculatePaths();
}
}
@Override
public void setCalculatePathDisplayBounds( Rect bounds ) {
if ( mDelegate != null ) {
mDelegate.setCalculatePathDisplayBounds( bounds );
public void setCalculatePathDisplayBounds(Rect bounds) {
if (mDelegate != null) {
mDelegate.setCalculatePathDisplayBounds(bounds);
}
}
@Override public void updateNaviConfig() {
if (mDelegate != null) {
mDelegate.updateNaviConfig();
}
}
}