I'm completely new to GIS, and thought I would start off with the leaflet quick tutorial. However, I'm having problems with adding the base tile layer with Mapbox. This is my code so far:
<!DOCTYPE html>
<html lang='en'>
<head>
<title>Agricultural Trade Patterns</title>
<meta charset='utf-8' />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
</head>
<body>
<div id="map" style="width: 600px; height: 600px"></div>
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<script>
//initialize the map
var map = L.map('map').setView([41.854501, -87.715496],13);
L.titleLayer('https://api.mapbox.com/v4/skadambi.p07cgnk1/page.html?access_token=pk.eyJ1Ijoic2thZGFtYmkiLCJhIjoiY2lqdndsZGg3MGNua3U1bTVmcnRqM2xvbiJ9.9I5ggqzhUVrErEQ328syYQ#3/0.00/0.00', {
maxZoom:18,
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
id: 'skadambi.p07cgnk1',
accessToken: 'pk.eyJ1Ijoic2thZGFtYmkiLCJhIjoiY2lqdndsZGg3MGNua3U1bTVmcnRqM2xvbiJ9.9I5ggqzhUVrErEQ328syYQ'
}).addTo(map);
map.on('click', onMapClick);
</script>
</body>
I tried to follow the tutorial as much as I could, but whenever I test it I'm getting the error:
TypeError: L.titleLayer is not a function
And I can't figure out why.
Am I passing the wrong arguments to tileLayer?
I know my URL template doesn't have the exact format that was on the leaflet tutorial, but I couldn't find a png url like that anywhere?
Is that the problem?