<commit_before>import { androidObject } from './androidObject';

class AIMap {
  constructor(mapConfig) {

    let mapOptions = {
      zoom: mapConfig.initialZoom,
      center: new google.maps.LatLng(mapConfig.centerLat, mapConfig.centerLng),
      disableDoubleClickZoom: true
    };
    this.map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

    // Listening for the first 'idle' event to tell Android that the map is ready
    google.maps.event.addListenerOnce(this.map, 'idle', function(){
      console.log('Triggering mapIsReady on Android side.');
      androidObject.mapIsReadyToAndroid();
    });
  }

  getMap() {
    return this.map;
  }
}

export { AIMap };
<commit_msg>adds Zoom functions to map<commit_after>import { androidObject } from './androidObject';

class AIMap {
  constructor(mapConfig) {

    let mapOptions = {
      zoom: mapConfig.initialZoom,
      center: new google.maps.LatLng(mapConfig.centerLat, mapConfig.centerLng),
      disableDoubleClickZoom: true
    };
    this.map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

    // Listening for the first 'idle' event to tell Android that the map is ready
    google.maps.event.addListenerOnce(this.map, 'idle', function(){
      console.log('Triggering mapIsReady on Android side.');
      androidObject.mapIsReadyToAndroid();
    });
  }

  getMap() {
    return this.map;
  }

  setZoom(zoom) {
    if (zoom >= 0 && zoom <= 19){
      this.map.setZoom(zoom);
    }
    else // Exception handling is also done on Android side
      console.log('Zoom value ' + zoom + ' is not in the valid range 0-19');
  };

  getZoom() { return this.map.zoom; };

}

export { AIMap };

{'fraction_non_alphanumeric': 0.1244886031560491, 'fraction_numerical': 0.0035067212156633548, 'mean_word_length': 3.237623762376238, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '2422435', 'n_tokens_mistral': 525, 'n_tokens_neox': 521, 'n_words': 131}