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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:37:32+00:00 2026-06-17T05:37:32+00:00

My map lets users draw coordinates that snap to nearest road. I capture the

  • 0

My map lets users draw coordinates that snap to nearest road. I capture the resulting polylines and store them in a fusion table.

Now I want to retrieve these polyline coordinates and display on the map.

When I have the following in a fusion table, it maps correctly:

<LineString><coordinates>-93.2817792892456,37.20134698578519 -93.28178000000001,37.201420000000006 -93.27869000000001,37.2014 -93.27869000000001,37.2014 -93.27813,37.2014</coordinates></LineString>

But unfortunately the Map input is capturing something that is more like this:

<LineString><coordinates>(37.20134698578519,-93.2817792892456),(37.201420000000006,-93.28178000000001),(37.2014,-93.27869000000001),(37.2014,-93.27869000000001),(37.2014,-93.27813)</coordinates></LineString>

My question is whether to solve this issue I need to parse this string so that it fits the acceptable format, or if I am missing something and there is an easier more acceptable way of doing this.

Jsfiddle is here. If you draw a few polylines, you can either click on the ‘clear’ control to get an alert that shows the coordinates, or you can double click to end the polyline drawing and this will bring up an infobox with ‘Location’ field prepolulated with the coordinates that end up in the fusion table.

This is the fusion table. Records like ‘scce’ and ‘scenic’ display correctly on the map. But record like ‘twisty/new format’ does not.

Any insight on this would be highly appreciated. Thank you for looking.

  • 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-17T05:37:33+00:00Added an answer on June 17, 2026 at 5:37 am

    The Google Maps API uses google.maps.LatLng objects. When converted to a string the coordinates are in the order “Latitude, Longitude”.

    The KML format uses the opposite order:

    <coordinates>longitude1,latitude1 longitude2,latitude2</coordinates> 
    

    (also allows an optional third “height” coordinate)

    Change your code to output the coordinates in the correct order and without the parentheses

    Change this:

      geolines=escape("<LineString><coordinates>")+poly.getPath().getArray().toString().replace(/([\s]+)/g, '')+escape("</coordinates></LineString>") ;
    

    To:

      geolines=escape("<LineString><coordinates>");
      var path = poly.getPath();
      var length = path.getLength();
      for (var i=0; i < length; i++) {
        geolines += path.getAt(i).lng()+","+path.getAt(i).lat()+" ";
      }
      geolines+= escape("</coordinates></LineString>");
    

    (not tested)

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

Sidebar

Related Questions

I'm building an application that lets my users create several markers on a map.
I'm working on an app that lets users select regions by finger painting on
The reason I ask is my app lets users cache map tiles. Does anyone
I am using Rails 3.0.8 Lets say that I have two collections of users.
I'm new to C# and am working on a Windows Store App that lets
In my action class I have a Map<Long, Set<String>> attribute, named accountsMap. Lets say
I have a problem that I can't resolve. Let's say I have this map
Map Reduce is a pattern that seems to get a lot of traction lately
For our grails application, I've written a method that lets you upload a CSV
I am trying to write a simple program that lets me overlay a dot

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.