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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:02:59+00:00 2026-06-07T00:02:59+00:00

I have the following problem. I have embedded a map using Google Maps’ API.

  • 0

I have the following problem. I have embedded a map using Google Maps’ API. My intention is to bring some values from a .txt (cordenates), put them into a list, and then display them in the Map, with lines between each point.
I have no problem doing this if I put the values manually in the list. But when I try to get them from the .txt file, the map is not shown in my page (the place where it should be is blank). BUT if I check in the source code the Script, it doesn’t appear to have any problem… each point is shown as it should inside of the Script.
This is a part from my View:

def base (request):

 analyze_results('testing')
 with open('data.txt') as f:
     for line in f:
        words = line.split()
        points.append(words[1]+','+words[3])
 return render_to_response('base.html', {'points': points, 'user_data': user_data})

points = []

If I manually asign the points list, and take away the

with open(‘data.txt’) as f:

    for line in f:
        words = line.split()
        points.append(words[1]+','+words[3])

it works perfectly.

Do you know what may be the problem?

  • 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-07T00:03:00+00:00Added an answer on June 7, 2026 at 12:03 am

    I looked at your question history to learn more about what you’re doing, and it looks like you have to clean up your text data before passing it to Google Maps. What’s happening is the LatLng is being created as:

    new google.maps.LatLng(38.4397984,061.1720742)
    

    Notice that there’s a ‘0’ before 61.1720742, this is giving me “unexpected number” error in Chrome when I test it. You need to remove that zero. Also, the coordinates are “South” and “West”, so you need to add a minus sign “-” to conform to Google Maps’ LatLng format.

    P.S. you can try strip('0') to remove the 0, for example, '061.172000'.strip('0') -> ‘61.172’

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

Sidebar

Related Questions

I have the following problem: I have some (binary) files , which are embedded
I have the following problem in a Database using Access 2007 as front end
I have a following problem: I compiled my application on Linux Ubuntu 9.10 using
I have following problem. In my view model I defined some list properties as
I have the following code http://jsfiddle.net/yXwh9/3/ and the result is http://jsfiddle.net/yXwh9/3/embedded/result/ The problem is
I have compiled Qt4 embedded SDK for using on BeagleBoard with following options: ./configure
I have following problem: I have built a tabbar application with 4 tabs. I
I have following problem, Code: String a=Yeahh, I have no a idea what's happening
I have the following problem: I have a form in site/banen (currently local running
I have the following problem. I have three classes, A, B and C. A

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.