Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 593 Bytes

File metadata and controls

32 lines (21 loc) · 593 Bytes

baseArrayClass.mapAsync(fn, callback)

var baseArray = new plugin.google.maps.BaseArrayClass([
  {placeId: "ChIJN1t_tDeuEmsRUsoyG83frY4"},
  {placeId: "ChIJyWEHuEmuEmsRm9hTkapTCrk"},
  {placeId: "ChIJLfySpTOuEmsRsc_JfJtljdc"}
]);

var idx = 0;
baseArray.mapSeries(function(placeData, next) {

  // example: Obtain data from your server
  getInfomationFromDB(placeData, function(latLng) {

    map.addMarker({
      "position": latLng,
      "idx": (idx++)
    }, next);

  });

}, function(markers) {

  // markers[0] ... markers[n]

});