angular-ui / angular-google-maps

AngularJS directives for the Google Maps Javascript API
http://angular-ui.github.io/angular-google-maps
2.52k stars 1.07k forks source link

An app can't load remote web content in the local context on windows phone cordova project #1537

Open eduboxgithub opened 9 years ago

eduboxgithub commented 9 years ago

Hello,

I get this error when trying to run windows phone 8.1 cordova projecto (adding windows platform):

"APPHOST9601 An app can't load remote web content in the local context".

I think I have the cordova-plugin-whitelist correctly configured with the proper intent, navigation and network tags on config.xml (I also have the meta tag on index.html).

Strangely if I add wp8 cordova platform and run it, I have no errors. Only on the windows platform running the windows phone 8.1 project inside the solution.

eduboxgithub commented 8 years ago

I'm still not able to run google maps on the windows cordova platform.

I found this article: https://msopentech.com/blog/2014/09/25/apache-cordova-gains-windows-8-1-and-windows-phone-8-1-support-2-2/#

and this one: http://www.creepyed.com/2012/11/how-to-use-the-google-maps-api-on-windows-8/

They suggest to load the map on a iframe, but I don't think I can do that using angular-google-maps.

Any other suggestion/fix?

nmccready commented 8 years ago

Sorry I can't help you as I am unfamiliar with both platforms. If you could set up a hosted Virtual Machine then maybe others could help (including me). This goes along the lines of something small and reproducible.

ciponthenet commented 8 years ago

I'm having the exact same problem. Anyone found a solution yet?

nmccready commented 8 years ago

No one made an example to play with. So I haven't looked at it.

ciponthenet commented 8 years ago

Not an easy thing to share the whole environment in a hosted virtual machine... My VMware image is about 100 GB; any suggestions on how we could manage?

nmccready commented 8 years ago

Not asking you to share the whole VM, I am asking you to make a small verifiable example that reproduces the same thing. What do you think I have to do to debug it?

ciponthenet commented 8 years ago

Well, you will need Windows 8.1 or 10, Visual Studio 2015 Community, NodeJS and Cordova. Let me know if you can manage this setup and I can provide a small sample app and the necessary steps to replicate the issue.

westhacker commented 8 years ago

I have the same problem. I do not think it is the problem of Angular google maps, but the cordova windows application have no access to google map service.

OscarDeDios commented 8 years ago

I have the same problem with google maps and a Cordova windows phone app. Does anybody find a solution after this time?

Desertphile commented 6 years ago

I have read that it has something to do with in the CONFIG.XML and the need to add or a similar xml tag and structure. However I have not found any actual instructions on how to do that--- I used a text editor and added a structure. Cordova has a "white list" that you (and I and others) need to edit to allow navigation to sites that hold .js files and other external files. See:

https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/

Desertphile commented 6 years ago

use CONFIG.XML to select "plugins" on the left bar. Find the whitelist plug in. Edit the whitelist plugin's PLUGIN.XML file and add navigation permission:

<Package>
  <Applications>
      <Application>
          <ApplicationContentUriRules>
              <allow-navigation href="*google.com*" />
          </ApplicationContentUriRules>
      </Application>
  <Applications>
</Package>

Change google.com to the service your application is trying to navigate to.

I have no idea if this will work however.