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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:01:57+00:00 2026-06-12T16:01:57+00:00

I have a heat map which I use to visualize large scale GPS data

  • 0

I have a heat map which I use to visualize large scale GPS data with XAMPP-PHP-PostgreSQL back-end.

However, trying to visualize the GPS data of a big time interval – such as 24 hour data of 14 months – 2.4 million rows of latitude and longitude values, that is – causes my html page to crash.

I can visualize about 900.000 rows worth of data but I always get a crash for data bigger than that.

I used ini_set('memory_limit', '-1') and set_time_limit (60) to bypass the time limit and memory warnings by PHP but now I run into this Chrome browser crash problem.

What could be causing this? My PHP code that retrieves the latitude and longitude values are as following:

function getPoints($dateTimeBeg,$dateTimeEnd) //getting the points 
//from the database after providing the start and end date objects
{

    global $con, $coords, $coords_array; //$coords and $coords_array are declared
//at the beginning of the php script

    $query = "SELECT lat, lon FROM mytable WHERE calltime >= '$dateTimeBeg'
    and calltime <= '$dateTimeEnd'"; 

    $res = pg_query($con, $query) or die (pg_last_error($con)); 

    if($res)//if a result exists
    {
        $num_of_rows = pg_num_rows($res);

        if($num_of_rows > 0)
        {
            while($row = pg_fetch_row($res)) //fetch results row by row
            { 
                array_push($coords,array($row[0],$row[1]));      
//push them to the $coords array
            }
            array_push($coords_array,$coords); 
            unset($coords);
//push array $coords array to $coords_array ARRAY
        }
    }
}

$coords_json = json_encode($coords_array); //encode the results as json 
echo $coords_json; //print out the data, heatmap takes the 
//coordinates and takes care of the rest
unset($coords);
pg_close($con);
  • 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-12T16:01:58+00:00Added an answer on June 12, 2026 at 4:01 pm

    Looks like you’re returning 900,000+ data points back to the browser via json and asking the browser to handle the mapping… You might not have a php problem, but a browser overload problem.

    You might try only sending every other result to the browser to see if that finishes (select all from db but only return half via json)… This could tell you if the problem is with the php or browser/JavaScript

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

Sidebar

Related Questions

I have some shapefile (demographic/heat map data in the USA, such as crime in
I want to generate a heat map from an all-vs-all comparison. I have the
I want to make a heat map of correlated data and instead of getting
I have a heat map application on OpenLayers where user enters two date and
I have various hexadecimal RRGGBBAA colors as stop values in a heat map gradient
I have a code that calculates heat transfer in some number of conductors. What
What i have: I have an installations routine written in WIX 3.6 (with heat,
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
Have deployed numerous report parts which reference the same view however one of them

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.