Bugfixes, Daten umgezogen
This commit is contained in:
@@ -145,7 +145,7 @@ $.ajaxSetup({
|
||||
<div class="span12">
|
||||
<div class="row copyright">
|
||||
<div class="span12">
|
||||
© 2013 Blechreiz
|
||||
© 2013 Blechreiz, Martin Bauer
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -83,13 +83,28 @@
|
||||
controlText.style.paddingRight = '4px';
|
||||
controlText.innerHTML = 'Konzertort anzeigen';
|
||||
controlUI.appendChild(controlText);
|
||||
|
||||
var target = new google.maps.LatLng( {{ nextConcert.map_location }} );
|
||||
|
||||
google.maps.event.addDomListener(controlUI, 'click', function() {
|
||||
map.setMapTypeId( google.maps.MapTypeId.HYBRID );
|
||||
map.setZoom( 19 );
|
||||
map.setCenter( target );
|
||||
google.maps.event.addDomListener(controlUI, 'click', function()
|
||||
{
|
||||
{% if not nextConcert.map_location %}
|
||||
geocoder = new google.maps.Geocoder();
|
||||
geocoder.region = "de";
|
||||
geocoder.geocode( {"address": "{{ nextConcert.location }}" }, function(results, status) {
|
||||
if (status == google.maps.GeocoderStatus.OK) {
|
||||
map.setMapTypeId( google.maps.MapTypeId.HYBRID );
|
||||
map.setZoom( 15 );
|
||||
|
||||
map.setCenter( results[0].geometry.location );
|
||||
}
|
||||
});
|
||||
{% else %}
|
||||
var loc = new google.maps.LatLng( {{ nextConcert.map_location }} );
|
||||
map.setMapTypeId( google.maps.MapTypeId.HYBRID );
|
||||
map.setZoom( 20 );
|
||||
|
||||
map.setCenter( loc );
|
||||
|
||||
{% endif %}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -102,7 +117,8 @@
|
||||
mapTypeId: google.maps.MapTypeId.ROAD,
|
||||
zoomControl: false,
|
||||
panControl: false,
|
||||
streetViewControl: false
|
||||
streetViewControl: false,
|
||||
scrollwheel: false
|
||||
}
|
||||
var directionsService = new google.maps.DirectionsService();
|
||||
var directionsDisplay = new google.maps.DirectionsRenderer();
|
||||
@@ -137,11 +153,13 @@
|
||||
var showTargetControl = new ShowTargetControl(showTargetControlDiv, map);
|
||||
|
||||
showTargetControlDiv.index = 2;
|
||||
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(showTargetControlDiv);
|
||||
|
||||
map.controls[ google.maps.ControlPosition.TOP_RIGHT ].push(showTargetControlDiv);
|
||||
|
||||
|
||||
|
||||
$("#map_box a").click( function() {
|
||||
$("#map_box").hide();
|
||||
$("#map_box").hide();
|
||||
map.setOptions( { scrollwheel: true } );
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user