<commit_before>var geocoder;
	var map;
	var marker;

	codeAddress = function () {
	  geocoder = new google.maps.Geocoder();

	  var address = document.getElementById('city_country').value;
	  geocoder.geocode( { 'address': address}, function(results, status) {
	    if (status == google.maps.GeocoderStatus.OK) {
	      map = new google.maps.Map(document.getElementById('mapCanvas'), {
	    zoom: 16,
	            streetViewControl: false,
	          mapTypeControlOptions: {
	        style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
	              mapTypeIds:[google.maps.MapTypeId.HYBRID, google.maps.MapTypeId.ROADMAP]
	    },
	    center: results[0].geometry.location,
	    mapTypeId: google.maps.MapTypeId.ROADMAP
	  });
	      map.setCenter(results[0].geometry.location);
	      marker = new google.maps.Marker({
	          map: map,
	          position: results[0].geometry.location,
	          draggable: true,
	          title: 'My Title'
	      });
	      updateMarkerPosition(results[0].geometry.location);
	      geocodePosition(results[0].geometry.location);

	      // Add dragging event listeners.
	  google.maps.event.addListener(marker, 'dragstart', function() {
	    updateMarkerAddress('Dragging...');
	  });

	  google.maps.event.addListener(marker, 'drag', function() {
	    updateMarkerStatus('Dragging...');
	    updateMarkerPosition(marker.getPosition());
	  });

	  google.maps.event.addListener(marker, 'dragend', function() {
	    updateMarkerStatus('Drag ended');
	    geocodePosition(marker.getPosition());
	      map.panTo(marker.getPosition());
	  });

	  google.maps.event.addListener(map, 'click', function(e) {
	    updateMarkerPosition(e.latLng);
	    geocodePosition(marker.getPosition());
	    marker.setPosition(e.latLng);
	  map.panTo(marker.getPosition());
	  });

	    } else {
	      alert('Geocode was not successful for the following reason: ' + status);
	    }
	  });
	}

	function geocodePosition(pos) {
	  geocoder.geocode({
	    latLng: pos
	  }, function(responses) {
	    if (responses && responses.length > 0) {
	      updateMarkerAddress(responses[0].formatted_address);
	    } else {
	      updateMarkerAddress('Cannot determine address at this location.');
	    }
	  });
	}

	function updateMarkerStatus(str) {
	  /*document.getElementById('markerStatus').innerHTML = str;*/
	}

	function updateMarkerPosition(latLng) {
	  document.getElementById('googleMapID').value = [
	    latLng.lat(),
	    latLng.lng()
	  ].join(', ');
	}

	function updateMarkerAddress(str) {
	  document.getElementById('address').innerHTML = str;
	}

	$('.launch-map').on('click', function () {
		var loc = $("#landmark").val() + $("#Autocomplete").val();
		$("#city_country").val(loc);
	    $('#myModal').modal({
	        backdrop: 'static',
	        keyboard: false
	    }).on('shown.bs.modal', function () {
	        codeAddress();
	    });<commit_msg>add screen map error resolved<commit_after>	var geocoder;
	var map;
	var marker;

	codeAddress = function () {
	  geocoder = new google.maps.Geocoder();

	  var address = document.getElementById('city_country').value;
	  geocoder.geocode( { 'address': address}, function(results, status) {
	    if (status == google.maps.GeocoderStatus.OK) {
	      map = new google.maps.Map(document.getElementById('mapCanvas'), {
	    zoom: 16,
	            streetViewControl: false,
	          mapTypeControlOptions: {
	        style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
	              mapTypeIds:[google.maps.MapTypeId.HYBRID, google.maps.MapTypeId.ROADMAP]
	    },
	    center: results[0].geometry.location,
	    mapTypeId: google.maps.MapTypeId.ROADMAP
	  });
	      map.setCenter(results[0].geometry.location);
	      marker = new google.maps.Marker({
	          map: map,
	          position: results[0].geometry.location,
	          draggable: true,
	          title: 'My Title'
	      });
	      updateMarkerPosition(results[0].geometry.location);
	      geocodePosition(results[0].geometry.location);

	      // Add dragging event listeners.
	  google.maps.event.addListener(marker, 'dragstart', function() {
	    updateMarkerAddress('Dragging...');
	  });

	  google.maps.event.addListener(marker, 'drag', function() {
	    updateMarkerStatus('Dragging...');
	    updateMarkerPosition(marker.getPosition());
	  });

	  google.maps.event.addListener(marker, 'dragend', function() {
	    updateMarkerStatus('Drag ended');
	    geocodePosition(marker.getPosition());
	      map.panTo(marker.getPosition());
	  });

	  google.maps.event.addListener(map, 'click', function(e) {
	    updateMarkerPosition(e.latLng);
	    geocodePosition(marker.getPosition());
	    marker.setPosition(e.latLng);
	  map.panTo(marker.getPosition());
	  });

	    } else {
	      alert('Geocode was not successful for the following reason: ' + status);
	    }
	  });
	}

	function geocodePosition(pos) {
	  geocoder.geocode({
	    latLng: pos
	  }, function(responses) {
	    if (responses && responses.length > 0) {
	      updateMarkerAddress(responses[0].formatted_address);
	    } else {
	      updateMarkerAddress('Cannot determine address at this location.');
	    }
	  });
	}

	function updateMarkerStatus(str) {
	  /*document.getElementById('markerStatus').innerHTML = str;*/
	}

	function updateMarkerPosition(latLng) {
	  document.getElementById('googleMapID').value = [
	    latLng.lat(),
	    latLng.lng()
	  ].join(', ');
	}

	function updateMarkerAddress(str) {
	  document.getElementById('address').innerHTML = str;
	}

	$('.launch-map').on('click', function () {
		var loc = $("#landmark").val();
		$("#city_country").val(loc);
	    $('#myModal').modal({
	        backdrop: 'static',
	        keyboard: false
	    }).on('shown.bs.modal', function () {
	        codeAddress();
	    });
{'fraction_non_alphanumeric': 0.15077989601386482, 'fraction_numerical': 0.003119584055459272, 'mean_word_length': 3.130994989262706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5615311', 'n_tokens_mistral': 1886, 'n_tokens_neox': 1714, 'n_words': 278}