WebWorks 앱에서 Google지도를 표시하려고합니다. 다음은 응용 프로그램에서 해당 페이지의 전체 HTML은 (는 브라우저에서 잘 작동 있습니다) :BlackBerry WebWorks 프로그램에 Google지도 표시
응용 프로그램 내에서<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" id="viewport" content="height=device-height,width=device-width,user-scalable=no" />
<title>Waste Management Service Request</title>
<style type="text/css">
body {
min-height: 500px;
}
.center {
text-align: center;
}
#page {
font-family: Arial, sans-serif;
font-size: 85%;
width: 408px;
margin: 0 auto;
padding: 0 30px;
}
h3 {
color: #006A3C;
}
#map-canvas {
height: 300px;
}
</style>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
if (typeof(blackberry) != "undefined") {
blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK, function() {
history.back();
});
}
$(document).ready(function(){
var geocoder, map;
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(-34.397, 150.644);
var mapOptions = {
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
address = '100 1st St., New York City, NY'; // Hardcoded for testing.
geocoder.geocode({'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
alert("The map failed because: " + status);
}
});
})
</script>
</head>
<body>
<div id="page">
<h3>Local Map</h3>
<div id="map-canvas"></div>
</div>
</body>
</html>
, 그냥 응용 프로그램이 나타납니다 회색 상자를 보여줍니다.
코드는 대부분 here에 링크 된 this example page의 출처에서 추출됩니다.
아이디어가 있으십니까? Google이 동적 이미지 (예 : this technique)를 렌더링 한 정적 이미지를 게재하도록하거나 여기에 실재물을 놓치고있는 것이 있습니까?
그런데 gmaps의 JS 호출 스택을 크롤링하고 각 도메인을 앱의 권한 목록에 추가하려고했습니다. gmaptiles.co.kr, google.com, googleapis.com 및 gstatic.com에 대한 허가 항목 (http 및 https)이 있습니다.
방금 찾은 또 다른 문제점 WebWorks 시스템은 아약스 요청을 탐지하는 CakePHP 시스템을 망가 트린 헤더에 아약스 기반 요청을 표시하지 않습니다.
etc 태그가없는 html을 반환합니다. 이 물건을 디버깅하는 것은 재미 있지 않습니다! – Russell