This commit is contained in:
wangcongtao
2020-04-22 20:22:47 +08:00
parent a9cbb82420
commit c6378cfc07
7 changed files with 295 additions and 153 deletions

View File

@@ -6,6 +6,7 @@ import android.graphics.Point;
import android.view.animation.Interpolator;
import com.mogo.map.MogoLatLng;
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
import java.util.ArrayList;
import java.util.List;
@@ -247,6 +248,38 @@ public interface IMogoMarker {
int duration,
Interpolator interpolator );
/**
* 缩放动画
*
* @param fromX
* @param toX
* @param fromY
* @param toY
* @param duration
* @param interpolator
* @param listener
*/
void startScaleAnimation( float fromX,
float toX,
float fromY,
float toY,
int duration,
Interpolator interpolator,
OnMarkerAnimationListener listener );
/**
* 弹跳动画
* @param high
* @param duration
* @param interpolator
* @param listener
*/
void startJumpAnimation( float high,
long duration,
Interpolator interpolator,
OnMarkerAnimationListener listener);
/**
* 是否是否可点击
*
@@ -257,8 +290,8 @@ public interface IMogoMarker {
/**
* 开始平滑移动
*
* @param points 坐标点
* @param duration 时长
* @param points 坐标点
* @param duration 时长
*/
void startSmooth(List<MogoLatLng> points, int duration);
void startSmooth( List< MogoLatLng > points, int duration );
}

View File

@@ -0,0 +1,16 @@
package com.mogo.map.marker.anim;
/**
* @author congtaowang
* @since 2020-04-22
* <p>
* marker 动画监听
*/
public interface OnMarkerAnimationListener {
default void onAnimStart() {
}
default void onAnimEnd() {
}
}

View File

@@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
import com.mogo.map.MogoLatLng;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
import java.util.List;
@@ -141,12 +142,15 @@ public interface IMogoMapUIController {
/**
* marker 跳跃动画
* <p>
* Deprecated, instead of by {@link IMogoMarker#startJumpAnimation(float, long, Interpolator, OnMarkerAnimationListener)}
*
* @param marker 跳跃的 marker
* @param high 跳跃的高度
* @param interpolator 插值器
* @param duration 动画时间
*/
@Deprecated
void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator,
long duration );