I am creating a map using points from a server and setting them as markers, I then use the points to form a boundary, using Google Map API v3. The map displays properly in a desktop browser, but not in an emulator; it will not show the markers or boundary and will display some error like Object is Not a function
, so I'm confused what the problem is.
In my code I put some alerts
, try-catch statements
and some error when the code tries to put boundary
Here's the code:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-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" />
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script src="lib/work-space.js"></script>
<script src="lib/hsmobile.min.js"></script>
<style>
#map-canvas
{
margin: 0;
padding: 0;
height: 100%;
}
</style>
</head>
<body>
<div data-role="page" id="ClubMapPage">
<script>
$('#ClubMapPage').on('pageshow',function(){
Mappy.getMappy();
})
</script>
<div class="content-wrap map-wrap">
<div id="map-canvas" style="height:500px; width:100%; margin:0; padding:0">
</div>
</div>
</div>
</body>
</html>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.