opt
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.map.impl.amap;
|
||||
import android.content.Context;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Point;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
@@ -495,7 +496,8 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public MogoLatLng getTarget() {
|
||||
@Override
|
||||
public MogoLatLng getTarget() {
|
||||
try {
|
||||
return ObjectUtils.fromAMap( mMapView.getMap().getCameraPosition().target );
|
||||
} catch ( Exception e ) {
|
||||
@@ -512,4 +514,16 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
mMapView.setViewOptions( options );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getLocationPointInScreen( MogoLatLng latLng ) {
|
||||
if ( checkAMapView() ) {
|
||||
try {
|
||||
return mMapView.getMap().getProjection().toScreenLocation( ObjectUtils.fromMogo2( latLng ) );
|
||||
} catch ( Exception e ) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.map.impl.amap.marker;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Point;
|
||||
import android.view.View;
|
||||
|
||||
import com.amap.api.maps.model.BitmapDescriptor;
|
||||
@@ -281,4 +282,11 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
public String getOwner() {
|
||||
return this.mOwner == null ? mMogoMarkerOptions.getOwner() : mOwner;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPositionByPixels( Point position ) {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.setPositionByPixels( position.x, position.y );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.map.impl.amap.uicontroller;
|
||||
|
||||
import android.graphics.Point;
|
||||
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.MogoMap;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
@@ -143,4 +145,12 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
mClient.setPointToCenter( mapCenterX, mapCenterY );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getLocationPointInScreen( MogoLatLng latLng ) {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getLocationPointInScreen( latLng );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user