External images not being displayed in Android app - Meteor - Cordova -


i developing android app using meteor , having problems displaying images external sources.

the following <img> tag should displays image google maps api based on latitude , longitude:

<img src="http://maps.googleapis.com/maps/api/staticmap?center={{loc.lat}},{{loc.lng}}&zoom=15&size=600x300&maptype=roadmap&markers=color:blue%7c{{loc.lat}},{{loc.lng}}" /> 

though works in browser, below error on server when trying run on android device

xmlhttprequest cannot load http://10.0.2.2:3000/sockjs/info?cb=p4ej3xginv. origin http://meteor.local not allowed access-control-allow-origin.

do need put 'google maps api' domain in kind of 'whitelist' when working phonegap.

if so, how in meteor?

yep, starting 1.0.4, "meteor cordova apps no longer allow access domains default."

so on, in mobile-config.js file, have call app.accessrule every external domain may load content from.

so in case, adding:

app.accessrule('http://maps.googleapis.com/*'); 

at end of mobile-config.js file should trick.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -