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

  • Home
  • SEARCH
  • 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 6692469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:52:17+00:00 2026-05-26T05:52:17+00:00

Why when I want to draw a polyline using Google maps V3.0 (JavaScript API)

  • 0

Why when I want to draw a polyline using Google maps V3.0 (JavaScript API) which has many points (more than about 7 points) the ployline doesn’t appear , despite when trying to draw a plolyine with a few number of points it appears ?

edit:

code

var polyOptions = {strokeColor: '#FF0000',strokeOpacity: 0.6,strokeWeight: 5}
var poly = new google.maps.Polyline(polyOptions);
var path = poly.getPath();
var bounds2 = new google.maps.LatLngBounds();

    for(var i=0;i<a.length;i++){
        var zz=a[i].split(",");
        bar lat=zz[0];
        var lng=zz[1];

        var point = new google.maps.LatLng(parseFloat(lng),parseFloat(lat));

        var icon = customIcons["dot"];
                createMarker(i,"test routing",point,icon,2);
            path.push(point);
            poly.setMap(map);
         }  
  • 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-26T05:52:18+00:00Added an answer on May 26, 2026 at 5:52 am

    Can you share the code that doesn’t work?

    Sometimes, it helps to set the map of the polyline even after you add it in the polyline options. Try something like:

    var mypolyline = new google.maps.Polyline({
                      map: map,
                      path: coords,
                      strokeColor: "#787878",
                      strokeOpacity: .6,
                      strokeWeight: 3,
                      clickable: false
                    });
    
    mypolyline.setMap(map);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Want to draw an UIImageView which has an CGImage, and the UIImageView has alpha
I want to draw a Sankey diagram using Javascript. Can anyone provide some direction
I want to draw a bitmap into buffer and create a bitmap using javascript.
I want to draw polyline (a continuous line composed of one or more line
I want to draw an image using an additive blend mode. But I don't
I want to draw a triangular object in QGraphicsView by using QGraphicsItem . But
I want to draw an arrow using Graphic fillpolygon. But my arrow head is
I want to draw an image in PHP, which looks like the circle in
I want to draw on a Flex AreaChart. This AreaChart has an AnnotationElement that
I want to draw a chart and I'm using a scrollview to do so.

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.