나는 geolocalisation에 대한 응용 프로그램을 봤는데, 현재 geoposition하지만 응용 프로그램의 디스플레이가 매우 느립니다 검색 ...geolocalisation는 매우 느립니다
생성자 :
public TaskGeo()
{
InitializeComponent();
_geolocator = new Geolocator();
_geolocator.DesiredAccuracy = PositionAccuracy.High;
_geolocator.MovementThreshold = 100;
_geolocator.PositionChanged += _geolocator_PositionChanged;
_geolocator.StatusChanged += _geolocator_StatusChanged;
if (_geolocator.LocationStatus == PositionStatus.Disabled)
this.DisplayNeedGPS();
}
코드에 대한 응용 프로그램의 디스플레이 :
void _geolocator_PositionChanged(Geolocator sender, PositionChangedEventArgs args)
{
// saving and display of the position
App.RootFrame.Dispatcher.BeginInvoke(() =>
{
this._CurrentPosition = args.Position;
this.lblLon.Text = "Lon: " + this._CurrentPosition.Coordinate.Longitude;
this.lblLat.Text = "Lat: " + this._CurrentPosition.Coordinate.Latitude;
this.LocationChanged(this._CurrentPosition.Coordinate.Longitude, this._CurrentPosition.Coordinate.Latitude);
});
}
그리고 쿼리에 대한 코드 :
더 빠르게 위치를 표시하도록 코드를 향상시킬 수 있습니까? 미리 감사드립니다!
저는 Stimms가 옳다고 생각합니다. 우리는 항상 속도로 정확성을 보상해야합니다. 정확성을 줄임으로써 시도해보십시오. 그것이 나아지고 있다면 알려주십시오. IP 주소를 사용하여 Geolocation을 수행하는 것이 GPS 또는 Wi-Fi보다 빠릅니다. –