0
我刚开始创建一个Meteor应用并添加了dburles:google-maps
包,我似乎一直按照他在教程中指出的步骤来执行它,但是我得到错误Template not defined
,我的代码是如下:模板未定义 - 流星
的.html
<head>
<meta charset="utf-8">
<title>project-j</title>
<meta name="description" content="Let's see where it takes us">
<meta name="viewport" content="user-scalable=no, initial-scale=1, minimal-ui, maximum-scale=1, minimum-scale=1" />
</head>
<body>
{{> map}}
</body>
<template name="map">
<div class="map-container">
{{> googleMap name="map" options=mapOptions}}
</div>
</template>
的.js
Meteor.startup(function() {
GoogleMaps.load();
});
Template.map.helpers({
mapOptions: function() {
if (GoogleMaps.loaded()) {
return {
center: new google.maps.LatLng(-37.8136, 144.9631),
zoom: 8
};
}
}
});
任何想法,我检查完成的回购和代码似乎与我的1:1 ...?