receiveLocation static method
Implementation
static receiveLocation(double lat,double lng,double speed,double course,double altitude) {
if(pocChangeNotifier.isOnline){
Log.i(tag,"setLocation");
bool hasLocationPrivilege=hasPrivilege(Constant.Privilege_Location);
Log.i(tag,"setLocation:hasLocationPrivilege:$hasLocationPrivilege");
if(!hasLocationPrivilege){
return;
}
speed=speed * 3.6;// 米每秒转为千米每小时
String location = "lat:$lat;lng:$lng;direction:$course;speed:$speed;elevation:$altitude;";
SetLocation(location);
pocChangeNotifier.setLocation(location);
}
}