Maps API for Flash

 

In the launch of Google Maps API for Flash in May 2008 they were responding to strong demand from ActionScript developers for a way to integrate Google Maps into their applications and exploit the performance and cross-platform strengths of Flash.

However use of the Maps API for Flash remains a small percentage of overall Maps API traffic, with only a limited number of applications taking advantage of features unique to the Maps API for Flash. In addition, the performance and consistency of browser JavaScript implementations has progressed, making the JavaScript Maps API an increasingly suitable alternative.

Consequently they have decided to deprecate the Maps API for Flash in order to focus our attention on the JavaScript Maps API v3 going forward. This means that although Maps API for Flash applications will continue to function in accordance with the deprecation policy given in the Maps API Terms of Service, no new features will be developed, and only critical bugs, regressions, and security issues will be fixed. We will continue to provide support to existing Google Maps API Premier customers using the Maps API for Flash, but will wind down Developer Relations involvement in the Maps API for Flash forum.

They understand that this decision will be disappointing for Maps API for Flash developers. Google hope you will consider migrating your applications to the Maps API v3, which offers many additional benefits such as Street View, Fusion Tables integration, Places search, and full support for mobile browsers. Developer Relations team and many skilled members of the JavaScript Maps API community are available to assist you in doing so on the Google Maps JavaScript API v3 forum.

Google remains supportive of Flash as a development platform for Rich Internet Applications for Chrome, Android, and other devices. However by consolidating our development on the Maps API v3 we can focus all of our resources on delivering great new Maps API features for the benefit of as many developers as possible.

 

The Distance Matrix

I often found myself on long car journeys with nothing to occupy me but a dog-eared UK road atlas. On the back page, there was a chart that showed the driving distance and journey time between pairs of major cities, and I would amuse myself figuring out which pair was furthest apart, and how long it takes to drive the length and breadth of the country.Thanks to the new Distance Matrix service, which we are launching today, I can now relive these moments from my youth. The Distance Matrix service is a simple and efficient way to obtain the travel distance and time between many locations when you do not need the full route details for any individual pair. The below applications generates a distance matrix for walking from major London railway stations to several London landmarks. Roll your mouse over the matrix cells, or tap a cell, to see the relevant route.

The Distance Matrix service is also useful for sorting or filtering search results. For example, let’s say your Maps API application enables users  to find nearby grocery stores and you want to present the results sorted by drive time. The locations are stored in a spatial database such as Google Fusion Tables, which can return all stores within a given straight line distance. Using the Distance Matrix service you only need one more query to obtain the drive time from the user’s location to each of those stores in order to sort them accordingly.

The Distance Matrix service is available for use directly in the JavaScript Maps API as well as a web service returning JSON or XML. To get started, take a look at the Maps API services documentation, and the Distance Matrix API web service documentation.

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.