[dev_arch_opt_3.0]
[Change] [1、删除废弃地图接口] Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -4,8 +4,6 @@ import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
|
||||
/**
|
||||
@@ -20,8 +18,6 @@ public interface IMogoMapApiBuilder extends IProvider {
|
||||
|
||||
IMogoMapUIController getMapUIController();
|
||||
|
||||
IMogoPoiSearch getPoiSearchClient( Context context, MogoPoiSearchQuery query );
|
||||
|
||||
void destroy();
|
||||
|
||||
IMogoMapView getMapView( Context context );
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
package com.mogo.map.marker;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Point;
|
||||
import android.view.View;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import androidx.annotation.RawRes;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -31,11 +26,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
void remove();
|
||||
|
||||
/**
|
||||
* 隐藏Marker覆盖物的信息窗口。
|
||||
*/
|
||||
void hideInfoWindow();
|
||||
|
||||
/**
|
||||
* 设置Marker覆盖物的透明度
|
||||
*
|
||||
@@ -43,21 +33,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
void setAlpha( float alpha );
|
||||
|
||||
/**
|
||||
* 设置Marker覆盖物的锚点比例。
|
||||
*
|
||||
* @param anchorU
|
||||
* @param anchorV
|
||||
*/
|
||||
void setAnchor( float anchorU, float anchorV );
|
||||
|
||||
/**
|
||||
* 设置Marker覆盖物是否允许拖拽。
|
||||
*
|
||||
* @param paramBoolean
|
||||
*/
|
||||
void setDraggable( boolean paramBoolean );
|
||||
|
||||
/**
|
||||
* 设置 Marker覆盖物的图标
|
||||
*
|
||||
@@ -72,14 +47,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
void setIcons( ArrayList< Bitmap > icons );
|
||||
|
||||
/**
|
||||
* 设置Marker覆盖物的InfoWindow是否允许显示,默认为true
|
||||
* 设置为false之后, 调用Marker.showInfoWindow() 将不会生效
|
||||
*
|
||||
* @param enabled
|
||||
*/
|
||||
void setInfoWindowEnable( boolean enabled );
|
||||
|
||||
/**
|
||||
* 设置Marker覆盖物的属性选项类 通过markerOption 给marker设置属性
|
||||
*
|
||||
@@ -99,13 +66,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
Object getObject();
|
||||
|
||||
/**
|
||||
* 设置多少帧刷新一次图片资源,Marker动画的间隔时间,值越小动画越快。
|
||||
*
|
||||
* @param period
|
||||
*/
|
||||
void setPeriod( int period );
|
||||
|
||||
/**
|
||||
* 设置位置
|
||||
*
|
||||
@@ -128,13 +88,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
void setRotateAngle( float rotate );
|
||||
|
||||
/**
|
||||
* 设置Marker 覆盖物的文字片段。
|
||||
*
|
||||
* @param snippet
|
||||
*/
|
||||
void setSnippet( String snippet );
|
||||
|
||||
/**
|
||||
* 设置Marker 覆盖物的标题。
|
||||
*
|
||||
@@ -154,23 +107,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
void setVisible( boolean visible );
|
||||
|
||||
/**
|
||||
* 设置Marker覆盖物的z轴值。
|
||||
*
|
||||
* @param zIndex
|
||||
*/
|
||||
void setZIndex( int zIndex );
|
||||
|
||||
/**
|
||||
* 显示 Marker 覆盖物的信息窗口。
|
||||
*/
|
||||
void showInfoWindow();
|
||||
|
||||
/**
|
||||
* Marker对象 AssInfo
|
||||
* @return marker对象assInfo
|
||||
*/
|
||||
String getMarkerAssInfo();
|
||||
|
||||
/**
|
||||
* 设置点击事件
|
||||
@@ -186,13 +122,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
IMogoMarkerClickListener getOnMarkerClickListener();
|
||||
|
||||
/**
|
||||
* 设置自定义infowindow代理对象
|
||||
*
|
||||
* @param adapter
|
||||
*/
|
||||
void setInfoWindowAdapter( IMogoInfoWindowAdapter adapter );
|
||||
|
||||
/**
|
||||
* 自定义 infowindow 样式接口
|
||||
*
|
||||
@@ -200,13 +129,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
IMogoInfoWindowAdapter getInfoWindowAdapter();
|
||||
|
||||
/**
|
||||
* 自定义marker样式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
void setMarkerIconView( IMogoMarkerIconViewCreator creator );
|
||||
|
||||
/**
|
||||
* 是否被销毁
|
||||
*
|
||||
@@ -228,13 +150,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
String getOwner();
|
||||
|
||||
/**
|
||||
* 设置marker在window的位置
|
||||
*
|
||||
* @param position window 的位置。
|
||||
*/
|
||||
void setPositionByPixels( Point position );
|
||||
|
||||
/**
|
||||
* Marker 配置
|
||||
*
|
||||
@@ -243,18 +158,6 @@ public interface IMogoMarker {
|
||||
MogoMarkerOptions getMogoMarkerOptions();
|
||||
|
||||
|
||||
/**
|
||||
* 开始缩放动画
|
||||
*
|
||||
* @param duration
|
||||
* @param interpolator
|
||||
*/
|
||||
void startScaleAnimation( float fromX,
|
||||
float toX,
|
||||
float fromY,
|
||||
float toY,
|
||||
int duration,
|
||||
Interpolator interpolator );
|
||||
|
||||
/**
|
||||
* 缩放动画
|
||||
@@ -275,43 +178,6 @@ public interface IMogoMarker {
|
||||
Interpolator interpolator,
|
||||
OnMarkerAnimationListener listener );
|
||||
|
||||
/**
|
||||
* 缩放动画
|
||||
*
|
||||
* @param fromX
|
||||
* @param toX
|
||||
* @param fromY
|
||||
* @param toY
|
||||
* @param fromAlpha
|
||||
* @param toAlpha
|
||||
* @param duration
|
||||
* @param interpolator
|
||||
* @param listener
|
||||
*/
|
||||
void startScaleAnimationWithAlpha( float fromX,
|
||||
float toX,
|
||||
float fromY,
|
||||
float toY,
|
||||
float fromAlpha,
|
||||
float toAlpha,
|
||||
int duration,
|
||||
Interpolator interpolator,
|
||||
OnMarkerAnimationListener listener );
|
||||
|
||||
|
||||
/**
|
||||
* 弹跳动画
|
||||
*
|
||||
* @param high
|
||||
* @param duration
|
||||
* @param interpolator
|
||||
* @param listener
|
||||
*/
|
||||
void startJumpAnimation( float high,
|
||||
long duration,
|
||||
Interpolator interpolator,
|
||||
OnMarkerAnimationListener listener );
|
||||
|
||||
/**
|
||||
* 是否是否可点击
|
||||
*
|
||||
@@ -319,28 +185,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
void setClickable( boolean clickable );
|
||||
|
||||
/**
|
||||
* 开始平滑移动
|
||||
*
|
||||
* @param points 坐标点
|
||||
* @param duration 时长
|
||||
*/
|
||||
void startSmooth( List< MogoLatLng > points, int duration );
|
||||
|
||||
/**
|
||||
* 开始平滑移动,毫秒
|
||||
*
|
||||
* @param points 坐标点
|
||||
* @param duration 时长
|
||||
*/
|
||||
void startSmoothInMs( List< MogoLatLng > points, long duration );
|
||||
|
||||
/**
|
||||
* info window 是否正在显示
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isInfoWindowShowing();
|
||||
|
||||
/**
|
||||
* 设置是否是gps
|
||||
@@ -349,31 +193,6 @@ public interface IMogoMarker {
|
||||
*/
|
||||
void setGps( boolean isGps );
|
||||
|
||||
/**
|
||||
* 使用3D资源
|
||||
*/
|
||||
default String use3DResource( @RawRes int model3D ) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用缓存过的3d资源
|
||||
*
|
||||
* @param resName
|
||||
*/
|
||||
default void use3DResource( String resName ) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用缓存过的2d资源
|
||||
*
|
||||
* @param resName
|
||||
*/
|
||||
default void use2DResource( String resName ) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置3D车模颜色
|
||||
*
|
||||
@@ -383,18 +202,6 @@ public interface IMogoMarker {
|
||||
|
||||
}
|
||||
|
||||
default void updateInfoWindowView( View view ) {
|
||||
|
||||
}
|
||||
|
||||
default void updateInfoWindowView( String viewResName ) {
|
||||
|
||||
}
|
||||
|
||||
default void setInfoWindowOffset( int offsetX, int offsetY ) {
|
||||
|
||||
}
|
||||
|
||||
default void addDynamicAnchorPosition( MogoLatLng latLng, float angle, long duration ) {
|
||||
|
||||
}
|
||||
@@ -408,12 +215,4 @@ public interface IMogoMarker {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 marker infowindow 内部使用资源内容 md5
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
default String getMarkerInfoResName() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoAoiItem implements Parcelable {
|
||||
|
||||
private String aoiId;
|
||||
private String aoiName;
|
||||
private String adCode;
|
||||
private MogoLatLng aoiCenterPoint;
|
||||
private float aoiArea;
|
||||
|
||||
public String getAoiId() {
|
||||
return aoiId;
|
||||
}
|
||||
|
||||
public void setAoiId( String aoiId ) {
|
||||
this.aoiId = aoiId;
|
||||
}
|
||||
|
||||
public String getAoiName() {
|
||||
return aoiName;
|
||||
}
|
||||
|
||||
public void setAoiName( String aoiName ) {
|
||||
this.aoiName = aoiName;
|
||||
}
|
||||
|
||||
public String getAdCode() {
|
||||
return adCode;
|
||||
}
|
||||
|
||||
public void setAdCode( String adCode ) {
|
||||
this.adCode = adCode;
|
||||
}
|
||||
|
||||
public MogoLatLng getAoiCenterPoint() {
|
||||
return aoiCenterPoint;
|
||||
}
|
||||
|
||||
public void setAoiCenterPoint( MogoLatLng aoiCenterPoint ) {
|
||||
this.aoiCenterPoint = aoiCenterPoint;
|
||||
}
|
||||
|
||||
public float getAoiArea() {
|
||||
return aoiArea;
|
||||
}
|
||||
|
||||
public void setAoiArea( float aoiArea ) {
|
||||
this.aoiArea = aoiArea;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.aoiId );
|
||||
dest.writeString( this.aoiName );
|
||||
dest.writeString( this.adCode );
|
||||
dest.writeParcelable( this.aoiCenterPoint, flags );
|
||||
dest.writeFloat( this.aoiArea );
|
||||
}
|
||||
|
||||
public MogoAoiItem() {
|
||||
}
|
||||
|
||||
protected MogoAoiItem( Parcel in ) {
|
||||
this.aoiId = in.readString();
|
||||
this.aoiName = in.readString();
|
||||
this.adCode = in.readString();
|
||||
this.aoiCenterPoint = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.aoiArea = in.readFloat();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoAoiItem > CREATOR = new Parcelable.Creator< MogoAoiItem >() {
|
||||
@Override
|
||||
public MogoAoiItem createFromParcel( Parcel source ) {
|
||||
return new MogoAoiItem( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoAoiItem[] newArray( int size ) {
|
||||
return new MogoAoiItem[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoAoiItem{" +
|
||||
"aoiId='" + aoiId + '\'' +
|
||||
", aoiName='" + aoiName + '\'' +
|
||||
", adCode='" + adCode + '\'' +
|
||||
", aoiCenterPoint=" + aoiCenterPoint +
|
||||
", aoiArea=" + aoiArea +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoBusinessArea implements Parcelable {
|
||||
|
||||
private MogoLatLng centerPoint;
|
||||
private String name;
|
||||
|
||||
public MogoLatLng getCenterPoint() {
|
||||
return centerPoint;
|
||||
}
|
||||
|
||||
public void setCenterPoint( MogoLatLng centerPoint ) {
|
||||
this.centerPoint = centerPoint;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName( String name ) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeParcelable( this.centerPoint, flags );
|
||||
dest.writeString( this.name );
|
||||
}
|
||||
|
||||
public MogoBusinessArea() {
|
||||
}
|
||||
|
||||
protected MogoBusinessArea( Parcel in ) {
|
||||
this.centerPoint = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.name = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoBusinessArea > CREATOR = new Parcelable.Creator< MogoBusinessArea >() {
|
||||
@Override
|
||||
public MogoBusinessArea createFromParcel( Parcel source ) {
|
||||
return new MogoBusinessArea( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoBusinessArea[] newArray( int size ) {
|
||||
return new MogoBusinessArea[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoBusinessArea{" +
|
||||
"centerPoint=" + centerPoint +
|
||||
", name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoCrossroad implements Parcelable {
|
||||
|
||||
private float distance;
|
||||
private String direction;
|
||||
private String firstRoadId;
|
||||
private String firstRoadName;
|
||||
private String secondRoadId;
|
||||
private String secondRoadName;
|
||||
|
||||
public float getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance( float distance ) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection( String direction ) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public String getFirstRoadId() {
|
||||
return firstRoadId;
|
||||
}
|
||||
|
||||
public void setFirstRoadId( String firstRoadId ) {
|
||||
this.firstRoadId = firstRoadId;
|
||||
}
|
||||
|
||||
public String getFirstRoadName() {
|
||||
return firstRoadName;
|
||||
}
|
||||
|
||||
public void setFirstRoadName( String firstRoadName ) {
|
||||
this.firstRoadName = firstRoadName;
|
||||
}
|
||||
|
||||
public String getSecondRoadId() {
|
||||
return secondRoadId;
|
||||
}
|
||||
|
||||
public void setSecondRoadId( String secondRoadId ) {
|
||||
this.secondRoadId = secondRoadId;
|
||||
}
|
||||
|
||||
public String getSecondRoadName() {
|
||||
return secondRoadName;
|
||||
}
|
||||
|
||||
public void setSecondRoadName( String secondRoadName ) {
|
||||
this.secondRoadName = secondRoadName;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeFloat( this.distance );
|
||||
dest.writeString( this.direction );
|
||||
dest.writeString( this.firstRoadId );
|
||||
dest.writeString( this.firstRoadName );
|
||||
dest.writeString( this.secondRoadId );
|
||||
dest.writeString( this.secondRoadName );
|
||||
}
|
||||
|
||||
public MogoCrossroad() {
|
||||
}
|
||||
|
||||
protected MogoCrossroad( Parcel in ) {
|
||||
this.distance = in.readFloat();
|
||||
this.direction = in.readString();
|
||||
this.firstRoadId = in.readString();
|
||||
this.firstRoadName = in.readString();
|
||||
this.secondRoadId = in.readString();
|
||||
this.secondRoadName = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoCrossroad > CREATOR = new Parcelable.Creator< MogoCrossroad >() {
|
||||
@Override
|
||||
public MogoCrossroad createFromParcel( Parcel source ) {
|
||||
return new MogoCrossroad( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoCrossroad[] newArray( int size ) {
|
||||
return new MogoCrossroad[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoCrossroad{" +
|
||||
"distance=" + distance +
|
||||
", direction='" + direction + '\'' +
|
||||
", firstRoadId='" + firstRoadId + '\'' +
|
||||
", firstRoadName='" + firstRoadName + '\'' +
|
||||
", secondRoadId='" + secondRoadId + '\'' +
|
||||
", secondRoadName='" + secondRoadName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* geo 搜索位置信息
|
||||
*/
|
||||
public class MogoGeocodeAddress {
|
||||
|
||||
private String formatAddress;
|
||||
private String province;
|
||||
private String city;
|
||||
private String district;
|
||||
private String township;
|
||||
private String neighborhood;
|
||||
private String building;
|
||||
private String adcode;
|
||||
private MogoLatLng latlng;
|
||||
private String level;
|
||||
|
||||
public String getFormatAddress() {
|
||||
return formatAddress;
|
||||
}
|
||||
|
||||
public void setFormatAddress( String formatAddress ) {
|
||||
this.formatAddress = formatAddress;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince( String province ) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity( String city ) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict( String district ) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public String getTownship() {
|
||||
return township;
|
||||
}
|
||||
|
||||
public void setTownship( String township ) {
|
||||
this.township = township;
|
||||
}
|
||||
|
||||
public String getNeighborhood() {
|
||||
return neighborhood;
|
||||
}
|
||||
|
||||
public void setNeighborhood( String neighborhood ) {
|
||||
this.neighborhood = neighborhood;
|
||||
}
|
||||
|
||||
public String getBuilding() {
|
||||
return building;
|
||||
}
|
||||
|
||||
public void setBuilding( String building ) {
|
||||
this.building = building;
|
||||
}
|
||||
|
||||
public String getAdcode() {
|
||||
return adcode;
|
||||
}
|
||||
|
||||
public void setAdcode( String adcode ) {
|
||||
this.adcode = adcode;
|
||||
}
|
||||
|
||||
public MogoLatLng getLatlng() {
|
||||
return latlng;
|
||||
}
|
||||
|
||||
public void setLatlng( MogoLatLng latlng ) {
|
||||
this.latlng = latlng;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel( String level ) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoGeocodeAddress{" +
|
||||
"formatAddress='" + formatAddress + '\'' +
|
||||
", province='" + province + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", district='" + district + '\'' +
|
||||
", township='" + township + '\'' +
|
||||
", neighborhood='" + neighborhood + '\'' +
|
||||
", building='" + building + '\'' +
|
||||
", adcode='" + adcode + '\'' +
|
||||
", latlng=" + latlng +
|
||||
", level='" + level + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 地理编码搜索结果
|
||||
*/
|
||||
public class MogoGeocodeResult {
|
||||
|
||||
private List< MogoGeocodeAddress > addresses = new ArrayList<>();
|
||||
|
||||
public List< MogoGeocodeAddress > getAddresses() {
|
||||
return addresses;
|
||||
}
|
||||
|
||||
public void setAddresses( List< MogoGeocodeAddress > addresses ) {
|
||||
this.addresses = addresses;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoGeocodeResult{" +
|
||||
"addresses=" + addresses +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoIndoorData implements Parcelable {
|
||||
|
||||
private String poiId;
|
||||
private int floor;
|
||||
private String floorName;
|
||||
|
||||
public String getPoiId() {
|
||||
return poiId;
|
||||
}
|
||||
|
||||
public void setPoiId( String poiId ) {
|
||||
this.poiId = poiId;
|
||||
}
|
||||
|
||||
public int getFloor() {
|
||||
return floor;
|
||||
}
|
||||
|
||||
public void setFloor( int floor ) {
|
||||
this.floor = floor;
|
||||
}
|
||||
|
||||
public String getFloorName() {
|
||||
return floorName;
|
||||
}
|
||||
|
||||
public void setFloorName( String floorName ) {
|
||||
this.floorName = floorName;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.poiId );
|
||||
dest.writeInt( this.floor );
|
||||
dest.writeString( this.floorName );
|
||||
}
|
||||
|
||||
public MogoIndoorData() {
|
||||
}
|
||||
|
||||
protected MogoIndoorData( Parcel in ) {
|
||||
this.poiId = in.readString();
|
||||
this.floor = in.readInt();
|
||||
this.floorName = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoIndoorData > CREATOR = new Parcelable.Creator< MogoIndoorData >() {
|
||||
@Override
|
||||
public MogoIndoorData createFromParcel( Parcel source ) {
|
||||
return new MogoIndoorData( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoIndoorData[] newArray( int size ) {
|
||||
return new MogoIndoorData[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoIndoorData{" +
|
||||
"poiId='" + poiId + '\'' +
|
||||
", floor=" + floor +
|
||||
", floorName='" + floorName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoPhoto implements Parcelable {
|
||||
|
||||
private String title;
|
||||
private String url;
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle( String title ) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl( String url ) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.title );
|
||||
dest.writeString( this.url );
|
||||
}
|
||||
|
||||
public MogoPhoto() {
|
||||
}
|
||||
|
||||
protected MogoPhoto( Parcel in ) {
|
||||
this.title = in.readString();
|
||||
this.url = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoPhoto > CREATOR = new Parcelable.Creator< MogoPhoto >() {
|
||||
@Override
|
||||
public MogoPhoto createFromParcel( Parcel source ) {
|
||||
return new MogoPhoto( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoPhoto[] newArray( int size ) {
|
||||
return new MogoPhoto[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoPhoto{" +
|
||||
"title='" + title + '\'' +
|
||||
", url='" + url + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,389 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoPoiItem implements Parcelable {
|
||||
|
||||
private String businessArea;
|
||||
private String adName;
|
||||
private String cityName;
|
||||
private String provinceName;
|
||||
private String typeDes;
|
||||
private String tel;
|
||||
private String adCode;
|
||||
private String poiId;
|
||||
private int distance;
|
||||
private String title;
|
||||
private String snippet;
|
||||
private MogoLatLng point;
|
||||
private String cityCode;
|
||||
private MogoLatLng enter;
|
||||
private MogoLatLng exit;
|
||||
private String website;
|
||||
private String postcode;
|
||||
private String email;
|
||||
private String direction;
|
||||
private boolean indoorMap;
|
||||
private String provinceCode;
|
||||
private String parkingType;
|
||||
private List< MogoSubPoiItem > subPois = new ArrayList<>();
|
||||
private MogoIndoorData indoorData;
|
||||
private List< MogoPhoto > photos = new ArrayList<>();
|
||||
private MogoPoiItemExtension poiExtension;
|
||||
private String typeCode;
|
||||
private String shopID;
|
||||
|
||||
public String getBusinessArea() {
|
||||
return businessArea;
|
||||
}
|
||||
|
||||
public void setBusinessArea( String businessArea ) {
|
||||
this.businessArea = businessArea;
|
||||
}
|
||||
|
||||
public String getAdName() {
|
||||
return adName;
|
||||
}
|
||||
|
||||
public void setAdName( String adName ) {
|
||||
this.adName = adName;
|
||||
}
|
||||
|
||||
public String getCityName() {
|
||||
return cityName;
|
||||
}
|
||||
|
||||
public void setCityName( String cityName ) {
|
||||
this.cityName = cityName;
|
||||
}
|
||||
|
||||
public String getProvinceName() {
|
||||
return provinceName;
|
||||
}
|
||||
|
||||
public void setProvinceName( String provinceName ) {
|
||||
this.provinceName = provinceName;
|
||||
}
|
||||
|
||||
public String getTypeDes() {
|
||||
return typeDes;
|
||||
}
|
||||
|
||||
public void setTypeDes( String typeDes ) {
|
||||
this.typeDes = typeDes;
|
||||
}
|
||||
|
||||
public String getTel() {
|
||||
return tel;
|
||||
}
|
||||
|
||||
public void setTel( String tel ) {
|
||||
this.tel = tel;
|
||||
}
|
||||
|
||||
public String getAdCode() {
|
||||
return adCode;
|
||||
}
|
||||
|
||||
public void setAdCode( String adCode ) {
|
||||
this.adCode = adCode;
|
||||
}
|
||||
|
||||
public String getPoiId() {
|
||||
return poiId;
|
||||
}
|
||||
|
||||
public void setPoiId( String poiId ) {
|
||||
this.poiId = poiId;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance( int distance ) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle( String title ) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getSnippet() {
|
||||
return snippet;
|
||||
}
|
||||
|
||||
public void setSnippet( String snippet ) {
|
||||
this.snippet = snippet;
|
||||
}
|
||||
|
||||
public MogoLatLng getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
public void setPoint( MogoLatLng point ) {
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
public String getCityCode() {
|
||||
return cityCode;
|
||||
}
|
||||
|
||||
public void setCityCode( String cityCode ) {
|
||||
this.cityCode = cityCode;
|
||||
}
|
||||
|
||||
public MogoLatLng getEnter() {
|
||||
return enter;
|
||||
}
|
||||
|
||||
public void setEnter( MogoLatLng enter ) {
|
||||
this.enter = enter;
|
||||
}
|
||||
|
||||
public MogoLatLng getExit() {
|
||||
return exit;
|
||||
}
|
||||
|
||||
public void setExit( MogoLatLng exit ) {
|
||||
this.exit = exit;
|
||||
}
|
||||
|
||||
public String getWebsite() {
|
||||
return website;
|
||||
}
|
||||
|
||||
public void setWebsite( String website ) {
|
||||
this.website = website;
|
||||
}
|
||||
|
||||
public String getPostcode() {
|
||||
return postcode;
|
||||
}
|
||||
|
||||
public void setPostcode( String postcode ) {
|
||||
this.postcode = postcode;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail( String email ) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection( String direction ) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public boolean isIndoorMap() {
|
||||
return indoorMap;
|
||||
}
|
||||
|
||||
public void setIndoorMap( boolean indoorMap ) {
|
||||
this.indoorMap = indoorMap;
|
||||
}
|
||||
|
||||
public String getProvinceCode() {
|
||||
return provinceCode;
|
||||
}
|
||||
|
||||
public void setProvinceCode( String provinceCode ) {
|
||||
this.provinceCode = provinceCode;
|
||||
}
|
||||
|
||||
public String getParkingType() {
|
||||
return parkingType;
|
||||
}
|
||||
|
||||
public void setParkingType( String parkingType ) {
|
||||
this.parkingType = parkingType;
|
||||
}
|
||||
|
||||
public List< MogoSubPoiItem > getSubPois() {
|
||||
return subPois;
|
||||
}
|
||||
|
||||
public void setSubPois( List< MogoSubPoiItem > subPois ) {
|
||||
this.subPois = subPois;
|
||||
}
|
||||
|
||||
public MogoIndoorData getIndoorData() {
|
||||
return indoorData;
|
||||
}
|
||||
|
||||
public void setIndoorData( MogoIndoorData indoorData ) {
|
||||
this.indoorData = indoorData;
|
||||
}
|
||||
|
||||
public List< MogoPhoto > getPhotos() {
|
||||
return photos;
|
||||
}
|
||||
|
||||
public void setPhotos( List< MogoPhoto > photos ) {
|
||||
this.photos = photos;
|
||||
}
|
||||
|
||||
public MogoPoiItemExtension getPoiExtension() {
|
||||
return poiExtension;
|
||||
}
|
||||
|
||||
public void setPoiExtension( MogoPoiItemExtension poiExtension ) {
|
||||
this.poiExtension = poiExtension;
|
||||
}
|
||||
|
||||
public String getTypeCode() {
|
||||
return typeCode;
|
||||
}
|
||||
|
||||
public void setTypeCode( String typeCode ) {
|
||||
this.typeCode = typeCode;
|
||||
}
|
||||
|
||||
public String getShopID() {
|
||||
return shopID;
|
||||
}
|
||||
|
||||
public void setShopID( String shopID ) {
|
||||
this.shopID = shopID;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.businessArea );
|
||||
dest.writeString( this.adName );
|
||||
dest.writeString( this.cityName );
|
||||
dest.writeString( this.provinceName );
|
||||
dest.writeString( this.typeDes );
|
||||
dest.writeString( this.tel );
|
||||
dest.writeString( this.adCode );
|
||||
dest.writeString( this.poiId );
|
||||
dest.writeInt( this.distance );
|
||||
dest.writeString( this.title );
|
||||
dest.writeString( this.snippet );
|
||||
dest.writeParcelable( this.point, flags );
|
||||
dest.writeString( this.cityCode );
|
||||
dest.writeParcelable( this.enter, flags );
|
||||
dest.writeParcelable( this.exit, flags );
|
||||
dest.writeString( this.website );
|
||||
dest.writeString( this.postcode );
|
||||
dest.writeString( this.email );
|
||||
dest.writeString( this.direction );
|
||||
dest.writeByte( this.indoorMap ? ( byte ) 1 : ( byte ) 0 );
|
||||
dest.writeString( this.provinceCode );
|
||||
dest.writeString( this.parkingType );
|
||||
dest.writeTypedList( this.subPois );
|
||||
dest.writeParcelable( this.indoorData, flags );
|
||||
dest.writeTypedList( this.photos );
|
||||
dest.writeParcelable( this.poiExtension, flags );
|
||||
dest.writeString( this.typeCode );
|
||||
dest.writeString( this.shopID );
|
||||
}
|
||||
|
||||
public MogoPoiItem() {
|
||||
}
|
||||
|
||||
protected MogoPoiItem( Parcel in ) {
|
||||
this.businessArea = in.readString();
|
||||
this.adName = in.readString();
|
||||
this.cityName = in.readString();
|
||||
this.provinceName = in.readString();
|
||||
this.typeDes = in.readString();
|
||||
this.tel = in.readString();
|
||||
this.adCode = in.readString();
|
||||
this.poiId = in.readString();
|
||||
this.distance = in.readInt();
|
||||
this.title = in.readString();
|
||||
this.snippet = in.readString();
|
||||
this.point = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.cityCode = in.readString();
|
||||
this.enter = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.exit = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.website = in.readString();
|
||||
this.postcode = in.readString();
|
||||
this.email = in.readString();
|
||||
this.direction = in.readString();
|
||||
this.indoorMap = in.readByte() != 0;
|
||||
this.provinceCode = in.readString();
|
||||
this.parkingType = in.readString();
|
||||
this.subPois = in.createTypedArrayList( MogoSubPoiItem.CREATOR );
|
||||
this.indoorData = in.readParcelable( MogoIndoorData.class.getClassLoader() );
|
||||
this.photos = in.createTypedArrayList( MogoPhoto.CREATOR );
|
||||
this.poiExtension = in.readParcelable( MogoPoiItemExtension.class.getClassLoader() );
|
||||
this.typeCode = in.readString();
|
||||
this.shopID = in.readString();
|
||||
}
|
||||
|
||||
public static final Creator< MogoPoiItem > CREATOR = new Creator< MogoPoiItem >() {
|
||||
@Override
|
||||
public MogoPoiItem createFromParcel( Parcel source ) {
|
||||
return new MogoPoiItem( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoPoiItem[] newArray( int size ) {
|
||||
return new MogoPoiItem[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoPoiItem{" +
|
||||
"businessArea='" + businessArea + '\'' +
|
||||
", adName='" + adName + '\'' +
|
||||
", cityName='" + cityName + '\'' +
|
||||
", provinceName='" + provinceName + '\'' +
|
||||
", typeDes='" + typeDes + '\'' +
|
||||
", tel='" + tel + '\'' +
|
||||
", adCode='" + adCode + '\'' +
|
||||
", poiId='" + poiId + '\'' +
|
||||
", distance=" + distance +
|
||||
", title='" + title + '\'' +
|
||||
", snippet='" + snippet + '\'' +
|
||||
", point=" + point +
|
||||
", cityCode='" + cityCode + '\'' +
|
||||
", enter=" + enter +
|
||||
", exit=" + exit +
|
||||
", website='" + website + '\'' +
|
||||
", postcode='" + postcode + '\'' +
|
||||
", email='" + email + '\'' +
|
||||
", direction='" + direction + '\'' +
|
||||
", indoorMap=" + indoorMap +
|
||||
", provinceCode='" + provinceCode + '\'' +
|
||||
", parkingType='" + parkingType + '\'' +
|
||||
", subPois=" + subPois +
|
||||
", indoorData=" + indoorData +
|
||||
", photos=" + photos +
|
||||
", poiExtension=" + poiExtension +
|
||||
", typeCode='" + typeCode + '\'' +
|
||||
", shopID='" + shopID + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoPoiItemExtension implements Parcelable {
|
||||
|
||||
private String opentime;
|
||||
private String rating;
|
||||
|
||||
public String getOpentime() {
|
||||
return opentime;
|
||||
}
|
||||
|
||||
public void setOpentime( String opentime ) {
|
||||
this.opentime = opentime;
|
||||
}
|
||||
|
||||
public String getRating() {
|
||||
return rating;
|
||||
}
|
||||
|
||||
public void setRating( String rating ) {
|
||||
this.rating = rating;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.opentime );
|
||||
dest.writeString( this.rating );
|
||||
}
|
||||
|
||||
public MogoPoiItemExtension() {
|
||||
}
|
||||
|
||||
protected MogoPoiItemExtension( Parcel in ) {
|
||||
this.opentime = in.readString();
|
||||
this.rating = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoPoiItemExtension > CREATOR = new Parcelable.Creator< MogoPoiItemExtension >() {
|
||||
@Override
|
||||
public MogoPoiItemExtension createFromParcel( Parcel source ) {
|
||||
return new MogoPoiItemExtension( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoPoiItemExtension[] newArray( int size ) {
|
||||
return new MogoPoiItemExtension[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,254 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 逆地理编码地址
|
||||
*/
|
||||
public class MogoRegeocodeAddress implements Parcelable {
|
||||
|
||||
private String formatAddress;
|
||||
private String province;
|
||||
private String city;
|
||||
private String cityCode;
|
||||
private String adCode;
|
||||
private String district;
|
||||
private String township;
|
||||
private String neighborhood;
|
||||
private String building;
|
||||
private MogoStreetNumber streetNumber;
|
||||
private List< MogoRegeocodeRoad > roads;
|
||||
private List< MogoPoiItem > pois;
|
||||
private List< MogoCrossroad > crossroads;
|
||||
private List< MogoBusinessArea > businessAreas;
|
||||
private List< MogoAoiItem > aois;
|
||||
private String towncode;
|
||||
private String country;
|
||||
|
||||
public String getFormatAddress() {
|
||||
return formatAddress;
|
||||
}
|
||||
|
||||
public void setFormatAddress( String formatAddress ) {
|
||||
this.formatAddress = formatAddress;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince( String province ) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity( String city ) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getCityCode() {
|
||||
return cityCode;
|
||||
}
|
||||
|
||||
public void setCityCode( String cityCode ) {
|
||||
this.cityCode = cityCode;
|
||||
}
|
||||
|
||||
public String getAdCode() {
|
||||
return adCode;
|
||||
}
|
||||
|
||||
public void setAdCode( String adCode ) {
|
||||
this.adCode = adCode;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict( String district ) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public String getTownship() {
|
||||
return township;
|
||||
}
|
||||
|
||||
public void setTownship( String township ) {
|
||||
this.township = township;
|
||||
}
|
||||
|
||||
public String getNeighborhood() {
|
||||
return neighborhood;
|
||||
}
|
||||
|
||||
public void setNeighborhood( String neighborhood ) {
|
||||
this.neighborhood = neighborhood;
|
||||
}
|
||||
|
||||
public String getBuilding() {
|
||||
return building;
|
||||
}
|
||||
|
||||
public void setBuilding( String building ) {
|
||||
this.building = building;
|
||||
}
|
||||
|
||||
public MogoStreetNumber getStreetNumber() {
|
||||
return streetNumber;
|
||||
}
|
||||
|
||||
public void setStreetNumber( MogoStreetNumber streetNumber ) {
|
||||
this.streetNumber = streetNumber;
|
||||
}
|
||||
|
||||
public List< MogoRegeocodeRoad > getRoads() {
|
||||
return roads;
|
||||
}
|
||||
|
||||
public void setRoads( List< MogoRegeocodeRoad > roads ) {
|
||||
this.roads = roads;
|
||||
}
|
||||
|
||||
public List< MogoPoiItem > getPois() {
|
||||
return pois;
|
||||
}
|
||||
|
||||
public void setPois( List< MogoPoiItem > pois ) {
|
||||
this.pois = pois;
|
||||
}
|
||||
|
||||
public List< MogoCrossroad > getCrossroads() {
|
||||
return crossroads;
|
||||
}
|
||||
|
||||
public void setCrossroads( List< MogoCrossroad > crossroads ) {
|
||||
this.crossroads = crossroads;
|
||||
}
|
||||
|
||||
public List< MogoBusinessArea > getBusinessAreas() {
|
||||
return businessAreas;
|
||||
}
|
||||
|
||||
public void setBusinessAreas( List< MogoBusinessArea > businessAreas ) {
|
||||
this.businessAreas = businessAreas;
|
||||
}
|
||||
|
||||
public List< MogoAoiItem > getAois() {
|
||||
return aois;
|
||||
}
|
||||
|
||||
public void setAois( List< MogoAoiItem > aois ) {
|
||||
this.aois = aois;
|
||||
}
|
||||
|
||||
public String getTowncode() {
|
||||
return towncode;
|
||||
}
|
||||
|
||||
public void setTowncode( String towncode ) {
|
||||
this.towncode = towncode;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry( String country ) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.formatAddress );
|
||||
dest.writeString( this.province );
|
||||
dest.writeString( this.city );
|
||||
dest.writeString( this.cityCode );
|
||||
dest.writeString( this.adCode );
|
||||
dest.writeString( this.district );
|
||||
dest.writeString( this.township );
|
||||
dest.writeString( this.neighborhood );
|
||||
dest.writeString( this.building );
|
||||
dest.writeParcelable( this.streetNumber, flags );
|
||||
dest.writeTypedList( this.roads );
|
||||
dest.writeTypedList( this.pois );
|
||||
dest.writeTypedList( this.crossroads );
|
||||
dest.writeTypedList( this.businessAreas );
|
||||
dest.writeTypedList( this.aois );
|
||||
dest.writeString( this.towncode );
|
||||
dest.writeString( this.country );
|
||||
}
|
||||
|
||||
public MogoRegeocodeAddress() {
|
||||
}
|
||||
|
||||
protected MogoRegeocodeAddress( Parcel in ) {
|
||||
this.formatAddress = in.readString();
|
||||
this.province = in.readString();
|
||||
this.city = in.readString();
|
||||
this.cityCode = in.readString();
|
||||
this.adCode = in.readString();
|
||||
this.district = in.readString();
|
||||
this.township = in.readString();
|
||||
this.neighborhood = in.readString();
|
||||
this.building = in.readString();
|
||||
this.streetNumber = in.readParcelable( MogoStreetNumber.class.getClassLoader() );
|
||||
this.roads = in.createTypedArrayList( MogoRegeocodeRoad.CREATOR );
|
||||
this.pois = in.createTypedArrayList( MogoPoiItem.CREATOR );
|
||||
this.crossroads = in.createTypedArrayList( MogoCrossroad.CREATOR );
|
||||
this.businessAreas = in.createTypedArrayList( MogoBusinessArea.CREATOR );
|
||||
this.aois = in.createTypedArrayList( MogoAoiItem.CREATOR );
|
||||
this.towncode = in.readString();
|
||||
this.country = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoRegeocodeAddress > CREATOR = new Parcelable.Creator< MogoRegeocodeAddress >() {
|
||||
@Override
|
||||
public MogoRegeocodeAddress createFromParcel( Parcel source ) {
|
||||
return new MogoRegeocodeAddress( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoRegeocodeAddress[] newArray( int size ) {
|
||||
return new MogoRegeocodeAddress[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoRegeocodeAddress{" +
|
||||
"formatAddress='" + formatAddress + '\'' +
|
||||
", province='" + province + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", cityCode='" + cityCode + '\'' +
|
||||
", adCode='" + adCode + '\'' +
|
||||
", district='" + district + '\'' +
|
||||
", township='" + township + '\'' +
|
||||
", neighborhood='" + neighborhood + '\'' +
|
||||
", building='" + building + '\'' +
|
||||
", streetNumber=" + streetNumber +
|
||||
", roads=" + roads +
|
||||
", pois=" + pois +
|
||||
", crossroads=" + crossroads +
|
||||
", businessAreas=" + businessAreas +
|
||||
", aois=" + aois +
|
||||
", towncode='" + towncode + '\'' +
|
||||
", country='" + country + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 逆地理编码结果
|
||||
*/
|
||||
public class MogoRegeocodeResult implements Parcelable {
|
||||
|
||||
private MogoRegeocodeAddress regeocodeAddress;
|
||||
|
||||
public MogoRegeocodeAddress getRegeocodeAddress() {
|
||||
return regeocodeAddress;
|
||||
}
|
||||
|
||||
public void setRegeocodeAddress( MogoRegeocodeAddress regeocodeAddress ) {
|
||||
this.regeocodeAddress = regeocodeAddress;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeParcelable( this.regeocodeAddress, flags );
|
||||
}
|
||||
|
||||
public MogoRegeocodeResult() {
|
||||
}
|
||||
|
||||
protected MogoRegeocodeResult( Parcel in ) {
|
||||
this.regeocodeAddress = in.readParcelable( MogoRegeocodeAddress.class.getClassLoader() );
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoRegeocodeResult > CREATOR = new Parcelable.Creator< MogoRegeocodeResult >() {
|
||||
@Override
|
||||
public MogoRegeocodeResult createFromParcel( Parcel source ) {
|
||||
return new MogoRegeocodeResult( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoRegeocodeResult[] newArray( int size ) {
|
||||
return new MogoRegeocodeResult[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoRegeocodeResult{" +
|
||||
"regeocodeAddress=" + regeocodeAddress +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoRegeocodeRoad implements Parcelable {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private float distance;
|
||||
private String direction;
|
||||
private MogoLatLng point;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId( String id ) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName( String name ) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public float getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance( float distance ) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection( String direction ) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public MogoLatLng getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
public void setPoint( MogoLatLng point ) {
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.id );
|
||||
dest.writeString( this.name );
|
||||
dest.writeFloat( this.distance );
|
||||
dest.writeString( this.direction );
|
||||
dest.writeParcelable( this.point, flags );
|
||||
}
|
||||
|
||||
public MogoRegeocodeRoad() {
|
||||
}
|
||||
|
||||
protected MogoRegeocodeRoad( Parcel in ) {
|
||||
this.id = in.readString();
|
||||
this.name = in.readString();
|
||||
this.distance = in.readFloat();
|
||||
this.direction = in.readString();
|
||||
this.point = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoRegeocodeRoad > CREATOR = new Parcelable.Creator< MogoRegeocodeRoad >() {
|
||||
@Override
|
||||
public MogoRegeocodeRoad createFromParcel( Parcel source ) {
|
||||
return new MogoRegeocodeRoad( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoRegeocodeRoad[] newArray( int size ) {
|
||||
return new MogoRegeocodeRoad[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoRegeocodeRoad{" +
|
||||
"id='" + id + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", distance=" + distance +
|
||||
", direction='" + direction + '\'' +
|
||||
", point=" + point +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoStreetNumber implements Parcelable {
|
||||
|
||||
private String street;
|
||||
private String number;
|
||||
private MogoLatLng latLonPoint;
|
||||
private String direction;
|
||||
private float distance;
|
||||
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
|
||||
public void setStreet( String street ) {
|
||||
this.street = street;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber( String number ) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public MogoLatLng getLatLonPoint() {
|
||||
return latLonPoint;
|
||||
}
|
||||
|
||||
public void setLatLonPoint( MogoLatLng latLonPoint ) {
|
||||
this.latLonPoint = latLonPoint;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection( String direction ) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public float getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance( float distance ) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.street );
|
||||
dest.writeString( this.number );
|
||||
dest.writeParcelable( this.latLonPoint, flags );
|
||||
dest.writeString( this.direction );
|
||||
dest.writeFloat( this.distance );
|
||||
}
|
||||
|
||||
public MogoStreetNumber() {
|
||||
}
|
||||
|
||||
protected MogoStreetNumber( Parcel in ) {
|
||||
this.street = in.readString();
|
||||
this.number = in.readString();
|
||||
this.latLonPoint = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.direction = in.readString();
|
||||
this.distance = in.readFloat();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoStreetNumber > CREATOR = new Parcelable.Creator< MogoStreetNumber >() {
|
||||
@Override
|
||||
public MogoStreetNumber createFromParcel( Parcel source ) {
|
||||
return new MogoStreetNumber( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoStreetNumber[] newArray( int size ) {
|
||||
return new MogoStreetNumber[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoStreetNumber{" +
|
||||
"street='" + street + '\'' +
|
||||
", number='" + number + '\'' +
|
||||
", latLonPoint=" + latLonPoint +
|
||||
", direction='" + direction + '\'' +
|
||||
", distance=" + distance +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoSubPoiItem implements Parcelable {
|
||||
|
||||
private String poiId;
|
||||
private String title;
|
||||
private String subName;
|
||||
private int distance;
|
||||
private MogoLatLng point;
|
||||
private String snippet;
|
||||
private String subTypeDes;
|
||||
|
||||
public String getPoiId() {
|
||||
return poiId;
|
||||
}
|
||||
|
||||
public void setPoiId( String poiId ) {
|
||||
this.poiId = poiId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle( String title ) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getSubName() {
|
||||
return subName;
|
||||
}
|
||||
|
||||
public void setSubName( String subName ) {
|
||||
this.subName = subName;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance( int distance ) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public MogoLatLng getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
public void setPoint( MogoLatLng point ) {
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
public String getSnippet() {
|
||||
return snippet;
|
||||
}
|
||||
|
||||
public void setSnippet( String snippet ) {
|
||||
this.snippet = snippet;
|
||||
}
|
||||
|
||||
public String getSubTypeDes() {
|
||||
return subTypeDes;
|
||||
}
|
||||
|
||||
public void setSubTypeDes( String subTypeDes ) {
|
||||
this.subTypeDes = subTypeDes;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.poiId );
|
||||
dest.writeString( this.title );
|
||||
dest.writeString( this.subName );
|
||||
dest.writeInt( this.distance );
|
||||
dest.writeParcelable( this.point, flags );
|
||||
dest.writeString( this.snippet );
|
||||
dest.writeString( this.subTypeDes );
|
||||
}
|
||||
|
||||
public MogoSubPoiItem() {
|
||||
}
|
||||
|
||||
protected MogoSubPoiItem( Parcel in ) {
|
||||
this.poiId = in.readString();
|
||||
this.title = in.readString();
|
||||
this.subName = in.readString();
|
||||
this.distance = in.readInt();
|
||||
this.point = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.snippet = in.readString();
|
||||
this.subTypeDes = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoSubPoiItem > CREATOR = new Parcelable.Creator< MogoSubPoiItem >() {
|
||||
@Override
|
||||
public MogoSubPoiItem createFromParcel( Parcel source ) {
|
||||
return new MogoSubPoiItem( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoSubPoiItem[] newArray( int size ) {
|
||||
return new MogoSubPoiItem[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoSubPoiItem{" +
|
||||
"poiId='" + poiId + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", subName='" + subName + '\'' +
|
||||
", distance=" + distance +
|
||||
", point=" + point +
|
||||
", snippet='" + snippet + '\'' +
|
||||
", subTypeDes='" + subTypeDes + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package com.mogo.map.search.geo.query;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 地理编码查询条件
|
||||
*/
|
||||
public class MogoGeocodeQuery implements Parcelable {
|
||||
private String locationName;
|
||||
private String city;
|
||||
|
||||
public String getLocationName() {
|
||||
return locationName;
|
||||
}
|
||||
|
||||
public void setLocationName( String locationName ) {
|
||||
this.locationName = locationName;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity( String city ) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public boolean check(){
|
||||
if ( TextUtils.isEmpty( locationName ) ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.locationName );
|
||||
dest.writeString( this.city );
|
||||
}
|
||||
|
||||
public MogoGeocodeQuery() {
|
||||
}
|
||||
|
||||
protected MogoGeocodeQuery( Parcel in ) {
|
||||
this.locationName = in.readString();
|
||||
this.city = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoGeocodeQuery > CREATOR = new Parcelable.Creator< MogoGeocodeQuery >() {
|
||||
@Override
|
||||
public MogoGeocodeQuery createFromParcel( Parcel source ) {
|
||||
return new MogoGeocodeQuery( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoGeocodeQuery[] newArray( int size ) {
|
||||
return new MogoGeocodeQuery[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
package com.mogo.map.search.geo.query;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 逆地理编码查询条件
|
||||
*/
|
||||
public class MogoRegeocodeQuery implements Parcelable {
|
||||
|
||||
private MogoLatLng point;
|
||||
private int radius;
|
||||
private String latlngType;
|
||||
private String poiType;
|
||||
|
||||
public MogoLatLng getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
public void setPoint( MogoLatLng point ) {
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
public int getRadius() {
|
||||
return radius;
|
||||
}
|
||||
|
||||
public void setRadius( int radius ) {
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public String getLatlngType() {
|
||||
return latlngType;
|
||||
}
|
||||
|
||||
public void setLatlngType( String latlngType ) {
|
||||
this.latlngType = latlngType;
|
||||
}
|
||||
|
||||
public String getPoiType() {
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType( String poiType ) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public boolean check() {
|
||||
if ( point == null ) {
|
||||
return false;
|
||||
}
|
||||
if ( point.lat < 1 && point.lon < 1 ) {
|
||||
return false;
|
||||
}
|
||||
if ( radius < 0 ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeParcelable( this.point, flags );
|
||||
dest.writeFloat( this.radius );
|
||||
dest.writeString( this.latlngType );
|
||||
dest.writeString( this.poiType );
|
||||
}
|
||||
|
||||
public MogoRegeocodeQuery() {
|
||||
}
|
||||
|
||||
protected MogoRegeocodeQuery( Parcel in ) {
|
||||
this.point = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.radius = in.readInt();
|
||||
this.latlngType = in.readString();
|
||||
this.poiType = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoRegeocodeQuery > CREATOR = new Parcelable.Creator< MogoRegeocodeQuery >() {
|
||||
@Override
|
||||
public MogoRegeocodeQuery createFromParcel( Parcel source ) {
|
||||
return new MogoRegeocodeQuery( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoRegeocodeQuery[] newArray( int size ) {
|
||||
return new MogoRegeocodeQuery[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.mogo.map.search.inputtips;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-20
|
||||
* <p>
|
||||
* inputtips 搜索结果
|
||||
*/
|
||||
public class MogoTip implements Parcelable {
|
||||
|
||||
private String poiID;
|
||||
private MogoLatLng point;
|
||||
private String name;
|
||||
private String district;
|
||||
private String adCode;
|
||||
private String address;
|
||||
private String typeCode;
|
||||
|
||||
public String getPoiID() {
|
||||
return poiID;
|
||||
}
|
||||
|
||||
public void setPoiID( String poiID ) {
|
||||
this.poiID = poiID;
|
||||
}
|
||||
|
||||
public MogoLatLng getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
public void setPoint( MogoLatLng point ) {
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName( String name ) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict( String district ) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public String getAdCode() {
|
||||
return adCode;
|
||||
}
|
||||
|
||||
public void setAdCode( String adCode ) {
|
||||
this.adCode = adCode;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress( String address ) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getTypeCode() {
|
||||
return typeCode;
|
||||
}
|
||||
|
||||
public void setTypeCode( String typeCode ) {
|
||||
this.typeCode = typeCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.poiID );
|
||||
dest.writeParcelable( this.point, flags );
|
||||
dest.writeString( this.name );
|
||||
dest.writeString( this.district );
|
||||
dest.writeString( this.adCode );
|
||||
dest.writeString( this.address );
|
||||
dest.writeString( this.typeCode );
|
||||
}
|
||||
|
||||
public MogoTip() {
|
||||
}
|
||||
|
||||
protected MogoTip( Parcel in ) {
|
||||
this.poiID = in.readString();
|
||||
this.point = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.name = in.readString();
|
||||
this.district = in.readString();
|
||||
this.adCode = in.readString();
|
||||
this.address = in.readString();
|
||||
this.typeCode = in.readString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoTip > CREATOR = new Parcelable.Creator< MogoTip >() {
|
||||
@Override
|
||||
public MogoTip createFromParcel( Parcel source ) {
|
||||
return new MogoTip( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoTip[] newArray( int size ) {
|
||||
return new MogoTip[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.mogo.map.search.inputtips.query;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-20
|
||||
* <p>
|
||||
* inputtips 搜索条件
|
||||
*/
|
||||
public class MogoInputtipsQuery {
|
||||
|
||||
private String keyword;
|
||||
private String city;
|
||||
private String type;
|
||||
private boolean cityLimit;
|
||||
private MogoLatLng location;
|
||||
|
||||
public String getKeyword() {
|
||||
return keyword;
|
||||
}
|
||||
|
||||
public void setKeyword( String keyword ) {
|
||||
this.keyword = keyword;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity( String city ) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType( String type ) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public boolean isCityLimit() {
|
||||
return cityLimit;
|
||||
}
|
||||
|
||||
public void setCityLimit( boolean cityLimit ) {
|
||||
this.cityLimit = cityLimit;
|
||||
}
|
||||
|
||||
public MogoLatLng getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation( MogoLatLng location ) {
|
||||
this.location = location;
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.mogo.map.search.poisearch;
|
||||
|
||||
import com.mogo.map.IDestroyable;
|
||||
import com.mogo.map.exception.MogoMapException;
|
||||
import com.mogo.map.search.geo.MogoPoiItem;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* poi 搜索
|
||||
*/
|
||||
public interface IMogoPoiSearch extends IDestroyable {
|
||||
|
||||
void setPoiSearchListener( IMogoPoiSearchListener listener );
|
||||
|
||||
/**
|
||||
* 异步搜索poi信息
|
||||
*/
|
||||
void searchPOIAsyn();
|
||||
|
||||
/**
|
||||
* 同步搜索poi信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
MogoPoiResult searchPOI() throws MogoMapException;
|
||||
|
||||
/**
|
||||
* 设置查询条件
|
||||
*
|
||||
* @param query
|
||||
*/
|
||||
void setQuery( MogoPoiSearchQuery query );
|
||||
|
||||
/**
|
||||
* 根据poiId搜索详情,同步
|
||||
*
|
||||
* @param poiId
|
||||
* @return
|
||||
*/
|
||||
MogoPoiItem searchPOIId( String poiId ) throws MogoMapException;
|
||||
|
||||
/**
|
||||
* 根据poiId搜索详情,异步
|
||||
*
|
||||
* @param poiId
|
||||
*/
|
||||
void searchPOIIdAsyn( String poiId );
|
||||
|
||||
/**
|
||||
* 周边检索POI
|
||||
*
|
||||
* @param bound
|
||||
*/
|
||||
void setBound( MogoSearchBound bound );
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.mogo.map.search.poisearch;
|
||||
|
||||
import com.mogo.map.search.geo.MogoPoiItem;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* poi 检索结果回调
|
||||
*/
|
||||
public interface IMogoPoiSearchListener {
|
||||
|
||||
/**
|
||||
* 返回POI搜索异步处理的结果。
|
||||
*/
|
||||
void onPoiSearched( MogoPoiResult result, int errorCode );
|
||||
|
||||
/**
|
||||
* poi ID 检索结果回调方法
|
||||
*/
|
||||
void onPoiItemSearched( MogoPoiItem item, int errorCode );
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.mogo.map.search.poisearch;
|
||||
|
||||
import com.mogo.map.search.geo.MogoPoiItem;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* poi搜索结果集
|
||||
*/
|
||||
public class MogoPoiResult {
|
||||
|
||||
private ArrayList< MogoPoiItem > pois;
|
||||
|
||||
public ArrayList< MogoPoiItem > getPois() {
|
||||
return pois;
|
||||
}
|
||||
|
||||
public void setPois( ArrayList< MogoPoiItem > pois ) {
|
||||
this.pois = pois;
|
||||
}
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
package com.mogo.map.search.poisearch;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* 周边搜索范围
|
||||
*/
|
||||
public class MogoSearchBound implements Parcelable {
|
||||
|
||||
public static final String SHAPE_BOUND = "Bound";
|
||||
public static final String SHAPE_RECTANGLE = "Rectangle";
|
||||
public static final String SHAPE_POLYGON = "Polygon";
|
||||
|
||||
/**
|
||||
* 中心点
|
||||
*/
|
||||
private MogoLatLng centerPoint;
|
||||
/**
|
||||
* 半径:米
|
||||
*/
|
||||
private int radiusInMeters;
|
||||
|
||||
/**
|
||||
* 搜索范围的形状
|
||||
*/
|
||||
private String shape;
|
||||
|
||||
/**
|
||||
* 按距离排序
|
||||
*/
|
||||
private boolean isDistanceSort;
|
||||
|
||||
/**
|
||||
* 左下角
|
||||
*/
|
||||
private MogoLatLng lowerLeft;
|
||||
/**
|
||||
* 右上角
|
||||
*/
|
||||
private MogoLatLng upperRight;
|
||||
|
||||
/**
|
||||
* 范围搜索地点列表
|
||||
*/
|
||||
private List< MogoLatLng > polyGonList;
|
||||
|
||||
public MogoSearchBound( MogoLatLng centerPoint, int radiusInMeters ) {
|
||||
this( centerPoint, radiusInMeters, true );
|
||||
}
|
||||
|
||||
public MogoSearchBound( MogoLatLng centerPoint, int radiusInMeters, boolean isDistanceSort ) {
|
||||
this.centerPoint = centerPoint;
|
||||
this.radiusInMeters = radiusInMeters;
|
||||
this.isDistanceSort = isDistanceSort;
|
||||
this.shape = SHAPE_BOUND;
|
||||
}
|
||||
|
||||
public MogoSearchBound( MogoLatLng lowerLeft, MogoLatLng upperRight ) {
|
||||
this.lowerLeft = lowerLeft;
|
||||
this.upperRight = upperRight;
|
||||
this.shape = SHAPE_RECTANGLE;
|
||||
}
|
||||
|
||||
public MogoSearchBound( List< MogoLatLng > polyGonList ) {
|
||||
this.polyGonList = polyGonList;
|
||||
this.shape = SHAPE_POLYGON;
|
||||
}
|
||||
|
||||
public MogoLatLng getCenterPoint() {
|
||||
return centerPoint;
|
||||
}
|
||||
|
||||
public int getRadiusInMeters() {
|
||||
return radiusInMeters;
|
||||
}
|
||||
|
||||
public String getShape() {
|
||||
return shape;
|
||||
}
|
||||
|
||||
public boolean isDistanceSort() {
|
||||
return isDistanceSort;
|
||||
}
|
||||
|
||||
public MogoLatLng getLowerLeft() {
|
||||
return lowerLeft;
|
||||
}
|
||||
|
||||
public MogoLatLng getUpperRight() {
|
||||
return upperRight;
|
||||
}
|
||||
|
||||
public List< MogoLatLng > getPolyGonList() {
|
||||
return polyGonList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeParcelable( this.centerPoint, flags );
|
||||
dest.writeInt( this.radiusInMeters );
|
||||
dest.writeString( this.shape );
|
||||
dest.writeByte( this.isDistanceSort ? ( byte ) 1 : ( byte ) 0 );
|
||||
dest.writeParcelable( this.lowerLeft, flags );
|
||||
dest.writeParcelable( this.upperRight, flags );
|
||||
dest.writeTypedList( this.polyGonList );
|
||||
}
|
||||
|
||||
protected MogoSearchBound( Parcel in ) {
|
||||
this.centerPoint = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.radiusInMeters = in.readInt();
|
||||
this.shape = in.readString();
|
||||
this.isDistanceSort = in.readByte() != 0;
|
||||
this.lowerLeft = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.upperRight = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
this.polyGonList = in.createTypedArrayList( MogoLatLng.CREATOR );
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoSearchBound > CREATOR = new Parcelable.Creator< MogoSearchBound >() {
|
||||
@Override
|
||||
public MogoSearchBound createFromParcel( Parcel source ) {
|
||||
return new MogoSearchBound( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoSearchBound[] newArray( int size ) {
|
||||
return new MogoSearchBound[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,159 +0,0 @@
|
||||
package com.mogo.map.search.poisearch.query;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* poi 搜索查询条件
|
||||
*/
|
||||
public class MogoPoiSearchQuery implements Parcelable {
|
||||
|
||||
private String query = "";
|
||||
private String category;
|
||||
private String city;
|
||||
private String building;
|
||||
private int pageNum;
|
||||
private int pageSize;
|
||||
private boolean isCityLimit;
|
||||
private boolean isSubPois;
|
||||
private boolean isDistanceSort = true;
|
||||
private MogoLatLng location;
|
||||
|
||||
/**
|
||||
* @param query 查询字符串,多个关键字用“|”分割
|
||||
* @param category 类型的组合,比如定义如下组合:餐馆|电影院|景点
|
||||
*/
|
||||
public MogoPoiSearchQuery( String query, String category ) {
|
||||
this.query = query;
|
||||
this.category = category;
|
||||
this.city = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param query 查询字符串,多个关键字用“|”分割
|
||||
* @param category 类型的组合,比如定义如下组合:餐馆|电影院|景点
|
||||
*/
|
||||
public MogoPoiSearchQuery( String query, String category, String city ) {
|
||||
this.query = query;
|
||||
this.category = category;
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getBuilding() {
|
||||
return building;
|
||||
}
|
||||
|
||||
public void setBuilding( String building ) {
|
||||
this.building = building;
|
||||
}
|
||||
|
||||
public String getQuery() {
|
||||
return query;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public int getPageNum() {
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
public void setPageNum( int pageNum ) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize( int pageSize ) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public boolean isCityLimit() {
|
||||
return isCityLimit;
|
||||
}
|
||||
|
||||
public void setCityLimit( boolean cityLimit ) {
|
||||
isCityLimit = cityLimit;
|
||||
}
|
||||
|
||||
public boolean isSubPois() {
|
||||
return isSubPois;
|
||||
}
|
||||
|
||||
public void setSubPois( boolean subPois ) {
|
||||
isSubPois = subPois;
|
||||
}
|
||||
|
||||
public boolean isDistanceSort() {
|
||||
return isDistanceSort;
|
||||
}
|
||||
|
||||
public void setDistanceSort( boolean distanceSort ) {
|
||||
isDistanceSort = distanceSort;
|
||||
}
|
||||
|
||||
public MogoLatLng getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation( MogoLatLng location ) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
dest.writeString( this.building );
|
||||
dest.writeString( this.category );
|
||||
dest.writeString( this.city );
|
||||
dest.writeInt( this.pageNum );
|
||||
dest.writeInt( this.pageSize );
|
||||
dest.writeByte( this.isCityLimit ? ( byte ) 1 : ( byte ) 0 );
|
||||
dest.writeByte( this.isSubPois ? ( byte ) 1 : ( byte ) 0 );
|
||||
dest.writeByte( this.isDistanceSort ? ( byte ) 1 : ( byte ) 0 );
|
||||
dest.writeParcelable( this.location, flags );
|
||||
}
|
||||
|
||||
public MogoPoiSearchQuery() {
|
||||
}
|
||||
|
||||
protected MogoPoiSearchQuery( Parcel in ) {
|
||||
this.building = in.readString();
|
||||
this.category = in.readString();
|
||||
this.city = in.readString();
|
||||
this.pageNum = in.readInt();
|
||||
this.pageSize = in.readInt();
|
||||
this.isCityLimit = in.readByte() != 0;
|
||||
this.isSubPois = in.readByte() != 0;
|
||||
this.isDistanceSort = in.readByte() != 0;
|
||||
this.location = in.readParcelable( MogoLatLng.class.getClassLoader() );
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator< MogoPoiSearchQuery > CREATOR = new Parcelable.Creator< MogoPoiSearchQuery >() {
|
||||
@Override
|
||||
public MogoPoiSearchQuery createFromParcel( Parcel source ) {
|
||||
return new MogoPoiSearchQuery( source );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoPoiSearchQuery[] newArray( int size ) {
|
||||
return new MogoPoiSearchQuery[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -6,9 +6,6 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.location.ALocationClient;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.search.PoiSearchClient;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.uicontroller.AMapUIController;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView;
|
||||
@@ -35,11 +32,6 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IMogoPoiSearch getPoiSearchClient(Context context, MogoPoiSearchQuery query) {
|
||||
return new PoiSearchClient(context, query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMapView getMapView(Context context) {
|
||||
// MapParams mapParams = MapParams.Companion.init();
|
||||
|
||||
@@ -4,8 +4,6 @@ import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
|
||||
|
||||
@@ -40,10 +38,6 @@ class MogoMapDelegateFactory {
|
||||
return getApiBuilder().getMapUIController();
|
||||
}
|
||||
|
||||
public static IMogoPoiSearch getPoiSearchClientDelegate(Context context, MogoPoiSearchQuery query) {
|
||||
return getApiBuilder().getPoiSearchClient(context, query);
|
||||
}
|
||||
|
||||
public static void destroy() {
|
||||
getApiBuilder().destroy();
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
package com.mogo.map;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.map.exception.MogoMapException;
|
||||
import com.mogo.map.search.geo.MogoPoiItem;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearchListener;
|
||||
import com.mogo.map.search.poisearch.MogoPoiResult;
|
||||
import com.mogo.map.search.poisearch.MogoSearchBound;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoPoiSearch implements IMogoPoiSearch {
|
||||
|
||||
private IMogoPoiSearch mDelegate;
|
||||
|
||||
public MogoPoiSearch( Context context, MogoPoiSearchQuery query ) {
|
||||
mDelegate = MogoMapDelegateFactory.getPoiSearchClientDelegate( context, query );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPoiSearchListener( IMogoPoiSearchListener listener ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setPoiSearchListener( listener );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void searchPOIAsyn() {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.searchPOIAsyn();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoPoiResult searchPOI() throws MogoMapException {
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.searchPOI();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQuery( MogoPoiSearchQuery query ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setQuery( query );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoPoiItem searchPOIId( String poiId ) throws MogoMapException {
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.searchPOIId( poiId );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void searchPOIIdAsyn( String poiId ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.searchPOIIdAsyn( poiId );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBound( MogoSearchBound bound ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setBound( bound );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.destroy();
|
||||
}
|
||||
mDelegate = null;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,10 @@
|
||||
package com.mogo.map.marker;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Point;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.marker.anim.OnMarkerAnimationListener;
|
||||
import com.mogo.map.utils.ObjectUtils;
|
||||
import com.zhidaoauto.map.sdk.open.abs.marker.MarkerAnimationListener;
|
||||
@@ -17,14 +14,11 @@ import com.zhidaoauto.map.sdk.open.marker.BitmapDescriptorFactory;
|
||||
import com.zhidaoauto.map.sdk.open.marker.Marker;
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerOptions;
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerScaleAnimation;
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerTranslateAnimation;
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint;
|
||||
import com.zhidaoauto.map.sdk.open.tools.MapTools;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Observable;
|
||||
import java.util.Observer;
|
||||
|
||||
@@ -96,12 +90,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
destroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideInfoWindow() {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.hideInfoWindow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlpha( float alpha ) {
|
||||
@@ -110,20 +98,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnchor( float anchorU, float anchorV ) {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.setAnchor( anchorU, anchorV );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDraggable( boolean paramBoolean ) {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.setDraggable( paramBoolean );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIcon( Bitmap icon ) {
|
||||
if ( icon == null || icon.isRecycled() ) {
|
||||
@@ -154,17 +128,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInfoWindowEnable( boolean enabled ) {
|
||||
if ( mMarker != null ) {
|
||||
if ( enabled ) {
|
||||
mMarker.showInfoWindow();
|
||||
} else {
|
||||
mMarker.hideInfoWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMarkerOptions( MogoMarkerOptions opt ) {
|
||||
|
||||
@@ -188,12 +151,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
return mObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPeriod( int period ) {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.setPeriod( period );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPosition( double lat, double lng ) {
|
||||
@@ -218,13 +175,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSnippet( String snippet ) {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.setSnippet( snippet );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTitle( String title ) {
|
||||
if ( mMarker != null ) {
|
||||
@@ -246,27 +196,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setZIndex( int zIndex ) {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.setZIndex( zIndex );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showInfoWindow() {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.showInfoWindow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMarkerAssInfo() {
|
||||
if ( mMarker != null ) {
|
||||
return mMarker.getMarkeOptions().getAssInfo();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnMarkerClickListener( IMogoMarkerClickListener listener ) {
|
||||
@@ -278,26 +207,11 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
return mMogoMarkerClickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInfoWindowAdapter( IMogoInfoWindowAdapter adapter ) {
|
||||
mMogoInfoWindowAdapter = adapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoInfoWindowAdapter getInfoWindowAdapter() {
|
||||
return mMogoInfoWindowAdapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMarkerIconView( IMogoMarkerIconViewCreator creator ) {
|
||||
if ( creator != null ) {
|
||||
View iconView = creator.createView( this );
|
||||
if ( iconView != null ) {
|
||||
mMarker.setIcon( iconView );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDestroyed() {
|
||||
return mIsDestroy;
|
||||
@@ -319,13 +233,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPositionByPixels( Point position ) {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.setPosition( MapTools.INSTANCE.fromScreenLocation( position ) );
|
||||
}
|
||||
}
|
||||
|
||||
public Marker getMarker() {
|
||||
return mMarker;
|
||||
}
|
||||
@@ -335,13 +242,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
return mMogoMarkerOptions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startScaleAnimation( float fromX, float toX, float fromY, float toY, int duration, Interpolator interpolator ) {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
startScaleAnimation( fromX, toX, fromY, toY, duration, interpolator, null );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startScaleAnimation(float fromX, float toX, float fromY, float toY, int duration, Interpolator interpolator, final OnMarkerAnimationListener listener ) {
|
||||
@@ -384,55 +284,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
mMarker.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startJumpAnimation(float high, long duration, Interpolator interpolator, final OnMarkerAnimationListener listener ) {
|
||||
if ( isDestroyed() || high <= 0.0f || interpolator == null || duration < 0 ) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
final LonLatPoint latLng = ObjectUtils.fromMogo( getPosition() );
|
||||
// Point point = AMapWrapper.getAMap().getProjection().toScreenLocation(latLng);
|
||||
// point.y -= WindowUtils.dip2px(AbsMogoApplication.getApp(), high);
|
||||
// LatLng target = AMapWrapper.getAMap().getProjection().fromScreenLocation(point);
|
||||
//使用TranslateAnimation,填写一个需要移动的目标点
|
||||
MarkerTranslateAnimation animation = new MarkerTranslateAnimation( latLng );
|
||||
// animation.setInterpolator(interpolator);
|
||||
animation.setAnimationListener( new MarkerAnimationListener() {
|
||||
@Override
|
||||
public void onAnimationEnd( @NotNull Animation animation ) {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
if ( listener != null ) {
|
||||
listener.onAnimEnd();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat( @NotNull Animation animation ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationStart( @NotNull Animation animation ) {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
if ( listener != null ) {
|
||||
listener.onAnimStart();
|
||||
}
|
||||
}
|
||||
} );
|
||||
//整个移动所需要的时间
|
||||
animation.setDuration( duration * 1000 );
|
||||
//设置动画
|
||||
mMarker.setTranslateAnimation( animation );
|
||||
mMarker.startAnimation();
|
||||
} catch ( Exception e ) {
|
||||
CallerLogger.INSTANCE.e( TAG, e, "error." );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClickable( boolean clickable ) {
|
||||
if ( mMarker != null ) {
|
||||
@@ -440,49 +291,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startSmooth( List< MogoLatLng > points, int duration ) {
|
||||
startSmoothInMs( points, duration * 1000 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startSmoothInMs( List< MogoLatLng > points, long duration ) {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mMarker == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( points == null || points.isEmpty() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList< LonLatPoint > newPoints = new ArrayList<>();
|
||||
for ( int i = 0; i < points.size(); i++ ) {
|
||||
LonLatPoint point = ObjectUtils.fromMogo( points.get( i ) );
|
||||
if ( point == null ) {
|
||||
continue;
|
||||
}
|
||||
newPoints.add( point );
|
||||
}
|
||||
if ( newPoints.isEmpty() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
mMarker.startSmooth( newPoints, ( int ) duration );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startScaleAnimationWithAlpha( float fromX, float toX, float fromY, float toY, float fromAlpha, float toAlpha, int duration, Interpolator interpolator, OnMarkerAnimationListener listener ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInfoWindowShowing() {
|
||||
return mMarker.isInfoWindowShown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGps( boolean isGps ) {
|
||||
@@ -491,36 +299,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String use3DResource( int model3D ) {
|
||||
try {
|
||||
mMarker.marker3DIcon( model3D );
|
||||
return mMarker.getMarkeOptions().getMarkerIconName();
|
||||
} catch ( Exception e ) {
|
||||
CallerLogger.INSTANCE.e( TAG, e, "use3DResource" );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void use3DResource( String resName ) {
|
||||
try {
|
||||
mMarker.getMarkeOptions().setVrIcon( true );
|
||||
mMarker.setMarkerOptions( mMarker.getMarkeOptions().setMarkerIconName( resName ) );
|
||||
} catch ( Exception e ) {
|
||||
CallerLogger.INSTANCE.e( TAG, e, "use3DResource" );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void use2DResource( String resName ) {
|
||||
try {
|
||||
mMarker.getMarkeOptions().setVrIcon( false );
|
||||
mMarker.setMarkerOptions( mMarker.getMarkeOptions().setMarkerIconName( resName ) );
|
||||
} catch ( Exception e ) {
|
||||
CallerLogger.INSTANCE.e( TAG, e, "use3DResource" );
|
||||
}
|
||||
}
|
||||
|
||||
private String mLastAnchorColor = "";
|
||||
|
||||
@@ -539,32 +317,6 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
mLastAnchorColor = anchorColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateInfoWindowView( View view ) {
|
||||
try {
|
||||
mMarker.setInfoWindowView( view );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateInfoWindowView( String viewResName ) {
|
||||
try {
|
||||
mMarker.setMarkerInfoName( viewResName );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInfoWindowOffset( int offsetX, int offsetY ) {
|
||||
try {
|
||||
mMarker.setInfoWindowOffset( offsetX, offsetY );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDynamicAnchorPosition( MogoLatLng latLng, float angle, long duration ) {
|
||||
@@ -583,15 +335,4 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMarkerInfoResName() {
|
||||
if ( mMarker != null ) {
|
||||
try {
|
||||
return mMarker.getMarkeOptions().getMarkerInfoName();
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
package com.mogo.map.search;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.map.exception.MogoMapException;
|
||||
import com.mogo.map.search.geo.MogoPoiItem;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearch;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearchListener;
|
||||
import com.mogo.map.search.poisearch.MogoPoiResult;
|
||||
import com.mogo.map.search.poisearch.MogoSearchBound;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.utils.ObjectUtils;
|
||||
import com.zhidaoauto.map.sdk.open.query.OnPoiSearchListener;
|
||||
import com.zhidaoauto.map.sdk.open.query.PoiItem;
|
||||
import com.zhidaoauto.map.sdk.open.query.PoiSearch;
|
||||
import com.zhidaoauto.map.sdk.open.query.PoiSearchResult;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* poi搜索自研实现
|
||||
* <p>
|
||||
* 错误码对照表:https://lbs.amap.com/api/android-sdk/guide/map-tools/error-code
|
||||
*/
|
||||
public class PoiSearchClient implements IMogoPoiSearch, OnPoiSearchListener {
|
||||
|
||||
private static final String TAG = "PoiSearchClient";
|
||||
|
||||
private MogoPoiSearchQuery mQuery;
|
||||
private PoiSearch mClient;
|
||||
private IMogoPoiSearchListener mListener;
|
||||
private MogoSearchBound mBound;
|
||||
|
||||
public PoiSearchClient( Context context, MogoPoiSearchQuery query ) {
|
||||
try {
|
||||
mQuery = query;
|
||||
mClient = new PoiSearch( context, ObjectUtils.fromMogo( mQuery ) );
|
||||
mClient.setOnPoiSearchListener( this );
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPoiSearchListener( IMogoPoiSearchListener listener ) {
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void searchPOIAsyn() {
|
||||
if ( mClient != null ) {
|
||||
mClient.searchPOIAsyn();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoPoiResult searchPOI() throws MogoMapException {
|
||||
if ( mClient != null ) {
|
||||
try {
|
||||
PoiSearchResult search = mClient.searchPOI();
|
||||
return ObjectUtils.fromAMap( search );
|
||||
} catch ( Exception e ) {
|
||||
throw new MogoMapException( e );
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQuery( MogoPoiSearchQuery query ) {
|
||||
mQuery = query;
|
||||
if ( mClient != null ) {
|
||||
mClient.setQuery( ObjectUtils.fromMogo( mQuery ) );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoPoiItem searchPOIId( String poiId ) throws MogoMapException {
|
||||
if ( mClient != null ) {
|
||||
try {
|
||||
PoiItem poiItem = mClient.searchPOIId( poiId );
|
||||
return ObjectUtils.fromAMap( poiItem );
|
||||
} catch ( Exception e ) {
|
||||
throw new MogoMapException( e );
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void searchPOIIdAsyn( String poiId ) {
|
||||
if ( mClient != null ) {
|
||||
mClient.searchPOIIdAsyn( poiId );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBound( MogoSearchBound bound ) {
|
||||
mBound = bound;
|
||||
if ( mClient != null ) {
|
||||
mClient.setBound( ObjectUtils.fromMogo( mBound ) );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPoiSearched( PoiSearchResult poiResult, int errorCode ) {
|
||||
if ( errorCode != 0 ) {
|
||||
CallerLogger.INSTANCE.e( TAG, "errorcode is %d", errorCode );
|
||||
}
|
||||
if ( mListener != null ) {
|
||||
mListener.onPoiSearched( ObjectUtils.fromAMap( poiResult ), errorCode );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPoiItemSearched( PoiItem poiItem, int errorCode ) {
|
||||
if ( errorCode != 0 ) {
|
||||
CallerLogger.INSTANCE.e( TAG, "errorcode is %d", errorCode );
|
||||
}
|
||||
if ( mListener != null ) {
|
||||
mListener.onPoiItemSearched( ObjectUtils.fromAMap( poiItem ), errorCode );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
mQuery = null;
|
||||
mClient = null;
|
||||
mListener = null;
|
||||
mBound = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPoiCategorySearched(@Nullable List list, int errorCode) {
|
||||
}
|
||||
}
|
||||
@@ -10,18 +10,6 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.overlay.MogoPolylineOptions;
|
||||
import com.mogo.map.search.geo.MogoGeocodeAddress;
|
||||
import com.mogo.map.search.geo.MogoGeocodeResult;
|
||||
import com.mogo.map.search.geo.MogoPoiItem;
|
||||
import com.mogo.map.search.geo.MogoRegeocodeAddress;
|
||||
import com.mogo.map.search.geo.MogoRegeocodeResult;
|
||||
import com.mogo.map.search.geo.query.MogoGeocodeQuery;
|
||||
import com.mogo.map.search.geo.query.MogoRegeocodeQuery;
|
||||
import com.mogo.map.search.inputtips.MogoTip;
|
||||
import com.mogo.map.search.inputtips.query.MogoInputtipsQuery;
|
||||
import com.mogo.map.search.poisearch.MogoPoiResult;
|
||||
import com.mogo.map.search.poisearch.MogoSearchBound;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.uicontroller.MapCameraPosition;
|
||||
import com.zhidaoauto.map.sdk.open.camera.CameraPosition;
|
||||
import com.zhidaoauto.map.sdk.open.marker.BitmapDescriptor;
|
||||
@@ -29,20 +17,7 @@ import com.zhidaoauto.map.sdk.open.marker.BitmapDescriptorFactory;
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerOptions;
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerSimpleData;
|
||||
import com.zhidaoauto.map.sdk.open.poyline.PolylineOptions;
|
||||
import com.zhidaoauto.map.sdk.open.query.GeocodeAddress;
|
||||
import com.zhidaoauto.map.sdk.open.query.GeocodeQuery;
|
||||
import com.zhidaoauto.map.sdk.open.query.GeocodeResult;
|
||||
import com.zhidaoauto.map.sdk.open.query.InputtipsQuery;
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint;
|
||||
import com.zhidaoauto.map.sdk.open.query.PoiItem;
|
||||
import com.zhidaoauto.map.sdk.open.query.PoiSearchItem;
|
||||
import com.zhidaoauto.map.sdk.open.query.PoiSearchResult;
|
||||
import com.zhidaoauto.map.sdk.open.query.Query;
|
||||
import com.zhidaoauto.map.sdk.open.query.RegeocodeAddress;
|
||||
import com.zhidaoauto.map.sdk.open.query.RegeocodeQuery;
|
||||
import com.zhidaoauto.map.sdk.open.query.RegeocodeResult;
|
||||
import com.zhidaoauto.map.sdk.open.query.SearchBound;
|
||||
import com.zhidaoauto.map.sdk.open.query.Tip;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -218,253 +193,6 @@ public class ObjectUtils {
|
||||
return new MogoLatLng(point.getLatitude(), point.getLongitude());
|
||||
}
|
||||
|
||||
public static GeocodeQuery fromMogo(MogoGeocodeQuery query) {
|
||||
if (query == null) {
|
||||
return null;
|
||||
}
|
||||
GeocodeQuery q = new GeocodeQuery(query.getLocationName(), query.getCity());
|
||||
return q;
|
||||
}
|
||||
|
||||
public static RegeocodeQuery fromMogo(MogoRegeocodeQuery query) {
|
||||
if (query == null) {
|
||||
return null;
|
||||
}
|
||||
RegeocodeQuery q = new RegeocodeQuery(fromMogo(query.getPoint()), 1000);
|
||||
return q;
|
||||
}
|
||||
|
||||
public static MogoGeocodeAddress fromAMap(GeocodeAddress address) {
|
||||
if (address == null) {
|
||||
return null;
|
||||
}
|
||||
MogoGeocodeAddress mogoGeocodeAddress = new MogoGeocodeAddress();
|
||||
mogoGeocodeAddress.setAdcode(address.getAdcode());
|
||||
mogoGeocodeAddress.setBuilding(address.getBuilding());
|
||||
mogoGeocodeAddress.setCity(address.getCity());
|
||||
mogoGeocodeAddress.setDistrict(address.getDistrict());
|
||||
mogoGeocodeAddress.setFormatAddress(address.getFormatAddress());
|
||||
mogoGeocodeAddress.setLatlng(fromAMap(address.getLonlat()));
|
||||
mogoGeocodeAddress.setLevel(address.getLevel());
|
||||
mogoGeocodeAddress.setNeighborhood(address.getNeighborhood());
|
||||
mogoGeocodeAddress.setProvince(address.getProvince());
|
||||
mogoGeocodeAddress.setTownship(address.getTownship());
|
||||
return mogoGeocodeAddress;
|
||||
}
|
||||
|
||||
public static MogoGeocodeResult fromAMap(GeocodeResult result) {
|
||||
if (result == null || result.getGeocodeAddressList() == null) {
|
||||
return null;
|
||||
}
|
||||
MogoGeocodeResult mogoGeocodeResult = new MogoGeocodeResult();
|
||||
final List<MogoGeocodeAddress> addresses = new ArrayList<>();
|
||||
List<GeocodeAddress> list = result.getGeocodeAddressList();
|
||||
for (GeocodeAddress geocodeAddress : list) {
|
||||
final MogoGeocodeAddress mogoGeocodeAddress = fromAMap(geocodeAddress);
|
||||
if (mogoGeocodeAddress != null) {
|
||||
addresses.add(mogoGeocodeAddress);
|
||||
}
|
||||
}
|
||||
|
||||
mogoGeocodeResult.setAddresses(addresses);
|
||||
return mogoGeocodeResult;
|
||||
}
|
||||
|
||||
|
||||
public static MogoPoiItem fromAMap(PoiItem poiItem) {
|
||||
if (poiItem == null) {
|
||||
return null;
|
||||
}
|
||||
MogoPoiItem mogoPoiItem = new MogoPoiItem();
|
||||
mogoPoiItem.setAdCode(poiItem.getAdCode());
|
||||
mogoPoiItem.setAdName(poiItem.getAdName());
|
||||
mogoPoiItem.setBusinessArea(poiItem.getBusinessArea());
|
||||
mogoPoiItem.setCityCode(poiItem.getCityCode());
|
||||
mogoPoiItem.setCityName(poiItem.getCityName());
|
||||
mogoPoiItem.setDirection(poiItem.getDirection());
|
||||
mogoPoiItem.setDistance(poiItem.getDistance());
|
||||
mogoPoiItem.setEmail(poiItem.getEmail());
|
||||
mogoPoiItem.setEnter(fromAMap(poiItem.getEnter()));
|
||||
mogoPoiItem.setExit(fromAMap(poiItem.getExit()));
|
||||
mogoPoiItem.setParkingType(poiItem.getParkingType());
|
||||
mogoPoiItem.setPoiId(poiItem.getPoiId());
|
||||
mogoPoiItem.setPoint(fromAMap(poiItem.getLonLatPoint()));
|
||||
mogoPoiItem.setPostcode(poiItem.getPostcode());
|
||||
mogoPoiItem.setProvinceCode(poiItem.getProvinceCode());
|
||||
mogoPoiItem.setProvinceName(poiItem.getProvinceName());
|
||||
mogoPoiItem.setShopID(poiItem.getShopID());
|
||||
mogoPoiItem.setSnippet(poiItem.getSnippet());
|
||||
mogoPoiItem.setTel(poiItem.getTel());
|
||||
mogoPoiItem.setTypeCode(poiItem.getTypeCode());
|
||||
mogoPoiItem.setTitle(poiItem.getTitle());
|
||||
mogoPoiItem.setTypeDes(poiItem.getTypeDes());
|
||||
mogoPoiItem.setWebsite(poiItem.getWebsite());
|
||||
return mogoPoiItem;
|
||||
}
|
||||
|
||||
public static MogoRegeocodeAddress fromAMap(RegeocodeAddress regeocodeAddress) {
|
||||
if (regeocodeAddress == null) {
|
||||
return null;
|
||||
}
|
||||
MogoRegeocodeAddress mogoRegeocodeAddress = new MogoRegeocodeAddress();
|
||||
mogoRegeocodeAddress.setAdCode(regeocodeAddress.getAdCode());
|
||||
|
||||
mogoRegeocodeAddress.setBuilding(regeocodeAddress.getBuilding());
|
||||
|
||||
mogoRegeocodeAddress.setCity(regeocodeAddress.getCity());
|
||||
mogoRegeocodeAddress.setCityCode(regeocodeAddress.getCityCode());
|
||||
mogoRegeocodeAddress.setCountry(regeocodeAddress.getCountry());
|
||||
mogoRegeocodeAddress.setDistrict(regeocodeAddress.getDistrict());
|
||||
mogoRegeocodeAddress.setFormatAddress(regeocodeAddress.getFormatAddress());
|
||||
mogoRegeocodeAddress.setNeighborhood(regeocodeAddress.getNeighborhood());
|
||||
if (regeocodeAddress.getPoiList() != null) {
|
||||
List<MogoPoiItem> mogoPoiItems = new ArrayList<>();
|
||||
List<PoiItem> list = regeocodeAddress.getPoiList();
|
||||
for (PoiItem pois : list) {
|
||||
MogoPoiItem mogoPoiItem = fromAMap(pois);
|
||||
mogoPoiItems.add(mogoPoiItem);
|
||||
}
|
||||
mogoRegeocodeAddress.setPois(mogoPoiItems);
|
||||
}
|
||||
mogoRegeocodeAddress.setProvince(regeocodeAddress.getProvince());
|
||||
mogoRegeocodeAddress.setTowncode(regeocodeAddress.getTowncode());
|
||||
mogoRegeocodeAddress.setTownship(regeocodeAddress.getTownship());
|
||||
return mogoRegeocodeAddress;
|
||||
}
|
||||
|
||||
public static MogoRegeocodeResult fromAMap(RegeocodeResult regeocodeResult) {
|
||||
if (regeocodeResult == null) {
|
||||
return null;
|
||||
}
|
||||
MogoRegeocodeResult mogoRegeocodeResult = new MogoRegeocodeResult();
|
||||
mogoRegeocodeResult.setRegeocodeAddress(fromAMap(regeocodeResult.getRegeocodeAddress()));
|
||||
return mogoRegeocodeResult;
|
||||
}
|
||||
|
||||
public static InputtipsQuery fromMogo(MogoInputtipsQuery query) {
|
||||
if (query == null) {
|
||||
return null;
|
||||
}
|
||||
InputtipsQuery inputtipsQuery = new InputtipsQuery(query.getKeyword(), query.getCity());
|
||||
inputtipsQuery.setCityLimit(query.isCityLimit());
|
||||
inputtipsQuery.setLocation(fromMogo(query.getLocation()));
|
||||
inputtipsQuery.setType(query.getType());
|
||||
return inputtipsQuery;
|
||||
}
|
||||
|
||||
public static MogoTip fromAMap(Tip tip) {
|
||||
if (tip == null) {
|
||||
return null;
|
||||
}
|
||||
MogoTip mogoTip = new MogoTip();
|
||||
mogoTip.setAdCode(tip.getAdcode());
|
||||
mogoTip.setAddress(tip.getAddress());
|
||||
mogoTip.setDistrict(tip.getDistrict());
|
||||
mogoTip.setName(tip.getName());
|
||||
mogoTip.setPoiID(tip.getPoiID());
|
||||
mogoTip.setPoint(fromAMap(tip.getLatPoint()));
|
||||
mogoTip.setTypeCode(tip.getTypeCode());
|
||||
return mogoTip;
|
||||
}
|
||||
|
||||
|
||||
public static MogoPoiSearchQuery fromAMap(Query query) {
|
||||
if (query == null) {
|
||||
return null;
|
||||
}
|
||||
MogoPoiSearchQuery mogoPoiSearchQuery = new MogoPoiSearchQuery(query.getKeyword(), query.getCategory(), query.getCity());
|
||||
mogoPoiSearchQuery.setCityLimit(query.getCityLimit());
|
||||
mogoPoiSearchQuery.setDistanceSort(query.getDistanceSort());
|
||||
mogoPoiSearchQuery.setLocation(fromAMap(query.getLocation()));
|
||||
mogoPoiSearchQuery.setPageNum(query.getPageNum());
|
||||
mogoPoiSearchQuery.setPageSize(query.getPageSize());
|
||||
return mogoPoiSearchQuery;
|
||||
}
|
||||
|
||||
public static Query fromMogo(MogoPoiSearchQuery query) {
|
||||
if (query == null || query.getQuery() == null) {
|
||||
return null;
|
||||
}
|
||||
Query psq = new Query(query.getQuery(), "", "");
|
||||
String category = getCategory(query.getQuery());
|
||||
if (!category.equals("")) {
|
||||
psq = new Query("", "", getCategory(query.getQuery()));
|
||||
}
|
||||
psq.setCityLimit(query.isCityLimit());
|
||||
psq.setDistanceSort(query.isDistanceSort());
|
||||
psq.setLocation(fromMogo(query.getLocation()));
|
||||
psq.setPageNum(query.getPageNum());
|
||||
psq.setPageSize(query.getPageSize());
|
||||
return psq;
|
||||
}
|
||||
|
||||
public static MogoSearchBound fromAMap(SearchBound bound) {
|
||||
if (bound == null) {
|
||||
return null;
|
||||
}
|
||||
if (bound.getShape() == SearchBound.BOUND_SHAPE) {
|
||||
return new MogoSearchBound(fromAMap(bound.getCenter()), bound.getRange(), bound.isDistanceSort());
|
||||
} else if (bound.getShape() == SearchBound.POLYGON_SHAPE) {
|
||||
return new MogoSearchBound(fromAMap(bound.getPolyGonList()));
|
||||
} else if (bound.getShape() == SearchBound.RECTANGLE_SHAPE) {
|
||||
return new MogoSearchBound(fromAMap(bound.getLowerLeft()), fromAMap(bound.getUpperRight()));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<MogoLatLng> fromAMap(List<LonLatPoint> latLngs) {
|
||||
if (latLngs == null) {
|
||||
return null;
|
||||
}
|
||||
List<MogoLatLng> result = new ArrayList<>(latLngs.size());
|
||||
for (LonLatPoint latLng : latLngs) {
|
||||
result.add(fromAMap(latLng));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<LonLatPoint> fromMogo(List<MogoLatLng> latLngs) {
|
||||
if (latLngs == null) {
|
||||
return null;
|
||||
}
|
||||
List<LonLatPoint> result = new ArrayList<>(latLngs.size());
|
||||
for (MogoLatLng latLng : latLngs) {
|
||||
result.add(fromMogo(latLng));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static SearchBound fromMogo(MogoSearchBound bound) {
|
||||
if (bound == null) {
|
||||
return null;
|
||||
}
|
||||
if (bound.getShape() == MogoSearchBound.SHAPE_BOUND) {
|
||||
return new SearchBound(fromMogo(bound.getCenterPoint()), bound.getRadiusInMeters(), bound.isDistanceSort());
|
||||
} else if (bound.getShape() == MogoSearchBound.SHAPE_POLYGON) {
|
||||
return new SearchBound(fromMogo(bound.getPolyGonList()));
|
||||
} else if (bound.getShape() == MogoSearchBound.SHAPE_RECTANGLE) {
|
||||
return new SearchBound(fromMogo(bound.getLowerLeft()), fromMogo(bound.getUpperRight()));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static MogoPoiResult fromAMap(PoiSearchResult result) {
|
||||
if (result == null) {
|
||||
return null;
|
||||
}
|
||||
MogoPoiResult mogoPoiResult = new MogoPoiResult();
|
||||
if (result.getItems() != null) {
|
||||
final List<PoiSearchItem> poiItems = result.getItems();
|
||||
final ArrayList<MogoPoiItem> mogoPoiItems = new ArrayList<>(poiItems.size());
|
||||
for (PoiSearchItem poiItem : poiItems) {
|
||||
mogoPoiItems.add(fromAMap(poiItem.getPoi()));
|
||||
}
|
||||
mogoPoiResult.setPois(mogoPoiItems);
|
||||
}
|
||||
return mogoPoiResult;
|
||||
}
|
||||
|
||||
public static PolylineOptions fromMogo(MogoPolylineOptions options) {
|
||||
if (options == null) {
|
||||
return null;
|
||||
@@ -505,22 +233,6 @@ public class ObjectUtils {
|
||||
return new MapCameraPosition(fromAMap(position.getTarget()), position.getBearing(), position.getTilt(), position.getZoom());
|
||||
}
|
||||
|
||||
private static String getCategory(String key) {
|
||||
String category = "";
|
||||
if (key.equals("加油站")) {
|
||||
category = "6";
|
||||
} else if (key.equals("停车场")) {
|
||||
category = "12";
|
||||
} else if (key.equals("餐馆")) {
|
||||
category = "22";
|
||||
} else if (key.equals("洗车")) {
|
||||
category = "8";
|
||||
} else if (key.equals("厕所")) {
|
||||
|
||||
}
|
||||
return category;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换对象
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user