OpenLayers 2 is outdated. Go to the latest 3.x version:

LoadingPanel Control


The LoadingPanel control provides a waiting image to the user when the application is busy loading tiles. The waiting image can be set using css. It depends on the loadstart and loadend events which are present in OpenLayers.Layer.Grid and its descendants.


Addin Version OpenLayers Version
trunk trunk > r6329


Installation and Use

  1. Use subversion to check out the LoadingPanel addin.
  2. Place the LoadingPanel.js file in your Control directory (or alternatively, place it elsewhere and add a <script> tag to your page that points to it).
  3. Use the build tools to create a single file build (or link to your OpenLayers.js file to run in development mode).
  4. Add a stylesheet to your page to style the LoadingPanel (see examples).
  5. Construct a map and add a LoadingPanel to it with the following syntax:
    var map = new OpenLayers.Map("map");
    var loadingpanel = new OpenLayers.Control.LoadingPanel();

Css example

The following css example shows how to set the css for the loading image

        .olControlLoadingPanel {
            position: relative;
            width: 195px;
            height: 11px;
            display: none;

Rumah dijual | Baby pink | aksesoris mobil

Last modified 8 months ago Last modified on May 19, 2016 1:48:09 AM