<commit_before>Template.spacePage.helpers({
  reviews: function() {
    return Reviews.find({spaceId: this._id});
  },

  lat: function() {
    return this.latitude;
  },

  lon: function() {
    return this.longitude;
  },

  mapOptions: function() {
    if (GoogleMaps.loaded()) {
      return {
        center: new google.maps.LatLng(this.latitude, this.longitude),
        zoom: 15,
      };
    }
  }
});

Template.body.onCreated(function() {
  // We can use the `ready` callback to interact with the map API once the map is ready.
  GoogleMaps.ready('map', function(map) {
    // Add a marker to the map once it's ready
    var marker = new google.maps.Marker({
      position: map.options.center,
      map: map.instance,
      icon: '/siteAssets/gsmarker40.png',
      title: this.title
    });
  });
});<commit_msg>Added map functionality to each space page + markers display green spaces on the map.<commit_after>Template.spacePage.helpers({
  reviews: function() {
    return Reviews.find({spaceId: this._id});
  },

  lat: function() {
    return this.latitude;
  },

  lon: function() {
    return this.longitude;
  },

  mapOptions: function() {
    if (GoogleMaps.loaded()) {
      return {
        center: new google.maps.LatLng(this.latitude, this.longitude),
        zoom: 15,
      };
    }
  }
});

Template.body.onCreated(function() {
  // We can use the `ready` callback to interact with the map API once the map is ready.
  GoogleMaps.ready('map', function(map) {
    // Add a marker to the map once it's ready
    var marker = new google.maps.Marker({
      position: map.options.center,
      map: map.instance,
      icon: "/siteAssets/gsmarker40.png",
      title: this.title
    });
  });
});
{'fraction_non_alphanumeric': 0.13837209302325582, 'fraction_numerical': 0.004651162790697674, 'mean_word_length': 2.709051724137931, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4145912', 'n_tokens_mistral': 552, 'n_tokens_neox': 542, 'n_words': 145}