dev
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import com.mogo.map.IDestroyable;
|
||||
import com.mogo.map.exception.MogoMapException;
|
||||
import com.mogo.map.search.geo.query.MogoGeocodeQuery;
|
||||
import com.mogo.map.search.geo.query.MogoRegeocodeQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 地理/逆地理位置搜索
|
||||
*/
|
||||
public interface IMogoGeoSearch extends IDestroyable {
|
||||
|
||||
/**
|
||||
* 添加异步编码回调
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
void setGeoSearchListener( IMogoGeoSearchListener listener );
|
||||
|
||||
/**
|
||||
* 同步获取逆地理编码地址
|
||||
*
|
||||
* @param query
|
||||
* @return
|
||||
* @throws MogoMapException
|
||||
*/
|
||||
@Deprecated
|
||||
MogoRegeocodeAddress getFromLocation( MogoRegeocodeQuery query ) throws MogoMapException;
|
||||
|
||||
/**
|
||||
* 同步获取地理编码地址列表
|
||||
*
|
||||
* @param query
|
||||
* @return
|
||||
* @throws MogoMapException
|
||||
*/
|
||||
@Deprecated
|
||||
List< MogoGeocodeAddress > getFromLocationName( MogoGeocodeQuery query ) throws MogoMapException;
|
||||
|
||||
/**
|
||||
* 异步获取逆地理编码
|
||||
*
|
||||
* @param query
|
||||
*/
|
||||
void getFromLocationAsyn( MogoRegeocodeQuery query );
|
||||
|
||||
/**
|
||||
* 同步获取地理编码回调
|
||||
*
|
||||
* @param query
|
||||
*/
|
||||
void getFromLocationNameAsyn( MogoGeocodeQuery query );
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-19
|
||||
* <p>
|
||||
* 逆地理/地理编码回调
|
||||
*/
|
||||
public interface IMogoGeoSearchListener {
|
||||
|
||||
/**
|
||||
* 逆地理编码(根据经纬度获取地理位置信息)
|
||||
*
|
||||
* @param regeocodeResult
|
||||
*/
|
||||
void onRegeocodeSearched( MogoRegeocodeResult regeocodeResult );
|
||||
|
||||
/**
|
||||
* 根据名称和城市获取地理位置信息
|
||||
*
|
||||
* @param geocodeResult
|
||||
*/
|
||||
void onGeocodeSearched( MogoGeocodeResult geocodeResult );
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import com.mogo.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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.mogo.map.search.geo;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.mogo.map.search.geo.query;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
@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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.mogo.map.search.geo.query;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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;
|
||||
}
|
||||
|
||||
|
||||
@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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.mogo.map.search.inputtips;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-20
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public interface IMogoInputtipsListener {
|
||||
|
||||
void onGetInputtips( List< MogoTip > result );
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.mogo.map.search.inputtips;
|
||||
|
||||
import com.mogo.map.IDestroyable;
|
||||
import com.mogo.map.exception.MogoMapException;
|
||||
import com.mogo.map.search.inputtips.query.MogoInputtipsQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-20
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public interface IMogoInputtipsSearch extends IDestroyable {
|
||||
|
||||
void setQuery( MogoInputtipsQuery query );
|
||||
|
||||
void setInputtipsListener( IMogoInputtipsListener listener );
|
||||
|
||||
void requestInputtipsAsyn();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.mogo.map.search.inputtips;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.mogo.map.search.inputtips.query;
|
||||
|
||||
import com.mogo.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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
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 );
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
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 );
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.mogo.map.search.poisearch;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
package com.mogo.map.search.poisearch.query;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.mogo.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;
|
||||
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];
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user