Leaflet map not working in emulator, does work in browser

Hi all,

I just want to say that I have solved the problem and I will try to explain what I did here. First, I changed the view to this:

<leaflet id="map_wandeling" class="superfill" tiles="tiles" ng-init="doMapInit()"></leaflet>

(Especially the ng-init is important here)

Then I changed the controller to have a function called doMapInit, with the following content:

$scope.doMapInit = function() {

	angular.extend($scope, {
		tiles: {
			url: 'http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png'
		},
		defaults: {
			scrollWheelZoom: false
		}
	});

	leafletData.getMap('map_wandeling').then(function(map) {
		$scope.map = map;
	});
};

I hope this helps, it did work for me! Note that you need the Angular-Leaflet-plugin for this :wink:
I think because I now use a specific “url = http://…”, leaflet knows that I am talking about external links and thus doesn’t change them to file://