GetFromLocation Freeze for 4 - 5 second

Vincenzo

Member
Licensed User
Longtime User
I can not freeze application with GetFromLocation in running ? i put this method in timer and service but my Map Application freeze during call GetFromLocation .
 

Vincenzo

Member
Licensed User
Longtime User
I used Geocoder.
my code :

Public GeoC As Geocoder
...
Dim str(2) As Address
str = GeoC.GetFromLocation(Lat,Lon,2)

GetFromLocation is very slow method and i tried to move the code "GetFromLocation" in timer or service, but the sistem during the work this method is in foreground.
is there a way to read the position without blocking?


I have not understand how to move this post.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
I updated Geocoder last December so that it runs in a background thread and raises an event when the job is done: Geocoder library.

The code that Vincenzo posted is not using the latest version of Geocoder - or he's using the old 'main thread' syntax with the new version.

@Vincenzo
Get the latest version of Geocoder and the run the examples - the examples show how to use the new background thread syntax.

Martin.
 
Upvote 0

corwin42

Expert
Licensed User
Longtime User
The most recent version of the geocoder library (by warwound) (2.01) makes the network call in its own thread and fires a GeocodeDone event when the geocoding is finished.

@Vincenzo: Update your geocoder library to the latest version and change your code to use the GeocodeDone event.
 
Upvote 0

Vincenzo

Member
Licensed User
Longtime User
OK,
thanks for information. I used the V1.0 maybe it was a little old . I've updated the library V2.01 and managed as the example, the system seems to be much improved. All OK.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…