cowbell / ionic-geofence

Ionic geofence app example
MIT License
180 stars 92 forks source link

OpenstreetMap is not getting displayed #13

Closed waqassiddiqi closed 9 years ago

waqassiddiqi commented 9 years ago

On web browser it is working fine but when build for android, the map is not being displayed. I tried few different things found on stackoverflow but problem still remains the same.

On logs what i can see is following, which i believe is related to this:

I/chromium(19641): [INFO:CONSOLE(20306)] "Obtaining current location...", source: file:///android_asset/www/lib/ionic/js/ionic.bundle.js (20306)
I/chromium(19641): [INFO:CONSOLE(20306)] "Current location found", source: file:///android_asset/www/lib/ionic/js/ionic.bundle.js (20306)
I/chromium(19641): [INFO:CONSOLE(20306)] "[AngularJS - Leaflet] event-broadcast must be an object, check your model.", source: file:///android_asset/www/lib/ionic/js/ionic.bundle.js (20306)
W/BindingManager(19641): Cannot call determinedVisibility() - never saw a connection for the pid: 19641
I/chromium(19641): [INFO:CONSOLE(20306)] "TypeError: Cannot read property 'replace' of undefined
I/chromium(19641):     at Object.o.Util.template (file:///android_asset/www/lib/leaflet/dist/leaflet.js:6:1492)
I/chromium(19641):     at o.TileLayer.o.Class.extend.getTileUrl (file:///android_asset/www/lib/leaflet/dist/leaflet.js:7:6068)
I/chromium(19641):     at o.TileLayer.o.Class.extend._loadTile (file:///android_asset/www/lib/leaflet/dist/leaflet.js:7:7269)
I/chromium(19641):     at o.TileLayer.o.Class.extend._addTile (file:///android_asset/www/lib/leaflet/dist/leaflet.js:7:5679)
I/chromium(19641):     at o.TileLayer.o.Class.extend._addTilesFromCenterOut (file:///android_asset/www/lib/leaflet/dist/leaflet.js:7:4539)
I/chromium(19641):     at o.TileLayer.o.Class.extend._update (file:///android_asset/www/lib/leaflet/dist/leaflet.js:7:4038)
I/chromium(19641):     at o.TileLayer.o.Class.extend.onAdd (file:///android_asset/www/lib/leaflet/dist/leaflet.js:7:1201)
I/chromium(19641):     at o.Map.o.Class.extend._layerAdd (file:///android_asset/www/lib/leaflet/dist/leaflet.js:6:29891)
I/chromium(19641):     at o.Map.o.Class.extend.eachLayer (file:///android_asset/www/lib/leaflet/dist/leaflet.js:6:21947)
I/chromium(19641):     at o.Map.o.Class.extend._resetView (file:///android_asset/www/lib/leaflet/dist/leaflet.js:6:27534)", source: file:///android_asset/www/lib/ionic/js/ionic.bundle.js (20306)
waqassiddiqi commented 9 years ago

Well turned out it was an issue related to permission for network call. Adding cordova whitelist pluging solved it.