Maps 出现在地图下面的那个盒子不会消失

Maps 出现在地图下面的那个盒子不会消失,maps,Maps,在我的地图下面有一个盒子,我可以把它拿走。我有一个主地图用于索引,另一个地图用于显示。我有两个不同的地图选项。当我查看页面源代码时,我会看到这两个映射的脚本。我不明白为什么会这样 <script type="text/javascript" charset="utf-8"> Gmaps.map = new Gmaps4RailsGoogle(); Gmaps.load_map = function() { Gmaps.map.map_options.auto_adjust = tru

在我的地图下面有一个盒子,我可以把它拿走。我有一个主地图用于索引,另一个地图用于显示。我有两个不同的地图选项。当我查看页面源代码时,我会看到这两个映射的脚本。我不明白为什么会这样

<script type="text/javascript" charset="utf-8">
Gmaps.map = new Gmaps4RailsGoogle();
Gmaps.load_map = function() {
Gmaps.map.map_options.auto_adjust = true;
Gmaps.map.initialize();
Gmaps.map.markers = [{"description":"test, 217 cleveland ave , liverpool, This is some additional information.","lat":43.1155,"lng":-76.2292},{"description":"bah, 215 university place, syracuse, ","lat":43.0396,"lng":-76.1355}];
Gmaps.map.markers_conf.do_clustering = true;
Gmaps.map.create_markers();
Gmaps.map.adjustMapToBounds();
Gmaps.map.callback();
};
window.onload = function() { Gmaps.loadMaps(); };
</script>


    <script type="text/javascript" src="//maps.google.com/maps/api/js?v=3.8&sensor=false&libraries=geometry&language=&hl=&region="></script>


`<script type="text/javascript" charset="utf-8">
Gmaps.map = new Gmaps4RailsGoogle();
Gmaps.load_map = function() {
Gmaps.map.map_options.auto_adjust = true;
Gmaps.map.map_options.auto_zoom = false;
Gmaps.map.map_options.zoom = 10;
Gmaps.map.map_options.detect_location = true;
Gmaps.map.map_options.center_on_user = false;
Gmaps.map.initialize();
Gmaps.map.markers = [{"description":"test, 217 cleveland ave , liverpool, This is some additional information.","lat":43.1155,"lng":-76.2292},{"description":"bah, 215 university place, syracuse, ","lat":43.0396,"lng":-76.1355}];
Gmaps.map.create_markers();
Gmaps.map.adjustMapToBounds();
Gmaps.map.callback();
};
window.onload = function() { Gmaps.loadMaps(); };
</script>`

我通过使.map_容器比贴图高度小两倍来修复它。我的地图高度是400px,我的地图容器高度是200px。我仍然不知道为什么会发生这种情况。

这次我正确地解决了我的问题,在地图选项中为每个地图分配了不同的CSS类。示例-:container_class=>map1