Pages

Sunday, October 2, 2016

EV Explorer helps drivers compare electric vehicles and costs using Google Maps APIs


Editors note: Today’s guest blogger is Daniel Scrivano, former lead developer for the UC Davis EV Explorer. See how EV Explorer and other developers rely on Google Maps APIs to bring unique location experiences to their users.

Most people know they can help the environment by driving an electric vehicle, but they often don’t realize they can save money, too. As a student at UC Davis, I started a research project to make these savings clearer. The EV Explorer website, launched last summer, lets drivers compare fuel costs for electric and gas-powered vehicles.

EV Explorer uses the Google Maps APIs and a database called fueleconomy.gov to give drivers information about the fuel economy of 34,000 different vehicles. EV Explorer visitors enter their commuting starting points and destinations, along with how often they commute. Based on that data, the site calculates the annual energy costs for up to four vehicles.


We built EV Explorer using several of Google’s mapping APIs: JavaScript, Directions, Places and Geocoding. EV Explorer downloads the appropriate map and helps people visualize the data they’re inputting. If people don’t know their work address, they can type in the name of their business and Places API geolocates it. The Geocoding API converts any address into latitude and longitude. We query the Directions API when we’ve got the specific points for home and work. The app then draws the route using polylines between the two locations.

We chose Google Maps APIs because Google’s mapping database consistently ranks among the most comprehensive, up to date, and user-friendly. With Google Maps, a user can type in “Safeway” and “San Francisco” to see all the Safeway locations in the city and choose among them. If they mistype something or include incomplete information, auto-correcting tools offer suggestions and corrections.

In building the site, I kept one thing in mind: You won’t make it until you break it. That means you need to experiment, try new things, get your hands dirty, and make random stuff. You’ve got to push the APIs to their limits. And by doing just that, we delivered what we set out to do: Help people understand the wider benefits of electric vehicles and show them how much they could save by switching to electric.

Related Posts by Categories

0 comments:

Post a Comment