Welcome Guest Search | Active Topics | Sign In | Register

Googlemaps finished loading before webBrowser is visible ?? Options
Sven Dhaens
Posted: Monday, September 21, 2015 10:44:57 AM
Rank: Member
Groups: Member

Joined: 5/20/2015
Posts: 11
Hi,

I am using googleMaps API in my eo.WebBrowser with windows forms.

I have this :
Quote:

$(document).ready(function () {
.....
google.maps.event.addListener(map, "tilesloaded", function (e) {
alert("test")
eoWebBrowser.extInvoke("MapFinishedLoading");
google.maps.event.clearListeners(map, "tilesloaded");
});

in my html file.

This should trigger an event when the map finished loading the tiles for the first time. (=so that I know its finished loading)
So after that happens I can start issuing commands to the webview.

the problem: I get the alertbox even before i see the window containing the map, pop-up... and the eoWebBrowser.extInvoke("MapFinishedLoading"); doesnt go through at all.

how can I make the event trigger properly? Or get a more clear signal of when the map is acctually fully loaded.

I am currently using:
Quote:
if(!webView.IsLoading && webView.StatusMessage == ""){
...dosomething
}

I am unsure if in all cases my googlemap would be loaded already with this and rdy for commands to add markers.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.