【发布时间】:2014-03-15 11:54:53
【问题描述】:
尝试学习 Meteor,使用他们的派对示例。我添加了leafletjs 代码示例来测试地图,但我似乎无法让它工作。我什至没有收到任何错误。这是当事人的例子,它在一个普通的 html 页面中工作。这是因为Handlebars吗?如果有人知道任何问题,那就太好了。谢谢。
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<title>Wishes</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
{{> page}}
<div id="wishmap" style="height:400px;"></div>
<script>
var mapa = L.map('wishmap').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tile.cloudmade.com/28cc49f16f1747ebae3100fb3d32f05a/997/256/{z}/{x}/{y}.png', {
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>',
maxZoom: 18
}).addTo(mapa);
</script>
</body>
【问题讨论】:
标签: meteor handlebars.js leaflet