Today we are launching a point release, version v1.2, of our MapQuest.js product. This release focuses on bug fixes, adding additional options and events, as well as the introduction of a new directions control.
A few small improvements to point out include an upgrade to our Leaflet.js library dependency from 1.1.0 to 1.2.0. You can read about the changes to Leaflet here. We also fixed a bug where ad blockers were blocking our tiles in a few cases.
We refactored the geocoding control to add new options, functionality, and polish. We also added additional custom icons for cities, counties, and postal codes. There are three new events (searchahead_response, searchahead_selected, geocode_response) to further help developers use the control in harmony with other JavaScript code. We also added four additional options available to help you fine-tune how the control interacts with the map. Finally, you can now navigate the search ahead results with up and down arrow keys and use the escape key to exit the control.
The traffic control now has a summary control rendered at the bottom center of the map. This allows users to individually toggle traffic flow, incident, and construction markers on and off, as well as giving a summary chart of traffic flow colors from fast to closed.
The locator control has a new event, current_position, that returns the user’s position object when found. It also has new options from the geolocation api: timeout, enableHighAccuracy, and maximumAge.
The directions control is our newest control in the MapQuest.js library. It allows drop-in routing functionality to any website. A user can enter a start and end destination by either clicking on the map or entering text input. It also has a route summary control that displays alternate routes. A route narrative is shown with turn-by-turn maneuvers. The user can click the maneuvers zoom into a particular maneuver. There are also buttons to add a destination, reverse the route, and toggle between driving and walking routes. This control is also customizable with the underlying directions layer can be styled to fit your company’s branding. The buttons can be toggled on and off, for example, if you don’t want users making multipoint routes. Finally, the input fields can be disabled, forcing users to only navigate to a fixed point, like solely your business.
If you have any feedback, bug reports, or feature suggestions, please don’t hesitate to contact us on our forums or contact us form.