StringBuffer html;
String initial = "\r\n" +
" \r\n" +
" \r\n" +
" \r\n" +
"
" \r\n" +
"
\r\n" + "\r\n" +
"
\r\n" +
"\r\n" +
" \r\n" +
"
\r\n" + "
";
html=new StringBuffer();
html.append(initial);
//add your location here
String point = "['"+""+"',"+lattitude+","+longitude+","+""+"],";
html.append(point);
//add your location here
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(), "");
HorizontalFieldManager horf=new HorizontalFieldManager(HORIZONTAL_SCROLL);
horf.add(myBrowserField);
add(horf);
No comments:
Post a Comment