Using StageWebView.loadString() to display Google Maps on AIR for iOS

后端 未结 2 522
醉酒成梦
醉酒成梦 2021-01-28 09:26

I\'m trying to use a StageWebView to display a Google Maps map generated using the Javascript API. Is there a reason why it won\'t render on iOS? It works on Androi

相关标签:
2条回答
  • 2021-01-28 09:43

    Try to remove <!DOCTYPE HTML> tag I have the same problem before, after remove <!DOCTYPE HTML> the page rendered correctly

    0 讨论(0)
  • 2021-01-28 09:47

    I think that has go to do with iOS javascript sandboxing and the way the StageWebView API works. A while ago i tried to do something similar with the twitter service to skip the pin auth, but it seems that ios won't let you execute javascript from your app.

    You can try using a native webview extension to remedy this. stagewebviewbridge has a loadString method that should work with javascript.

    You could use a native extension to do your map browsing. if your app is ios exclusive, you can check out: air-maps-ane or you can use the MapQuest API. i have used in a android/ios app and works very well.

    0 讨论(0)
提交回复
热议问题