过滤部分无效的地理编码和逆地理编码

This commit is contained in:
wangcongtao
2020-08-04 09:58:47 +08:00
parent 7f93590d8c
commit f0b38e9f2e
3 changed files with 44 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package com.mogo.map.search.geo.query;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
/**
* @author congtaowang
@@ -29,6 +30,12 @@ public class MogoGeocodeQuery implements Parcelable {
this.city = city;
}
public boolean check(){
if ( TextUtils.isEmpty( locationName ) ) {
return false;
}
return true;
}
@Override
public int describeContents() {

View File

@@ -50,6 +50,18 @@ public class MogoRegeocodeQuery implements Parcelable {
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() {