0

I'm trying to figure out how to load more information while zooming out of a page. I a "map" on my site that displays information from a database. it's currently grabbing the stuff from the DB like this:

$sql = "SELECT X, Y from mapCoords WHERE X = :pageX AND Y = :pageY"
$que = $db->prepare($sql);
$que->bindParam('pageX', $_GET['x'])
$que->bindParam('pageY', $_GET['y']);
try{ $que->execute();
while($row = $que->fetch(PDO::FETCH_BOTH))
{
   echo "<div id='mapStuff' style="top: {$row[0]}%; left: {$row[1]}%">&nbsp;</div>';
}
}catch(PDOException $e){} 

I would like to have it so, when the user zooms out of the page, more information appears. I've found tutorials on 'scroll loading' but nothing relevant to the zooming of a page.

  • you can check the scroll position and make an ajax request when criteria is met. If you want to detect zoom, [here is an example](http://stackoverflow.com/questions/6163174/detect-page-zoom-change-with-jquery-in-safari) – Ibu Feb 05 '14 at 20:55
  • @Ibu that should help! thank you. Now i'll just have to retool a bit of my code. but nothing to major. – user3277023 Feb 05 '14 at 20:59

0 Answers0