|
|
@@ -16,8 +16,8 @@ import com.core.app.MyApplication;
|
|
|
* create by Bitliker 2017/2/23
|
|
|
*/
|
|
|
public class SearchPoiParam implements Parcelable {
|
|
|
- public static final int DEFAULT_RESULTCODE=0x51;
|
|
|
- public static final String DEFAULT_RESULTKEY="resultKey";
|
|
|
+ public static final int DEFAULT_RESULTCODE = 0x51;
|
|
|
+ public static final String DEFAULT_RESULTKEY = "resultKey";
|
|
|
|
|
|
private boolean isShowSearchEdit;//是否显示搜索框
|
|
|
private int resultCode;//返回码
|
|
|
@@ -31,6 +31,8 @@ public class SearchPoiParam implements Parcelable {
|
|
|
private int radius;//搜索附近时候选择范围大小
|
|
|
private String keyWork;//搜索名字位置时候位置名称
|
|
|
|
|
|
+ private boolean hineOutSize;
|
|
|
+ private float showRange;
|
|
|
|
|
|
public SearchPoiParam() {
|
|
|
isShowSearchEdit = true;
|
|
|
@@ -41,6 +43,8 @@ public class SearchPoiParam implements Parcelable {
|
|
|
distanceTag = "m";
|
|
|
title = "地址微调";
|
|
|
radius = 200;
|
|
|
+ hineOutSize = false;
|
|
|
+ showRange = 1000;
|
|
|
contrastLatLng = MyApplication.getInstance().getBdLocationHelper().getLocation();
|
|
|
}
|
|
|
|
|
|
@@ -57,52 +61,25 @@ public class SearchPoiParam implements Parcelable {
|
|
|
this.keyWork = keyWork;
|
|
|
}
|
|
|
|
|
|
- protected SearchPoiParam(Parcel in) {
|
|
|
- isShowSearchEdit = in.readByte() != 0;
|
|
|
- resultCode = in.readInt();
|
|
|
- resultKey = in.readString();
|
|
|
- riceTimes = in.readInt();
|
|
|
- distanceTag = in.readString();
|
|
|
- contrastLatLng = in.readParcelable(LatLng.class.getClassLoader());
|
|
|
- title = in.readString();
|
|
|
- type = in.readInt();
|
|
|
- radius = in.readInt();
|
|
|
- keyWork = in.readString();
|
|
|
+ public boolean isShowSearchEdit() {
|
|
|
+ return isShowSearchEdit;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public void writeToParcel(Parcel dest, int flags) {
|
|
|
- dest.writeByte((byte) (isShowSearchEdit ? 1 : 0));
|
|
|
- dest.writeInt(resultCode);
|
|
|
- dest.writeString(resultKey);
|
|
|
- dest.writeInt(riceTimes);
|
|
|
- dest.writeString(distanceTag);
|
|
|
- dest.writeParcelable(contrastLatLng, flags);
|
|
|
- dest.writeString(title);
|
|
|
- dest.writeInt(type);
|
|
|
- dest.writeInt(radius);
|
|
|
- dest.writeString(keyWork);
|
|
|
+ public boolean isHineOutSize() {
|
|
|
+ return hineOutSize;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public int describeContents() {
|
|
|
- return 0;
|
|
|
+ public void setHineOutSize(boolean hineOutSize) {
|
|
|
+ this.hineOutSize = hineOutSize;
|
|
|
}
|
|
|
|
|
|
- public static final Creator<SearchPoiParam> CREATOR = new Creator<SearchPoiParam>() {
|
|
|
- @Override
|
|
|
- public SearchPoiParam createFromParcel(Parcel in) {
|
|
|
- return new SearchPoiParam(in);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public SearchPoiParam[] newArray(int size) {
|
|
|
- return new SearchPoiParam[size];
|
|
|
- }
|
|
|
- };
|
|
|
+ public float getShowRange() {
|
|
|
+ return showRange;
|
|
|
+ }
|
|
|
|
|
|
- public boolean isShowSearchEdit() {
|
|
|
- return isShowSearchEdit;
|
|
|
+ public void setShowRange(float showRange) {
|
|
|
+ this.hineOutSize = true;
|
|
|
+ this.showRange = showRange;
|
|
|
}
|
|
|
|
|
|
public void setShowSearchEdit(boolean showSearchEdit) {
|
|
|
@@ -180,4 +157,52 @@ public class SearchPoiParam implements Parcelable {
|
|
|
public void setKeyWork(String keyWork) {
|
|
|
this.keyWork = keyWork;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int describeContents() {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void writeToParcel(Parcel dest, int flags) {
|
|
|
+ dest.writeByte(this.isShowSearchEdit ? (byte) 1 : (byte) 0);
|
|
|
+ dest.writeInt(this.resultCode);
|
|
|
+ dest.writeString(this.resultKey);
|
|
|
+ dest.writeInt(this.riceTimes);
|
|
|
+ dest.writeString(this.distanceTag);
|
|
|
+ dest.writeParcelable(this.contrastLatLng, flags);
|
|
|
+ dest.writeString(this.title);
|
|
|
+ dest.writeInt(this.type);
|
|
|
+ dest.writeInt(this.radius);
|
|
|
+ dest.writeString(this.keyWork);
|
|
|
+ dest.writeByte(this.hineOutSize ? (byte) 1 : (byte) 0);
|
|
|
+ dest.writeFloat(this.showRange);
|
|
|
+ }
|
|
|
+
|
|
|
+ protected SearchPoiParam(Parcel in) {
|
|
|
+ this.isShowSearchEdit = in.readByte() != 0;
|
|
|
+ this.resultCode = in.readInt();
|
|
|
+ this.resultKey = in.readString();
|
|
|
+ this.riceTimes = in.readInt();
|
|
|
+ this.distanceTag = in.readString();
|
|
|
+ this.contrastLatLng = in.readParcelable(LatLng.class.getClassLoader());
|
|
|
+ this.title = in.readString();
|
|
|
+ this.type = in.readInt();
|
|
|
+ this.radius = in.readInt();
|
|
|
+ this.keyWork = in.readString();
|
|
|
+ this.hineOutSize = in.readByte() != 0;
|
|
|
+ this.showRange = in.readFloat();
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final Creator<SearchPoiParam> CREATOR = new Creator<SearchPoiParam>() {
|
|
|
+ @Override
|
|
|
+ public SearchPoiParam createFromParcel(Parcel source) {
|
|
|
+ return new SearchPoiParam(source);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public SearchPoiParam[] newArray(int size) {
|
|
|
+ return new SearchPoiParam[size];
|
|
|
+ }
|
|
|
+ };
|
|
|
}
|