gpt4 book ai didi

javascript - map 花边 map 不显示

转载 作者:行者123 更新时间:2023-11-30 17:28:09 24 4
gpt4 key购买 nike

抱歉,这可能看起来像一个愚蠢的问题,但现在已经让我沮丧了第二天;///

无论如何,我都能让 map 显示出来。

创建了新的测试项目,这是Application.html.erb

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#gmap { height: 100% }
</style>

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7">
</script>
<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "maplace.min" %>
<script type="text/javascript">
$(function() {
new Maplace({
locations: [-34.397, 150.644],
controls_on_map: false
}).Load();
});
</script>
<title>Maptest</title>
</head>
<body>
<div id="gmap"></div>
</body>
</html>

and it seems that all of the javascripts are loaded without any erros

似乎所有 javascript 都已加载,没有任何问题。请帮忙

最佳答案

我认为这应该可行,尝试:

new Maplace({
locations: [{
lat: -34.397,
lon: 150.644
}],
controls_on_map: false
}).Load();

关于javascript - map 花边 map 不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23813859/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com