Map tiles from Cloudmade are not loading even if added in plist

352 Views Asked by At

I've been trying out iOS and PhoneGap and had some success but when I was adding geolocation and maps using Leaflet, I am stumped on tiles not loading even if I added them to the Cordova.plist as an External host.

The tiles are called from here:

            var map = new L.Map('map');

            var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/MYAPIKEY/997/256/{z}/{x}/{y}.png',
            cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
            cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution});

Even if I remove the protocol, the tiles won't load from the iOS Simulator so I am not sure what is wrong with what I'm doing. The application compiles just fine without errors and the CloudMade key I am using is for Mobile. I am learning this from the Leaflet tutorials and doing some very minimal modifications in the process to learn iOS development with PhoneGap. Thanks.

1

There are 1 best solutions below

0
On

may be you don't call

cloudmade.addTo(map);