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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:36:47+00:00 2026-06-01T12:36:47+00:00

In my google maps program I have simple KML parser which retrieve only coordinates

  • 0

In my google maps program I have simple KML parser which retrieve only coordinates and create polylines on map for them, additionally in every point create markers that are used later to edit the line. With longer routes map hangs from the excess of markers. I got the idea, maybe you can create markers only if the curve exceeds 10 degrees? Now I have if which is screened only every second point but this is weak idea.

Illustrative unpacking an array:

for (var i=0;i<coords.length;i++) { 
    if(i!=0&&i!=coords.length-1){
        var prevpt = new google.maps.LatLng(coords[i-1].lat, coords[i-1].lng);
        var pivot = new google.maps.LatLng(coords[i].lat, coords[i].lng);
        var nextpt = new google.maps.LatLng(coords[i+1].lat, coords[i+1].lng);

        var marker = createMarker(pivot);
        polyMarkers.push(marker);
        var path = polyLine.getPath();
        path.push(pivot);
    }
}

How to calculate that the next exceeds 10 degrees?

Maybe you have some other idea of ​​how it can be optimized?

  • 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-01T12:36:48+00:00Added an answer on June 1, 2026 at 12:36 pm

    It seems that you need polyline simplification – Douglas-Peucker algorithm. Here is another description with implementation

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

Sidebar

Related Questions

I have a small Python program, which uses a Google Maps API secret key.
We have a program that displays map data (think Google Maps, but with much
I'm new to Google maps and I'm wondering how would I program a Map
I made a test a program which uses Google maps following a tutorial. I
I have a program that I want to use google maps for. The problem
Google Maps API delivers me a string which contains the German letters: ö, ä
In google maps API v3, I'm creating my own custom map types by calling
I currently have Google Maps integrated into my webpage. It is being used to
I've installed the Google Maps Java 2 ME app on my Nokia N73 which
I have a program which gets a list of locations from an sql db

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.