tombatossals / angular-leaflet-directive

AngularJS directive to embed an interact with maps managed by Leaflet library
http://tombatossals.github.io/angular-leaflet-directive
MIT License
1.5k stars 635 forks source link

Map is not showing(Grey color) properly in ionic #1173

Closed ansarikhurshid786 closed 7 years ago

ansarikhurshid786 commented 7 years ago

I am using ionic and angularjs to show map with marker. It is working properly in browser or emulator but not properly showing(Grey color) in android device.

what's wrong I don't know?

ansarikhurshid786 commented 7 years ago

I solve this problem. So I am closing this issue

amalfernando commented 7 years ago

How did u fix this issue?

ansarikhurshid786 commented 7 years ago

Sorry I can't explain here.

amalfernando commented 7 years ago

Thats fine. I managed to fix. In my case I forgot to specify tiles property for map. I have added my code below which might help for someone.

            <leaflet id="drawingMap" defaults="map.defaults" watch-paths="false" data-tap-disabled="true" marker-options="markerOptions" event-broadcast="map.events" center="map.center" markers="map.markers" bounds="map.bounds" tiles="map.tiles" ng-if="map"></leaflet>

$scope.map = { defaults: { zoomControl: false }, tiles: { url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' }, bounds: {}, markers: {}, center: { lat: defaultCenter.latitude, // This is current location of user. required for my case. lng: defaultCenter.longitude, zoom: 10 }, events: { map: { enable: ["zoomend", "dragend", "popupclose", "mouseover", "mouseout", "click", "popupopen"], logic: 'emit' } } };

ansarikhurshid786 commented 7 years ago

Ok

sunilk12 commented 7 years ago

kl