Я ищу какую-то помощь с Google Map - я чувствую, что пробовал большинство исправлений, найденных через Google. Один, в частности, предложил родителям div (class="findus__gm--small")
необходимую высоту и ширину - не работал.Проблема с Google Map при загрузке
Я снял код с предыдущего проекта, где он работал успешно. Я не вижу различий.
Любые предложения?
<div class="main-content__info"> <!-- small google map and open hours-->
<div class="findus__small">
<div class="findus_small_gm_text"> <!-- small google map text-->
<h4 class="title__marginbtm"><span class="title--underline">Where to find us</span></h4>
<p class="lh--200">Based in Yeadon, you can find us just off of "Kirk Lane", on the corner of "Whack House Lane". Bus stops are just a 5 minute walk away, with services running regulerally. Please note, street parking is limited. </p>
</div>
<div class="findus__gm--small"> <!-- small google map-->
<div id="googleMap"></div>
</div>
</div>
<div class="openhours"> <!--open hours table -->
</div>
</div>
.findus__gm--small {
height: 10em;
margin-top: 2em;
width: 100%;
}
#googleMap {
height: 10em;
width: 100%;
}
var location= new google.maps.LatLng(53.8659011,-1.6932696);
function initialize() {
var mapProp = {
center:location,
zoom:17,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
var marker=new google.maps.Marker({
map:map,
position:location,
animation:google.maps.Animation.BOUNCE
});
marker.setMap(map);
var infowindow = new google.maps.InfoWindow({
content:"66 Whack House Lane, Yeadon, Leeds, LS19 7LY"
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
}
google.maps.event.addDomListener(window, 'load', initialize);
});
$(window).load(function() {
$('#slider').nivoSlider();
effect:'random'
});
Если вы пытаетесь внедрить фактические карты Google, вам необходимо интегрировать их с помощью iframe, предоставленного в Google Developers – HTMLNoob