1

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);
}
Kara
  • 6,115
  • 16
  • 50
  • 57
PhDeOliveira
  • 2,323
  • 4
  • 22
  • 25
  • Had the same issue caused by a line in my CSS. My solution: http://stackoverflow.com/a/36405299/3279228 – Expertees Apr 04 '16 at 14:33

1 Answers1

2

the mapOptions expect a center-property(not position)

Dr.Molle
  • 116,463
  • 16
  • 195
  • 201
  • That definitely got rid of the grey boxes! Now what I see is a messed up infowindow. The size of it is not correct and the styling added is off. http://picpaste.com/Screen_Shot_2013-09-27_at_9.50.58_AM-dJ9leslR.png – PhDeOliveira Sep 27 '13 at 13:53
  • moved somethings around and now am getting this.. http://picpaste.com/Screen_Shot_2013-09-27_at_11.51.25_AM-Z7D1RLcw.png - still have lining up issues and the white box in the background – PhDeOliveira Oct 02 '13 at 14:31