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 7805155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:07:57+00:00 2026-06-02T02:07:57+00:00

I am having a map with some polylines with the distance [api v3]. I

  • 0

I am having a map with some polylines with the distance [api v3]. I want that when someone drag the polyline at the same time the distance also get updated but dont know how to do. Please help me, any good tutorial or another threads are most welcome

Thanks for helping me

Naveen

  • 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-06-02T02:07:59+00:00Added an answer on June 2, 2026 at 2:07 am

    There is a attribute which makes your polyline editable.

    polyPath.setEditable(true);
    

    Now use a listener to check the editing.

       google.maps.event.addListener(polyPath, 'capturing_changed', function() {
    
        var array = polyPath.getPath(); //getPath() gives u array of current markers latlng over map 
    
                        var tempDistance = 0;
    
                        var tempPathArray = [];
    
                         for(i = 0; i < array.length; i++){
    
                           tempPathArray.push(array.getAt(i));
    
                          }
    
    
                           for(k = 1; k < tempPathArray.length; k++)
    
                           {
    
    
      var calculateNewDistance=google.maps.geometry.spherical.computeDistanceBetween(tempPathArray[k-1],tempPathArray[k]);
    
                                tempDistance += calculateNewDistance;
    
                            }
       }
    

    // make sure to add the following script to compute the distance between two latlngs

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

Sidebar

Related Questions

I'm having some trouble with the Google Maps API; I want to determine a
I'm having some issue working with V4L (the API that provides unified access to
I am having a lil hard time with map and the valuetype allocation. consider
I want to show a dynamic google map on a .net web page. Having
Having some maps defined as: var valueToSomeType = map[uint8]someType{...} var nameToSomeType = map[string]someType{...} I
I'm having some trouble finding documentation on CLOSING a blackberry map. My map opens,
I'm having some problems with the following code: with open('townhall.map', 'r') as f: for
Hi I'm having some trouble with IE7 when doing a map. I've made an
I'm having some trouble using the std container classes (list, map etc.) in C++.
I'm having trouble with some whitespace above my table. I have a table that

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.