Browse Source

syntax cleanup

main
Aaron Parecki 2 years ago
parent
commit
d02e80c8af
Failed to extract signature
1 changed files with 11 additions and 11 deletions
  1. +11
    -11
      p3k/geo/StaticMap.php

+ 11
- 11
p3k/geo/StaticMap.php View File

@ -307,29 +307,29 @@ function generate($params, $filename, $assetPath) {
$urls = array(); $urls = array();
for($x = $swTile['x']; $x <= $neTile['x']; $x++) { for($x = $swTile['x']; $x <= $neTile['x']; $x++) {
if(!array_key_exists("$x", $tiles)) {
$tiles["$x"] = array();
$overlays["$x"] = array();
$chs["$x"] = array();
$ochs["$x"] = array();
if(!array_key_exists($x, $tiles)) {
$tiles[$x] = array();
$overlays[$x] = array();
$chs[$x] = array();
$ochs[$x] = array();
} }
for($y = $swTile['y']; $y <= $neTile['y']; $y++) { for($y = $swTile['y']; $y <= $neTile['y']; $y++) {
$url = urlForTile($x, $y, $zoom, $tileURL); $url = urlForTile($x, $y, $zoom, $tileURL);
$urls[] = $url; $urls[] = $url;
$tiles["$x"]["$y"] = false;
$chs["$x"]["$y"] = curl_init($url);
$tiles[$x][$y] = false;
$chs[$x][$y] = curl_init($url);
curl_setopt($chs[$x][$y], CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($chs[$x][$y], CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($chs[$x][$y], CURLOPT_FOLLOWLOCATION, true); curl_setopt($chs[$x][$y], CURLOPT_FOLLOWLOCATION, true);
curl_multi_add_handle($mh, $chs["$x"]["$y"]);
curl_multi_add_handle($mh, $chs[$x][$y]);
if($overlayURL) { if($overlayURL) {
$url = urlForTile($x, $y, $zoom, $overlayURL); $url = urlForTile($x, $y, $zoom, $overlayURL);
$overlays["$x"]["$y"] = false;
$ochs["$x"]["$y"] = curl_init($url);
$overlays[$x][$y] = false;
$ochs[$x][$y] = curl_init($url);
curl_setopt($ochs[$x][$y], CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ochs[$x][$y], CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ochs[$x][$y], CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ochs[$x][$y], CURLOPT_FOLLOWLOCATION, TRUE);
curl_multi_add_handle($mh, $ochs["$x"]["$y"]);
curl_multi_add_handle($mh, $ochs[$x][$y]);
} }
$numTiles++; $numTiles++;

Loading…
Cancel
Save