<commit_before>// to depend on a bower installed component:
// define(['bower_components/componentName/file'])

define(["jquery"], function($) {
	// $('body').append('jQuery ' + $.fn.jquery + ' loaded!');
	$(document).ready(function(){
		$("#getGeo").click(function(){
			var addr = $("#addrBox").val();
			getLangLat(addr);
		});	
		var getLangLat = function(addr){
			$.ajax({
				url:"https://maps.google.com/maps/api/geocode/json?address="
				+addr+"&sensor=false", 
				success: handleMapResponse
			});
		};
		var handleMapResponse = function(d){
			console.log("handleMapResponse", d);
			var lat = d.results[0].geometry.location.lat,
				lng = d.results[0].geometry.location.lng,
				formatted_address = d.results[0].formatted_address;
				$("#content").html("")
					.append("<p><em>Formatted Adress</em>: "+ formatted_address 
						+", <em>Latitude</em>: "+ lat +", <em>Longitude</em>: "+ lng +"</p>");
			initialize(lat,lng, formatted_address);
		};
		var initialize = function( lat, lng, formatted_address) {
			console.log("initialize Map", lat,lng);
			var myLatlng = new google.maps.LatLng(lat, lng);
			var myOptions = {
			zoom: 10,
			center: myLatlng
			};
			var map = new google.maps.Map(document.getElementById("map-canvas"), myOptions);
			var marker = new google.maps.Marker({
		      	position: myLatlng,
		      	map: map,
		      	title: formatted_address
		  	});
	    };
	});
});<commit_msg>add: drop animation to the marker<commit_after>// to depend on a bower installed component:
// define(['bower_components/componentName/file'])

define(["jquery"], function($) {
	// $('body').append('jQuery ' + $.fn.jquery + ' loaded!');
	$(document).ready(function(){
		$("#getGeo").click(function(){
			var addr = $("#addrBox").val();
			getLangLat(addr);
		});
		var getLangLat = function(addr){
			$.ajax({
				url:"https://maps.google.com/maps/api/geocode/json?address="
				+addr+"&sensor=false",
				success: handleMapResponse
			});
		};
		var handleMapResponse = function(d){
			console.log("handleMapResponse", d);
			var lat = d.results[0].geometry.location.lat,
				lng = d.results[0].geometry.location.lng,
				formatted_address = d.results[0].formatted_address;
				$("#content").html("")
					.append("<p><strong>Formatted Adress</strong>: "+ formatted_address
						+", <strong>Latitude</strong>: "+ lat +", <strong>Longitude</strong>: "+ lng +"</p>");
			initialize(lat,lng, formatted_address);
		};
		var initialize = function( lat, lng, formatted_address) {
			console.log("initialize Map", lat,lng);
			var myLatlng = new google.maps.LatLng(lat, lng);
			var myOptions = {
			zoom: 7,
			center: myLatlng
			};
			var map = new google.maps.Map(document.getElementById("map-canvas"), myOptions);
			var marker = new google.maps.Marker({
		      	position: myLatlng,
		      	map: map,
		      	animation: google.maps.Animation.DROP,
		      	title: formatted_address
		  	});
	  };

	});
});
{'fraction_non_alphanumeric': 0.18901398839986353, 'fraction_numerical': 0.0030706243602865915, 'mean_word_length': 3.6687898089171975, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 2, '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': '3565369', 'n_tokens_mistral': 1126, 'n_tokens_neox': 965, 'n_words': 179}