@lunneyd wrote:
Mapbox works perfectly in android but for iOS it doesn’t even display the map. It asks can the phone have access to location but that’s it. Any ideas.
initMap(lat: number, long: number) { let map = L.map('map').setView([lat, long], 18); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', { attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>', maxZoom: 18, id: 'mapbox.streets', accessToken: 'tokengoeshere' }).addTo(map); this.setMap(lat, long, map); return map; }
Posts: 1
Participants: 1