Leaflet和jQuery mobile不会合作

时间:2013-05-14 14:00:24

标签: javascript jquery html mobile leaflet

大家。我正在开发一个用于自然保护区的移动应用程序(旧地图目前使用flash构建),我在使用jQuery mobile和传单时遇到了麻烦。就目前而言,我只能获得传单地图或jQuery导航栏。以下是html部分:

<!DOCTYPE html>
<html>
<head>
<title>UW Arboretum</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,   user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="images/logo.png"/>


<!-- <meta name="MobileOptimized" content="320" />  -->

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
    <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js">    </script>

    <link rel="stylesheet" href="css/leaflet.css" />
    <link rel="stylesheet" href="css/style.css" />

    <script src="js/leaflet-src.js"></script>
    <script src="js/jquery.js"></script>
    <script src="lib/jquery-ui/js/jquery-ui-1.10.1.custom.min.js"></script>

    <script src="js/main.js"></script>
</head>

<body>

<div id="map">
</div><!--map-->

<div data-role="footer" 
data-position="fixed">
<div data-role="navbar">
    <ul>
        <li><a href="#abcdefg" class="ui-state-persist" data-icon="arrow-r">abc</a></li>
        <li><a href="#abcdefg" class="ui-state-persist" data-icon="arrow-r">def</a></li>
        <li><a href="#abcdefg" class="ui-state-persist" data-icon="arrow-r">ghi</a></li>
        <li><a href="#abcdefg" class="ui-state-persist" data-icon="arrow-r">jkl</a></li>
    </ul>
</div><!--footer-->




</body>

</html>


</body>

</html>

1 个答案:

答案 0 :(得分:0)

你有双jQuery加载:

<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="js/jquery.js"></script>

还尝试使用最新版本的jQuery和jQuery Mobile