Google Maps with WebGL

 

Google has just introduced a test mode on Google Maps that enables WebGL to help draw the maps, and the results have moved it a step closer to Google Earth. If you’re using a WebGL-enabled browser, such as a recent version of Google Chrome or the new Firefox beta, you’ll see a note in the lower left corner of Google Maps inviting you to try it out.

 

webgl.jpg 

The result is a much smoother experience; lots of animations to ease the transitions when zooming in, rotating 45 degree imagery, or switching into Street View. It also enables the transparent 3D buildings like you’ll see in the Android version of Google Maps.

All in all, it feels very similar to the Android version of Maps, with a few exceptions:

1 — You can’t angle your view or rotate the map, with the exception of the 45 degree imagery. On Android, you can angle and rotate freely on the street maps.

2 — The new transparent 3D buildings in Google Maps now cast shadows, which is a nice effect not seen in the Android version. Even better, as +Nick Altmann pointed out, the shadows are time-of-day (and likely day-of-year) accurate! Very cool. Here’s a screenshot of Los Angeles, taken around 3:45pm local time:

shadows.jpg 

It’s certainly no where near the depth of Google Earth (or the Google Earth Plug-in, also available inside of Google Maps), but it’s another step in that direction. It’s possible that the products could one day merge, but it seems that we’re still quite a distance from that.

Nothing but the web

We believe in the vision of “nothing but the web” — where business applications are delivered over the Internet and accessed in a web browser. Why? We believe the web brings substantial benefits for companies that no other IT model can — in simplicity, cost, security, flexibility and pace of innovation.

Of course, we recognize that some companies have substantial investments in legacy technology — desktop applications or client/server applications which they’re using every day. We’d like to understand what it will take to move these apps to the web.

Are you a business app developer?

Do you build or maintain business applications– either internally for your company or for sale to other companies? We’d love to hear more about your apps, tools and what types of challenges you have. Please fill out this short survey and let us know whether you’d be interested in a potential HTML5 training class.

Are you a business user or IT administrator?

We’d love to hear what apps you’re still using in your business which haven’t yet moved to the web and why. Please fill out this short survey.

Chrome Developer: Understanding Stack Traces

One of the biggest challenges in JavaScript development is dealing with script errors. We’ve been working hard to improve and extend the set of tools that lets you better understand how your JavaScript code works. Let’s have a quick look at five features of Google Chrome Developer Tools that can help you work with exceptions and stack traces more efficiently:

  • Exception call stack. When something goes wrong, you can open the developer tools console. There you’ll find a number of uncaught JavaScript exception messages there. Each message has a link to the file name with the line number you can navigate to. However, there might be several execution paths that lead to the error and it’s not always obvious which one of them has happened. Exceptions in the console are now accompanied with the complete JavaScript call stacks after the developer tools window has been opened.
  • Pause on exception. The developer tools’ Scripts panel enables you to pause JavaScript execution each time an exception is thrown and inspect its call stack, scope variables and state of your app. You can choose whether to pause only on uncaught exceptions or on all exceptions.
  • Logging stack traces. Printing log messages to the developer tools console is also very helpful in understanding how your application behaves. Now you can make the log entries even more informative by including associated stack traces. You can instrument your code with console.trace() calls that would print current JavaScript call stack. Moreover, you can check that some invariants are true using console.assert() which prints a full stack trace when its conditional expression passed as first parameter evaluate to false.
  • Error.stack. Each Error object has a property named “stack” that contains the stack trace.
  • Handler function for window.onerror. Recently we’ve added support for setting a handler function to window.onerror. Whenever a JavaScript exception is thrown in the window context and is not caught by any try/catch block, the function will be invoked with the exception’s message, the URL of the file where the exception was thrown and the line number in that file passed as three arguments in that order. You may find it convenient to set an error handler that would collect information about uncaught exceptions and report it back to your server.

For a more complete reference on working with the Google Chrome Developer Tools, check out our home page. We further described improvements to exception handling and stack traces in our recent WebKit blog post.