4
我玩弄骨干和gmaps.js出于某种原因,该地图是不正确的渲染......谷歌地图不正确渲染
的控制器没有显示正确的,信息窗口奇怪的渲染过。我正在使用gmaps.js library。我甚至不知道如何调试这件事......
这里是我的地图骨干观点:
App.MapView = Backbone.View.extend({
el: '.map',
initialize: function() {
this.map = new GMaps({
div: this.el,
lat: -12.043333,
lng: -77.028333,
});
App.houseCollection.bind('reset', this.populateMarkers, this);
},
populateMarkers: function(collection) {
_.each(collection.models, function(house) {
var html = 'hello'
this.map.addMarker({
lat: house.attributes.lat,
lng: house.attributes.lng,
infoWindow: {
content: html,
}
});
}, this);
},
});
感谢
那么修好了!非常感谢。这可能与bootstrap.css有关,可能会改变一些东西... – AlexBrand
不客气!令我惊讶的是,Google地图如何只是一堆巧妙排列的图像。 –
救了我一大堆的海尔,谢谢:-) –