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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:17:01+00:00 2026-06-08T20:17:01+00:00

I am copying GPS coordinates into a text file to use for a website

  • 0

I am copying GPS coordinates into a text file to use for a website displaying a google map. Before, I was using a php script to take the gps coordinates and some long strings to create a kml document that I could display. That doesn’t seem like the best way. I have the text file, gpsinfo.txt, with information for 4 datapoints that looks like this when opened:

7.784606,63.10403 7.784606,64.10403 7.784606,65.10403 7.784606,66.10403

How should I use that text file to create the 4 points on my webpage?

I was thinking about using a php file to create a js file that my webpage could read, but that doesn’t sound like a very clean method.

  • 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-08T20:17:03+00:00Added an answer on June 8, 2026 at 8:17 pm

    This is what I am doing to solve this:

    I have a php file scrape some webpages to get GPS coordinates, and then I copy them into a text file but in a JSON format:

      [{ "boat": "Edda", "coordinates" : { "lat" : 7.80086, "lon": 64.75658}}, { "......
    

    Then I have a php file that is reads the file and is accessed by my webpage using ajax and outputs the string and then the webpage handles it.

    ajax on webpage:

    <script type="text/javascript" language="JavaScript">
    var point;
    microAjax("BackgroundFiles/genjsonGPS.php", function (res) {
    
      var json_obj = JSON.parse(res.toString());
    
      initialize(json_obj);
      window.setTimeout(function(){
    
        }, 500);      
    });
    
      </script>
    

    genjsonGPS.php:

    <?php
    
    $myFile = "vesselGPS.txt";
    $fh = fopen($myFile, 'r');
    $vesselGPS = fread($fh, filesize($myFile));
    fclose($fh);
    
    echo($vesselGPS);
    
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm copying a Magento Enterprise 1.11.2.0 core file called Preview.php into the local folder
I am copying a resource into another folder before packaging using the maven-dependecy-plugins copy
Copying a File using a straight-forward approach in Python is typically like this: def
I am copying code from website matplotlib and pasting into the Vim editor in
I'm copying some objects into a file and they all are derieved from same
I'm copying a piece of text from Excel to Word using : Range(A1:C37).Copy appWD.Selection.PasteExcelTable
I am copying a file from a remote server using copy (and also tried
When copying and pasting the following code for a Twitter button into a text
I'm having trouble copying a file and then verifying the integrity of the file
I am copying a file to a directory, and then setting an environment variable

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.