Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps 黑莓-谷歌地图(抱歉,我们这里没有图像)_Google Maps_Blackberry_Java Me - Fatal编程技术网

Google maps 黑莓-谷歌地图(抱歉,我们这里没有图像)

Google maps 黑莓-谷歌地图(抱歉,我们这里没有图像),google-maps,blackberry,java-me,Google Maps,Blackberry,Java Me,请在下面找到我在BlackBerry应用程序(OS版本6和7)中用于在google地图上显示位置的标记 private String getHTMLText() { String HTMLText = null; HTMLText = "<script type=\"text/javascript\" src=\"http://maps.google.com/maps/api/js?sensor=false&libraries=drawing\"></s

请在下面找到我在BlackBerry应用程序(OS版本6和7)中用于在google地图上显示位置的标记

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;

}
私有字符串getHTMLText(){
字符串HTMLText=null;
HTMLText=”“+
"" + 
"" + 
"" + 
"" + 
“变量坐标=[];”+
“变量位置=[”+getLocatinText()+
"];" + 
“var map=new google.maps.map(document.getElementById('map_canvas'),{”+
缩放:“+iZoom+”+
“中心:新建google.maps.LatLng”+getCenterLocationText()+,“+
“mapTypeId:google.maps.mapTypeId.ROADMAP”+
"});" + 
变量标记,i;“+
“marker=new google.maps.marker({位置:new google.maps.LatLng”+getCenterLocationText()+
,地图:地图,图标:'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|ff0084 | ffffff'});“+
对于(i=0;i<1;i++){
marker=新的google.maps.marker({“+
“位置:新的google.maps.LatLng(位置[i][0],位置[i][1]),”+
“地图:地图”+
"});" + 
“Coordinates.push(新的google.maps.LatLng(locations[i][0],locations[i][1]);”+
"}" + 
/*“var flightPath=new google.maps.Polyline({”+
“路径:坐标,”+
“strokeColor:\”\FF0000\”,“+
“笔划不透明度:0.7,”+
“冲程重量:1”+
"});" +*/
"";
返回HTMLText;
}
在每张图像上,虽然地图加载正确,但它在顶部显示文本,并说“对不起,我们这里没有图像”

但是,在任何浏览器中使用的相同代码都会正确显示

如果有任何反馈,我将不胜感激

试试这个-

StringBuffer html;
                String initial = "<!DOCTYPE html>\r\n" +
                "<html> \r\n" +
                "<head> \r\n" +
                "  <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" /> \r\n" +
                "  <title>Google Maps Multiple Markers</title> \r\n" +
                "  <script src=\"http://maps.google.com/maps/api/js?sensor=true\" \r\n" +
                "          type=\"text/javascript\"></script>\r\n" +
                "</head> \r\n" +
                "<body>\r\n" +
                "  <div id=\"map\" style=\"width: 620px; height: 358px;\"></div>\r\n" +
                "\r\n" +
                "  <script type=\"text/javascript\">\r\n" +
                "    var locations = [";
        String second= " ];\r\n" +
                "\r\n" +
                "    var map = new google.maps.Map(document.getElementById('map'), {\r\n" +
                "      zoom: 8,";
        String centerPoint ="";
        String finalpart = " mapTypeId: google.maps.MapTypeId.ROADMAP\r\n" +
                "    });\r\n" +
                "\r\n" +
                "    var infowindow = new google.maps.InfoWindow();\r\n" +
                "\r\n" +
                "    var marker, i;\r\n" +
                "\r\n" +
                "    for (i = 0; i < locations.length; i++) {  \r\n" +
                "      marker = new google.maps.Marker({\r\n" +
                "        position: new google.maps.LatLng(locations[i][1], locations[i][2]),\r\n" +
                "        map: map\r\n" +
                "      });\r\n" +
                "\r\n" +
                "      google.maps.event.addListener(marker, 'click', (function(marker, i) {\r\n" +
                "        return function() {\r\n" +
                "          infowindow.setContent(locations[i][0]);\r\n" +
                "         \r\n" +
                "        }\r\n" +
                "      })(marker, i));\r\n" +
                "    }\r\n" +
                "  </script>\r\n" +
                "</body>\r\n" +
                "</html>";

            html=new StringBuffer();
            html.append(initial);
            String point = "['"+""+"',"+lattitude+","+longitude+","+""+"],";
            html.append(point);
            centerPoint = "  center: new google.maps.LatLng("+lattitude+","+longitude+"),";

               html.append(second);
               html.append(centerPoint);
               html.append(finalpart);
               //System.out.println("Plot is"+html.toString());
               BrowserFieldConfig _bfConfig = new BrowserFieldConfig();        
              _bfConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
              _bfConfig.setProperty( BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE );
              _bfConfig.setProperty(BrowserFieldConfig.USER_AGENT, "MyApplication 1.0");
              BrowserField myBrowserField = new BrowserField(_bfConfig);
              myBrowserField.displayContent(html.toString(), "");
              add(myBrowserField);
stringbufferhtml;
字符串initial=“\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“Google映射多个标记\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“var位置=[”;
字符串second=“];\r\n”+
“\r\n”+
var map=new google.maps.map(document.getElementById('map'),{\r\n+
“缩放:8,”;
字符串中心点=”;
String finalpart=“mapTypeId:google.maps.mapTypeId.ROADMAP\r\n”+
“});\r\n”+
“\r\n”+
“var infowindow=new google.maps.infowindow();\r\n”+
“\r\n”+
变量标记,i;\r\n+
“\r\n”+
“对于(i=0;i
试试这个-

StringBuffer html;
                String initial = "<!DOCTYPE html>\r\n" +
                "<html> \r\n" +
                "<head> \r\n" +
                "  <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" /> \r\n" +
                "  <title>Google Maps Multiple Markers</title> \r\n" +
                "  <script src=\"http://maps.google.com/maps/api/js?sensor=true\" \r\n" +
                "          type=\"text/javascript\"></script>\r\n" +
                "</head> \r\n" +
                "<body>\r\n" +
                "  <div id=\"map\" style=\"width: 620px; height: 358px;\"></div>\r\n" +
                "\r\n" +
                "  <script type=\"text/javascript\">\r\n" +
                "    var locations = [";
        String second= " ];\r\n" +
                "\r\n" +
                "    var map = new google.maps.Map(document.getElementById('map'), {\r\n" +
                "      zoom: 8,";
        String centerPoint ="";
        String finalpart = " mapTypeId: google.maps.MapTypeId.ROADMAP\r\n" +
                "    });\r\n" +
                "\r\n" +
                "    var infowindow = new google.maps.InfoWindow();\r\n" +
                "\r\n" +
                "    var marker, i;\r\n" +
                "\r\n" +
                "    for (i = 0; i < locations.length; i++) {  \r\n" +
                "      marker = new google.maps.Marker({\r\n" +
                "        position: new google.maps.LatLng(locations[i][1], locations[i][2]),\r\n" +
                "        map: map\r\n" +
                "      });\r\n" +
                "\r\n" +
                "      google.maps.event.addListener(marker, 'click', (function(marker, i) {\r\n" +
                "        return function() {\r\n" +
                "          infowindow.setContent(locations[i][0]);\r\n" +
                "         \r\n" +
                "        }\r\n" +
                "      })(marker, i));\r\n" +
                "    }\r\n" +
                "  </script>\r\n" +
                "</body>\r\n" +
                "</html>";

            html=new StringBuffer();
            html.append(initial);
            String point = "['"+""+"',"+lattitude+","+longitude+","+""+"],";
            html.append(point);
            centerPoint = "  center: new google.maps.LatLng("+lattitude+","+longitude+"),";

               html.append(second);
               html.append(centerPoint);
               html.append(finalpart);
               //System.out.println("Plot is"+html.toString());
               BrowserFieldConfig _bfConfig = new BrowserFieldConfig();        
              _bfConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
              _bfConfig.setProperty( BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE );
              _bfConfig.setProperty(BrowserFieldConfig.USER_AGENT, "MyApplication 1.0");
              BrowserField myBrowserField = new BrowserField(_bfConfig);
              myBrowserField.displayContent(html.toString(), "");
              add(myBrowserField);
stringbufferhtml;
字符串initial=“\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“Google映射多个标记\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“\r\n”+
“var位置=[”;
字符串second=“];\r\n”+
“\r\n”+
var map=new google.maps.map(document.getElementById('map'),{\r\n+
“缩放:8,”;
字符串中心点=”;
String finalpart=“mapTypeId:google.maps.mapTypeId.ROADMAP\r\n”+
“});\r\n”+
“\r\n”+
“var infowindow=new google.maps.infowindow();\r\n”+
“\r\n”+
变量标记,i;\r\n+
“\r\n”+
“对于(i=0;i