-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When attempting to use this plugin in leaflet .44 I get the following error:
leaflet-src.js:55TypeError: 'undefined' is not an object (evaluating 'obj[key]')
Below is my code:
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="leaflet.css">
<script src="leaflet-src.js"></script>
<script src="leafpile-src.js"></script>
</head>
<body>
<div id="map" style="width: 600px; height: 600px;"></div>
<script>
// normal map init stuff
var map = new L.Map('map');
var tilesUrl = 'http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png';
var subDomains = ['otile1','otile2','otile3','otile4'];
var attrib = 'Data, imagery and map information provided by <a href="http://open.mapquest.com" target="_blank">MapQuest</a>, <a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> and contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a>';
var tiles = new L.TileLayer(tilesUrl, {maxZoom: 18, attribution: attrib, subdomains: subDomains});
map.setView(new L.LatLng(40.423, -98.7372), 8).addLayer(tiles);
// setup the leafpile
var leafpile = new L.Leafpile();
map.addLayer(leafpile);
// add some markers to the pile
var m1 = new L.Marker(new L.LatLng(47.81, -124.18)),
m2 = new L.Marker(new L.LatLng(39.33, -93.81)),
m3 = new L.Marker(new L.LatLng(42.37, -121.90));
leafpile.addMarker(m1);
leafpile.addMarker(m2);
leafpile.addMarker(m3);
</script>
</body>
</html>
Metadata
Metadata
Assignees
Labels
No labels