Ich bin neu in der Entwicklung von mobilen Anwendungen und ich integriere Google Maps in meine App von jQuery mobile. Wenn ich Seiten durch Verweis auf eine HTML-Seite ändere, wird die Karte nicht angezeigt. Tatsächlich kommt es nicht in die Funktion dieser Datei.Google Maps kommt nicht, wenn ich die Seite von der Hauptseite per Link durchlaufe
map.html:
<!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 }
#map_canvas { height: 100%;}
</style>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBUuNWrZ1zjJ7yKV3DJL2ylrhj9BAcYo8A&sensor=true&language=ka">
</script>
<script type="text/javascript">
function initialize() {
alert("map");
var myOptions = {
center: new google.maps.LatLng(17.38504, 78.48667),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>
index.html:
<!DOCTYPE html>
<head>
<title>Untitled Document</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" type="text/css" 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>
</head>
<body >
<div data-role="page" data-theme="b" data-fullscreen="true">
<div data-role="header" >
<h1>Home</h1>
</div>
<div data-role="content" data-theme="a">
<div class="ui-grid-b">
<a href="src/contact.html" ><img src="iphone-contacts-icon.jpg" width="72" height="72" hspace="10" vspace="20"/></a>
<a href="src/map.html"><img src="Maps-icon.png" width="72" height="72" hspace="10" vspace="20"/></a>
<a><img src="ExamIcon.jpg" width="72" height="72" hspace="10" vspace="20"/></a>
</div><!-- /grid-b -->
</div><!-- Content-->
<div data-role="footer" >
<h1>footer</h1>
</div> <!-- footer-->
</div> <!-- page-->
</body>
</html>
Bitte helfen.
Dank JollySin‘ – Nishant