Creating Collections from Google Places Api


Hi, I´m wondering what´s the best way to create a collection from a returned search in google places api

right now my approach is using a service(google.maps.places.PlacesService) and on the callback function I´m trying to create a place to add to my collection.


function performSearch() {
   for (var i = 0; i < 4; i++) {
      urlLugar = arrayPlaces[i];
      var request = {
		bounds: map.getBounds(),
		keyword: urlLugar
	service.radarSearch(request, callback);
function callback(results, status) {
		  if (status !== google.maps.places.PlacesServiceStatus.OK) {
	          for (var i = 0, result; result = results[i]; i++) {
		       var comment = [];
		       var placeCreated = {
			    comments: comment,
			    rating: 0,
			    location: result.geometry.location
		       }'place.create', placeCreated, function(err){
				    Materialize.toast("Error", 4000);
			     }else {
				     Materialize.toast("Success", 4000);

When I try this I get the following error:

Exception while simulating the effect of invoking ‘place.create’ TypeError: Meteor.error is not a constructor(…)

Also this is the method I use to create places

          Places.insert(place, function(err){
                            throw new Meteor.error();

I would like to know if this is the best approach and if it isn´t what could be?

Thanks and regards