-
Bug
-
Resolution: Duplicate
-
P3
-
8u20, 9
-
MacOSX, linux, windows 7 / 8 (last version of java 8 )
The webview is very slow with google maps and here maps when the user zoom in / out.
If the user do whatever the webview slow all the application and can even stop all the javafx application for one or more seconds.
Here my post on oracle's forum : https://community.oracle.com/thread/3541866.
Here the file that I load in my WebView :
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
height: 100%;
width: 100%;
}
#mapcanvas { height: 100%; width: 100%}
</style>
<script type='text/javascript'>
function loadScript() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://maps.googleapis.com/maps/api/js?libraries=weather&sensor=false&' +
'callback=initialize';
document.body.appendChild(script);
}
var GGMaps = null;
function initialize() {
var myOptions = new Array();
this.map = null;
this.mapZoom = 6;
this.mapCenter = new google.maps.LatLng(48.856667, 2.350987);
this.mapTypeId = google.maps.MapTypeId.ROADMAP;
myOptions["zoom"] = this.mapZoom;
myOptions["center"] = this.mapCenter;
myOptions["mapTypeId"] = this.mapTypeId;
this.map = new google.maps.Map(document.getElementById("mapcanvas"), myOptions);
console.log('NEW INSTANCE');
}
window.onload = loadScript;
</script>
</head>
<body>
<div id="mapcanvas"></div>
</body>
</html>
If the user do whatever the webview slow all the application and can even stop all the javafx application for one or more seconds.
Here my post on oracle's forum : https://community.oracle.com/thread/3541866.
Here the file that I load in my WebView :
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
height: 100%;
width: 100%;
}
#mapcanvas { height: 100%; width: 100%}
</style>
<script type='text/javascript'>
function loadScript() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://maps.googleapis.com/maps/api/js?libraries=weather&sensor=false&' +
'callback=initialize';
document.body.appendChild(script);
}
var GGMaps = null;
function initialize() {
var myOptions = new Array();
this.map = null;
this.mapZoom = 6;
this.mapCenter = new google.maps.LatLng(48.856667, 2.350987);
this.mapTypeId = google.maps.MapTypeId.ROADMAP;
myOptions["zoom"] = this.mapZoom;
myOptions["center"] = this.mapCenter;
myOptions["mapTypeId"] = this.mapTypeId;
this.map = new google.maps.Map(document.getElementById("mapcanvas"), myOptions);
console.log('NEW INSTANCE');
}
window.onload = loadScript;
</script>
</head>
<body>
<div id="mapcanvas"></div>
</body>
</html>
- duplicates
-
JDK-8089049 [WebView] zooming google maps hangs
- Closed