Google maps 使用dburles:googlemaps将标记从mongodo放置到googlemap
此Meteor代码需要在google地图上放置10个标记,这些标记需要与mongo collection文档的address属性中的前10个位置相匹配。Google maps 使用dburles:googlemaps将标记从mongodo放置到googlemap,google-maps,meteor,Google Maps,Meteor,此Meteor代码需要在google地图上放置10个标记,这些标记需要与mongo collection文档的address属性中的前10个位置相匹配。 地址的格式为“悉尼abc街55号,2000” 我不知道怎么做。有什么建议吗?thx Template.gmap.helpers({ mapOptions: function () { if (GoogleMaps.loaded()) { return { center: new google.maps.L
地址的格式为“悉尼abc街55号,2000” 我不知道怎么做。有什么建议吗?thx
Template.gmap.helpers({
mapOptions: function () {
if (GoogleMaps.loaded()) {
return {
center: new google.maps.LatLng(-37.8136, 144.9631),
zoom: 13
};
}
}
});
Template.gmap.onRendered(function () {
GoogleMaps.load();
});
Template.gmap.onCreated(function () {
GoogleMaps.ready('map', function (map) {
var marker = new google.maps.Marker({
position: map.options.center,
map: map.instance
});
//Access a map instance any time by using the maps object.
// GoogleMaps.maps.exampleMap.instance
});
});
{{>googleMap name=“map”options=mapOptions}
用这个模块检查这个家伙是如何工作的
这里的文档介绍了如何将地址转换为经度和纬度