<commit_before>{% load i18n %}
<div class="plugin_googlemap">
	<!--  ATTENTION: set a height for this div in CSS -->
	<div id="google-map-{{ object.id }}" class="googlemap-map"></div>

	<script type="text/javascript">
		//<![CDATA[
		(function(){
			var geocoder;
			var map;
			
			var title = "{{ object.get_title }}";
			var address = "{{ object.address }}, {{ object.zipcode }} {{ object.city }}";
			var zoom = {{ object.get_zoom_level }};
			
			function load()
			{
			  // Create new map object
			  map = new GMap2(document.getElementById("google-map-{{ object.id }}"));
			  map.addControl(new GSmallZoomControl());
			  map.addControl(new GMapTypeControl());
			 
			  {% if object.get_lat_lng %}
			  var latLng=new GLatLng({{ object.get_lat_lng|join:", " }});
			  addToMap(latLng);
			  {% else %}
			  // Create new geocoding object
			  geocoder = new GClientGeocoder();
			  // Retrieve location information, pass it to addToMap()
			  geocoder.getLocations(address, onResponse);
			  {% endif %}
			}
			
			// This function adds the point to the map
			
			function onResponse(response){
			  // Retrieve the object
			  place = response.Placemark[0];
			
			  // Retrieve the latitude and longitude
			  latLng = new GLatLng(place.Point.coordinates[1],
			                       place.Point.coordinates[0]);
			  addToMap(latLng);	
			}
			
			function addToMap(latLng)
			{
			  // Retrieve the latitude and longitude
			  center = new GLatLng(latLng.lat() + 0.01, latLng.lng());
			
			  // Center the map on this point
			  map.setCenter(center, zoom);
			
			  // Create a marker
			  marker = new GMarker(latLng);
			
			  // Add the marker to map
			  map.addOverlay(marker);
			
			  // Add address information to marker
			  marker.openInfoWindowHtml("<strong>" + title + "</strong><br />" + address {% ifnotequal map.get_content "" %} + "<br/><br/><i>{{ object.get_content }}</i>"{% endifnotequal %});
			}
			
			load();
		})();
		//]]>
	</script>
{% if object.route_planer %}
<form method="get" action="http://maps.google.ch/" class="googlemap-routeplaner">
	<p>{{ object.route_planer_title }}:</p>
	<fieldset>
		<label for="saddr">{% trans "Your address" %}:</label>
		<input id="saddr" name="saddr" class="textinput" value="" type="text" />
		<input name="daddr" value="{{ object.address }}, {{ object.zipcode }} {{ object.city }}" type="hidden" />
		<input value="{% trans "Calculate route" %}" class="input_submit" type="submit" />
	</fieldset>
</form>
{% endif %}
</div><commit_msg>Added default route-planning target to maps.google.com to fix 613<commit_after>{% load i18n %}
<div class="plugin_googlemap">
	<!--  ATTENTION: set a height for this div in CSS -->
	<div id="google-map-{{ object.id }}" class="googlemap-map"></div>

	<script type="text/javascript">
		//<![CDATA[
		(function(){
			var geocoder;
			var map;
			
			var title = "{{ object.get_title }}";
			var address = "{{ object.address }}, {{ object.zipcode }} {{ object.city }}";
			var zoom = {{ object.get_zoom_level }};
			
			function load()
			{
			  // Create new map object
			  map = new GMap2(document.getElementById("google-map-{{ object.id }}"));
			  map.addControl(new GSmallZoomControl());
			  map.addControl(new GMapTypeControl());
			 
			  {% if object.get_lat_lng %}
			  var latLng=new GLatLng({{ object.get_lat_lng|join:", " }});
			  addToMap(latLng);
			  {% else %}
			  // Create new geocoding object
			  geocoder = new GClientGeocoder();
			  // Retrieve location information, pass it to addToMap()
			  geocoder.getLocations(address, onResponse);
			  {% endif %}
			}
			
			// This function adds the point to the map
			
			function onResponse(response){
			  // Retrieve the object
			  place = response.Placemark[0];
			
			  // Retrieve the latitude and longitude
			  latLng = new GLatLng(place.Point.coordinates[1],
			                       place.Point.coordinates[0]);
			  addToMap(latLng);	
			}
			
			function addToMap(latLng)
			{
			  // Retrieve the latitude and longitude
			  center = new GLatLng(latLng.lat() + 0.01, latLng.lng());
			
			  // Center the map on this point
			  map.setCenter(center, zoom);
			
			  // Create a marker
			  marker = new GMarker(latLng);
			
			  // Add the marker to map
			  map.addOverlay(marker);
			
			  // Add address information to marker
			  marker.openInfoWindowHtml("<strong>" + title + "</strong><br />" + address {% ifnotequal map.get_content "" %} + "<br/><br/><i>{{ object.get_content }}</i>"{% endifnotequal %});
			}
			
			load();
		})();
		//]]>
	</script>
{% if object.route_planer %}
<form method="get" action="http://maps.google.com/" class="googlemap-routeplaner">
	<p>{{ object.route_planer_title }}:</p>
	<fieldset>
		<label for="saddr">{% trans "Your address" %}:</label>
		<input id="saddr" name="saddr" class="textinput" value="" type="text" />
		<input name="daddr" value="{{ object.address }}, {{ object.zipcode }} {{ object.city }}" type="hidden" />
		<input value="{% trans "Calculate route" %}" class="input_submit" type="submit" />
	</fieldset>
</form>
{% endif %}
</div>
{'fraction_non_alphanumeric': 0.17233248182354097, 'fraction_numerical': 0.0041265474552957355, 'mean_word_length': 2.9641744548286604, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '5214658', 'n_tokens_mistral': 2044, 'n_tokens_neox': 1652, 'n_words': 387}