请找我用我的黑莓应用程序(OS 6和7版)中显示谷歌地图上的位置标记下方。
private String getHTMLText() {
String HTMLText = null;
HTMLText = "<script type=\"text/javascript\" src=\"http://maps.google.com/maps/api/js?sensor=false&libraries=drawing\"></script>" +
"<body onload=\"initialize();\" topmargin=\"0\" leftmargin=\"0\">" +
"<div id=\"map_canvas\" style=\"width:" + Display.getWidth() + "px; height:" + Display.getHeight() + "px;\">" +
"</body>" +
"<script type=\"text/javascript\">" +
"var Coordinates= [];" +
"var locations = [" + getLocatinText() +
"];" +
"var map = new google.maps.Map(document.getElementById('map_canvas'), {" +
"zoom: " + iZoom + "," +
"center: new google.maps.LatLng" + getCenterLocationText() + "," +
"mapTypeId: google.maps.MapTypeId.ROADMAP" +
"});" +
"var marker, i;" +
"marker = new google.maps.Marker({position: new google.maps.LatLng" + getCenterLocationText() +
", map: map,icon: 'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|ff0084|ffffff'});" +
"for (i = 0; i < 1; i++) {" +
"marker = new google.maps.Marker({" +
"position: new google.maps.LatLng(locations[i][0], locations[i][1])," +
"map: map" +
"});" +
"Coordinates.push( new google.maps.LatLng(locations[i][0], locations[i][1]) );" +
"}" +
/*"var flightPath = new google.maps.Polyline({" +
"path: Coordinates," +
"strokeColor: \"#FF0000\"," +
"strokeOpacity: 0.7," +
"strokeWeight: 1" +
"});" +*/
"</script>";
return HTMLText;
}
在每一个形象,但在正确的地图加载,它显示的文字在上面说:“对不起,我们没有此处的图像”。
然而,在任何浏览器中使用相同的代码正确显示。
我会很感激的任何反馈。