I want to track a few vehicles.For that reason, I have 2 maps. One is an overview, showing the current position of all vehicles and the other shows only one vehicles at a time, with a PolyLine showing the route travelled. These are on different pages of aTPageControl
When my app launches, I set OnDownloadFinish handlers for both maps.
Since the overview map's page is is visible by default (the main page of the app), its OnDownloadFinish handler fires fairly quickly.
However, the second map's OnDownloadFinish handler will never fire until I click to select the page which contains it.
My current design says that only when both maps are fully launched then the applciation is ready to start processing. I suppose that can add some flags and not try to add a marker of PolyLine ot the second map until its OnDownloadFinish handler has been called.
But I am curious as to why teh behaviour is that way. After I Launch() a map, its OnDownloadFinish handler won't be called until it it is shown?? I guess that I can't change that, so will just have to code round it.
Hi,
You can add a call to WebBrowser.HandleNeeded to force page loading in a non-visible WebGMaps control.
Example:
procedure TForm9.FormShow(Sender: TObject);
begin
WebGMaps2.WebBrowser.HandleNeeded;
WebGMaps1.Launch;
WebGMaps2.Launch;
end;