Reputation: 2333
So I'm working with the google maps api v3.13 and I'm getting a grey map. There aren't any controls on it either. My custom markers aren't showing. I get nothing. I'm not getting any errors so I'm not quite sure whats going on.
<div id="map-canvas"></div>
#map-canvas {
width: 530px;
height: 298px;
}
.mapbox {
width: 240px;
height: 120px;
padding: 15px;
font-family: @sansFontFamily;
color: @white;
background-color: @lcOrange;
a {
display: block;
color: @white;
}
}
var gmap;
function initialize() {
var myLat = new google.maps.LatLng(33.991447,-84.09403);
var mapOptions = {
zoom: 13,
position: myLat,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var gmap = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
var mapIcon = '../fw/img/map-marker-lowres.png';
var contentString = '<div class="mapbox">' + '<p><strong>The Arena at Gwinnett Center</strong></p>' + '<p>6400 Sugarloaf Pkwy<br>Duluth, GA 30097<br>(770) 813-7500</p>' + '<p>6400 Sugarloaf Pkwy<br>Duluth, GA 30097<br>(770) 813-7500</p>' + '<a href="">> get driving directions</a></div>';
var infowindow = new google.maps.InfoWindow({
content: contentString
});
var marker = new google.maps.Marker({
position: myLat,
icon: mapIcon,
map: gmap
});
infowindow.open(gmap,marker);
marker.setMap(gmap);
}
Upvotes: 1
Views: 5820