Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5955963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:11:20+00:00 2026-05-22T18:11:20+00:00

I am trying to draw a map with the traffic layer and display road

  • 0

I am trying to draw a map with the traffic layer and display road conditions (constructions, accidents, etc.) Using the Google Maps API / Google Directions API, how can I obtain a reference to the traffic conditions that are displayed, or more specifcally, the conditions along a path / route? Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:11:21+00:00Added an answer on May 22, 2026 at 6:11 pm

    In Google Maps API v3, the documentation says you display traffic conditions like this:

    var myLatlng = new google.maps.LatLng(34.04924594193164, -118.24104309082031);
    var myOptions = {
      zoom: 13,
      center: myLatlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    
    var trafficLayer = new google.maps.TrafficLayer();
    trafficLayer.setMap(map);
    

    I don’t think this will display specific hazards (like accidents or construction) but simply slow traffic. You would almost certainly have to get such data from a source that wasn’t Google Maps.

    This question was tagged as both Google Maps API v3 (which is what I answered with above) and Android. I don’t know if this helps you for Android native programming, but hopefully it’s not useless. (Update: Looks like the question has now been retagged to remove the API v3 tag.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to draw an animation over google maps, hopefully using html5's canvas element.
I am trying to draw a geodesic polyline with Google Maps JavaScript API from
I am trying to draw path between two points on google map using url
Why when I want to draw a polyline using Google maps V3.0 (JavaScript API)
I'm trying to draw on a map using markers. The problem I'm having is
I'm trying to draw something on a map using overlays. So I have the
I'm trying to draw a map of NYC using d3. I've downloaded a bunch
I am trying to calculate the distance between two map point using Google Map
I'm trying to draw a google maps that has multiple Circle overlays, however I
I'm trying to draw a line between two cities, on a world map, using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.