Skip to main content

The MQ Blog

Discover easy ways to improve your business needs using MapQuest’s tools and gain insights into MapQuest use cases for various industries

New Release: MapQuest.js, v1.2

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.

Geocoding Control

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.

Traffic 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.

Locator Control

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.

Directions Control

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.

Recent articles

What is the difference between latitude and longitude?

In the realm of geographic navigation and positioning, the concepts of latitude and longitude stand as fundamental principles guiding us across the complex surface of our planet. These two sets of lines not only demarcate positions on Earth but also play a pivotal role in the fields of GPS technology, time zones management, and global […]

Jenn Chu

Why Route Optimization is Critical for Operational Success

In today’s fast-paced business landscape, route optimization software and APIs offer a game-changing solution for enhancing operational efficiency and driving cost savings. When your drivers have hundreds, if not thousands, of destinations or clients to visit, planning routes manually becomes a time-intensive and inefficient solution. Route optimization benefits extend far beyond just reducing travel distance […]

Jenn Chu

The Science Behind GPS: How Does It Work?

The Satellite Network GPS operates through a constellation of satellites that are strategically positioned in medium Earth orbit. This network includes at least 24 operational satellites at all times, ensuring global coverage and providing users with precise navigation and timing services 1. Each satellite orbits the Earth approximately twice a day at an altitude of about […]

Jenn Chu