Google maps 谷歌地图控件模糊/损坏

Google maps 谷歌地图控件模糊/损坏,google-maps,google-maps-api-3,google-maps-markers,Google Maps,Google Maps Api 3,Google Maps Markers,我在我的谷歌地图应用程序上看到了一些非常奇怪的行为。我正在使用主干: initialize: -> osmMapType = new google.maps.ImageMapType( getTileUrl: (coord, zoom) -> "http://tile.openstreetmap.org/#{zoom}/#{coord.x}/#{coord.y}.png" tileSize: new google.maps.Size

我在我的谷歌地图应用程序上看到了一些非常奇怪的行为。我正在使用主干:

  initialize: ->
    osmMapType = new google.maps.ImageMapType(
      getTileUrl: (coord, zoom) ->
        "http://tile.openstreetmap.org/#{zoom}/#{coord.x}/#{coord.y}.png"
      tileSize: new google.maps.Size(256, 256)
      isPng: true
      alt: "OpenStreetMap layer"
      name: "OSM"
      maxZoom: 19
    )

    cloudMadeMapType = new google.maps.ImageMapType(
      getTileUrl: (coord, zoom) ->
        "http://b.tile.cloudmade.com/a97cc0871d97477b911c3f9155a93ee7/26250/256/#{zoom}/#{coord.x}/#{coord.y}.png"
      tileSize: new google.maps.Size(256, 256)
      isPng: true
      alt: "CloudMade layer"
      name: "CMade"
      maxZoom: 13
    )

    lat = 51.503
    lng = -0.113
    latlng = new google.maps.LatLng(lat, lng)
    options =
      zoom: 10
      center: latlng
      mapTypeId: 'OSM'
    @gMap = new google.maps.Map(document.getElementById("map"), options)
    @gMap.mapTypes.set('OSM', osmMapType)
    @gMap.mapTypes.set('CloudMade', cloudMadeMapType)
    @gMap.setMapTypeId(google.maps.MapTypeId.TERRAIN)
我正在加载API,如下所示:

<script src="https://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>

您的代码中没有错误。这是css的一个问题

只需将此CSS添加到地图容器中(假设它具有
id=gmap
):


啊哈!这似乎是推特引导!很棒的地方-现在到底为什么BootStrap会导致这种情况?找到解决方案-谢谢!我认为这是一个长时间盯着错误代码的案例!是的,谢谢-抱歉,我只是回答了更多的细节,因为这是一个特定的引导错误,并认为它可能会有帮助的人在未来!感谢您指出CSS错误!应该早点去看看!你帮我省去了很多头痛。非常感谢。这是唯一的解决办法。。好的。。我来晚了,但很好。
#map img {
    max-width: none;
}
#gmap img {
  max-width: none;
}