Google Maps has implemented a much requested feature, draggable maps, into the Google Maps API. The feature has long been a part of the Google Maps site, but now developers can provide draggable maps for their users–and retrieve the results.
Draggable maps, according to a post at the Google Geo Developers blog, implemented by Izaak Rubin, an intern on the Maps API Team. The feature allows a user to modify the route suggested by the Maps API to suit their tastes, for example to avoid traffic, or to modify stop overs on a long road trip. The draggable directions demo gives a good overview of the feature. You can move either the markers or simply move your mouse to a path, click it and drag it. The Maps implementation determines the new path accordingly.
The implementation is well thought out. A new option draggable is introduced in the DirectionsRenderer, which when set to true, makes the path draggable. Applications that use the existing Google Maps v3 will remain unchanged since by default, the paths are not draggable. If you are a developer interested in knowing more about the feature, check out the documentation.
The change looks small on the surface but developers are going to love this incremental change. Consider mapping applications that have current traffic conditions/incidents overlaid on the map. The user can now drag the route and avoid certain paths while planning their journey. Another mashup we can think of is an application that has user videos/photographs on the map of sites worth visiting. You can now plan your trip by dragging the routes and making a customized path just for your trip. How about a “Visit Friends” mashup, that allows you to drag the directions so that you can visit several friends on the way?
Google Maps is one of the most used APIs, with 30% of the mashups in our directory using it. As of last count, there are 2058 Mashups that use Google Maps. With draggable directions, developers are sure to innovate on top of it.