changeset 236:d0789eab0c47 gmap2

Rename some functions.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 17 Mar 2014 01:18:50 +0200
parents 0e6fa3f5684d
children d858383547c7
files tools/makegmaps.php
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/tools/makegmaps.php	Sun Mar 16 22:28:23 2014 +0200
+++ b/tools/makegmaps.php	Mon Mar 17 01:18:50 2014 +0200
@@ -85,7 +85,10 @@
 $mapPalette[3]    = array(0,0, 0);
 
 
-function makeDir($path)
+//
+// Helper functions
+//
+function stMakeDir($path)
 {
   if (file_exists($path))
     return TRUE;
@@ -94,7 +97,7 @@
 }
 
 
-function outputToFile($sfilename, $sdata)
+function stOutputToFile($sfilename, $sdata)
 {
   if (file_put_contents($sfilename, $sdata, LOCK_EX) === FALSE)
     die("Error writing to '".$sfilename."'.\n");
@@ -231,7 +234,7 @@
 }
 $str .= "];\n";
 
-outputToFile($worldJS, $str);
+stOutputToFile($worldJS, $str);
 
 
 
@@ -323,7 +326,7 @@
   );
 }
 
-outputToJSONFile($tradelaneOut, $qdata);
+stOutputToJSONFile($tradelaneOut, $qdata);
 
 
 /* Export tradelane polyline data
@@ -352,7 +355,7 @@
 }
 
 
-outputToJSONFile($tradelaneOverlay, $qdata);
+stOutputToJSONFile($tradelaneOverlay, $qdata);
 
 /*
  * Generate PNG maps
@@ -429,7 +432,7 @@
   return TRUE;
 }
 
-if (!makeDir($pathImageCache)) {
+if (!stMakeDir($pathImageCache)) {
   die("Failed to create cache directory '".$pathImageCache."'!\n");
 }
 
@@ -584,7 +587,7 @@
 
   if ($drawn > 0)
   {
-    makeDir($pathTileData.$zoom."/".$y, 0755);
+    stMakeDir($pathTileData.$zoom."/".$y, 0755);
     imagepng($im, $outFilename);
     imagedestroy($im);
   }
@@ -609,7 +612,7 @@
   $zoom2 = $zoom - 1;
   $scale = pow(2, $zoom2 - 5);
 
-  makeDir($pathTileData.$zoom);
+  stMakeDir($pathTileData.$zoom);
 
   echo "\nzoom level $zoom: ";