huafu / ember-google-map

An Ember addon to include a google-map Ember friendly component in your apps.
http://huafu.github.io/#/ember?name=ember-google-map
MIT License
87 stars 34 forks source link

Map not visible on Android app in combination with ember-cli-cordova #39

Closed jaimevent closed 9 years ago

jaimevent commented 9 years ago

Hi,

I'm troubling with following problem: I'm compiling the app with the ember-cli-cordova package, everything is working fine on my browser, but when I open the same route in my Android-app I just get a blank screen instead of the Google Map with markers, circles and polylines.

Looking at the logs of the app I get the following message:

D/CordovaLog(10021): file:///android_asset/www/assets/vendor.js: Line 14423 : WARNING: [google-map] Something went wrong with Google Map library. If you think it is not your side, please report the issue at https://github.com/huafu/ember-google-map/issues. Also be sure to have used `return this.loadGoogleMap()` in one of the 3 `model` hooks of each route which would use the component (only if you have set `google.lazyLoad` to true in your `config/environment.js.`)

I'm not using lazyLoad.

This is my ember-cli configuration:

DEBUG: -------------------------------
DEBUG: Ember             : 1.10.0
DEBUG: Ember Data        : 1.0.0-beta.15
DEBUG: jQuery            : 1.11.2
DEBUG: Ember Simple Auth : 0.7.3
DEBUG: -------------------------------

The version of ember-cli-cordova is 0.0.15.

This is how I'm calling the plugin:

{{google-map
          lat=centerLat lng=centerLon zoom=zoom type=type
          markers=latLonBounds
          polylines=polylinesBounds
          circles=circleBounds
          autoFitBounds=true
          gopt_styles=mapsStyle
          markerInfoWindowTemplateName='map/info-window'}}

Any ideas where the issue could be? Any help is appreciated :-)

huafu commented 9 years ago

I believe either Cordova does not let you load an external library or Google Map does not let you load it from within a page with a file:// protocol (cordova apps are using the file:// as the files are stored locally).

huafu commented 9 years ago

Please reopen if it is another issue.