Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Warning, Now Loading

As you create map projects of increasing complexity, users will begin to experience a noticeable lag while the browser gets everything set up. One courtesy that can be added is a message to alert your users when the map is processing or initializing.

You're going to use almost the exact same trick as was used for the hovering toolbar, except this time, you're hovering a temporary message rather than a persistent user control. Modify the body of your markup file to add some structure for a loading message as shown in Listing 6-16.

Listing 6-16. Markup to Add a Loading Message to the Map

<body class="sidebar-right loading">
     <div id="toolbar">
          ...
     </div>
     <div id="content">

          <div id="map-wrapper">
               <div id="map"></div>
          </div>
          <div id="sidebar">
             ...
          </div>
          <div id="alert">
               <p>Loading data ...</p>
          </div>
     </div>
</body>

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial