Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps 使用dburles:googlemaps将标记从mongodo放置到googlemap_Google Maps_Meteor - Fatal编程技术网

Google maps 使用dburles:googlemaps将标记从mongodo放置到googlemap

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

此Meteor代码需要在google地图上放置10个标记,这些标记需要与mongo collection文档的address属性中的前10个位置相匹配。
地址的格式为“悉尼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}

用这个模块检查这个家伙是如何工作的

这里的文档介绍了如何将地址转换为经度和纬度