xperiments / stagewebviewbridge

Automatically exported from code.google.com/p/stagewebviewbridge
5 stars 2 forks source link

Problems Loading GoogleMaps v3 on iOS #43

Open BernalCarlos opened 9 years ago

BernalCarlos commented 9 years ago

Hello,

I'm using StageWebViewBridge to load a google map, but i'm having troubles with iOS devices. Sometime it loads, and sometimes it doesn't with no apparent error. Also the "Complete" event gets fired randomly.

I having the same issue reported here: https://github.com/xperiments/stagewebviewbridge

It looks like the repository is quiet, but can you at lest give me some directions of how to fix this?

Hope someone can answer.

dr-andy commented 9 years ago

Exactly same error. Does anybody have a solution?

BernalCarlos commented 9 years ago

Helo Andy,

This project has died, I was able to solve the problem by creating my own StageWebViewBridge. A much simpler one, with a lot of work to be donde ahead, but useful enough to load a GoogleMap on iOS and allow simple JS and AS3 communication.

If you're interested, I could upload the source code to Github, but only until monday or tuesday.

Best Regards, Carlos.

dr-andy commented 8 years ago

Hi Carlos,

Thank you for your reply, it would be great if you could upload it on Github.

fmcguire commented 6 years ago

I had a similar issue recently (with an AIR application) when the Google Maps API was updated from v.3.2 to v.3.3 - the map markers would no longer appear and I would get runtime errors. I discovered that StageWebViewBridge uses the AIR WebKit and it could not be forced to use the native browser's WebKit. I added an extra param to the StageWebViewBridge constructor in es.xperiments.media.StageWebViewBridge.as to be able to select which WebKit to use:

public function StageWebViewBridge( xpos : uint = 0, ypos : uint = 0, w : uint = 400, h : uint = 400, autoUpdateProps : Boolean = true, nativeWebKit : Boolean = false )
{
    super();
    _autoUpdateProps = autoUpdateProps;
    _viewPort = new Rectangle( 0, 0, w, h );
    _view = new StageWebView( nativeWebKit );
    _view.viewPort = _viewPort;
...
}

Then to use the native browser's WebKit, in my AS3 code I call:

protected var webView:StageWebViewBridge;

protected function onDiskCacheEnd(e:StageWebviewDiskEvent):void {
    webView = new StageWebViewBridge(0, 0, this.width, this.height, false, true);
...
}

The markers appeared fine, no errors

Now I need to find out why StageWebViewBridgeEvent.DOM_LOADED isn't getting fired. Anyone have any suggestion?