Skip to content

Commit 58cd853

Browse files
committed
change executescript to async mode
1 parent ae341a3 commit 58cd853

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MainForm.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ private void FocusMapPoint(int hopNo)
694694
{
695695
try
696696
{
697-
mapWebView.ExecuteScript(@"window.opentrace.focusHop(" + hopNo + ");");
697+
mapWebView.ExecuteScriptAsync(@"window.opentrace.focusHop(" + hopNo + ");");
698698
}
699699
catch (Exception e)
700700
{
@@ -709,13 +709,13 @@ private void ResetMap()
709709
switch (mapWebView.Url.Host)
710710
{
711711
case "geo-devrel-javascript-samples.web.app":
712-
mapWebView.ExecuteScript(OpenTrace.Properties.Resources.googleMap);
712+
mapWebView.ExecuteScriptAsync(OpenTrace.Properties.Resources.googleMap);
713713
break;
714714
case "lbs.baidu.com":
715-
mapWebView.ExecuteScript(OpenTrace.Properties.Resources.baiduMap);
715+
mapWebView.ExecuteScriptAsync(OpenTrace.Properties.Resources.baiduMap);
716716
break;
717717
}
718-
mapWebView.ExecuteScript("window.opentrace.reset(" + UserSettings.hideMapPopup.ToString().ToLower() + ")");
718+
mapWebView.ExecuteScriptAsync("window.opentrace.reset(" + UserSettings.hideMapPopup.ToString().ToLower() + ")");
719719
} catch (Exception e)
720720
{
721721
MessageBox.Show($"Message: ${e.Message} \nSource: ${e.Source} \nStackTrace: ${e.StackTrace}", "Exception Occurred");

0 commit comments

Comments
 (0)