Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088369

[WebView] Slowness with google maps / here maps

XMLWordPrintable

    • web

      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&&#39; +
                              '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>
       

            mbilla Murali Billa
            oflorianjfx Oliver Florian (Inactive)
            Votes:
            7 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: