SWT.Browser 위젯에 약간의 문제가있어 매우 놀랍습니다. ( Strange Google StreetView Internet Explorer 경고
:이 페이지를 만들었다. (실제로 내가 juste 구글의 조각에서 붙여 아무것도하지 않았다) 나는 다음과 같은 메시지를 얻을 수 있도록
나는 브라우저에서 구글 스트리트 뷰 API를 테스트하기 위해 시도 나는 그것을 포함하지 않을 때 수수께끼, 그렇지?)내 코드는 매우 간단합니다 (여기있다)
public static void main(String[] args) {
Display display = Display.getDefault();
Shell shell = new Shell(display);
shell.setText("Tentative API Google avec un SWT.Browser");
shell.setLayout(new GridLayout());
final Browser browser = new Browser(shell,SWT.BORDER);
browser.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
browser.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"+
"<html xmlns=\"http://www.w3.org/1999/xhtml\" mlns:v=\"urn:schemas-microsoft-com:vml\">"+
"<head>"+
"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>"+
"<script src=\"http://maps.google.com/maps?file=api&v=2.x&key=AnyKey\" type=\"text/javascript\"></script>" +
"<title>"+
"Google Maps JavaScript API Example: Simple Streetview Example"+
"</title>" +
"<script type=\"text/javascript\">var myPano;function initialize(){var fenwayPark = new GLatLng(42.345573,-71.098326);panoramaOptions = { latlng:fenwayPark };myPano = new GStreetviewPanorama(document.getElementById(\"pano\"), panoramaOptions);GEvent.addListener(myPano, \"error\", handleNoFlash);}function handleNoFlash(errorCode){if(errorCode == FLASH_UNAVAILABLE){alert(\"Error: Flash doesn't appear to be supported by your browser\");return;}}</script>" +
"</head>" +
"<body onload=\"initialize()\" onunload=\"GUnload()\">" +
"<div name=\"pano\" id=\"pano\" style=\"width: 500px; height: 300px\">" +
"</div>" +
"</body>" +
"</html>");
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
이 문제가 올 수도 (이상 또는 API에서) 이하, 나는 더를 얻을 수 없기 때문에 오류. 어쨌든이 바로 페이지는 표준 브라우저에서 완벽하게 작동합니다. 내 두 번째 스크립트 태그가 닫히지 않으면 아무런 오류가 발생하지 않는다는 것 또한 놀랍습니다. (그럼 아무 일도 일어나지 않습니다. 우리가이 방법을 사용하면 절대적으로 코드가 없어서 오류가 없습니다 ...)
여기내가 서 ... 무엇을 할 대해 조금 혼란 ... (어떤 도움을 ... 매우 환영)
질문에 포함 된 이미지에 액세스 할 수 없습니다. – Liam
나는 그걸 또한 거기에 넣어 http://lh3.ggpht.com/_7A4wUIosFEs/SkiRyEAq8EI/AAAAAAAAACI/q2A3dLtNKxA/ScreenShot006.png – Ar3s