Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   [SHARE] C4 Geodata MAP. (https://postpacific.loc-online.com/showthread.php?t=3795)

Silentz0r 27.03.2006 00:05

[SHARE] C4 Geodata MAP.
 
Hi, hope you guys find it usefull.

i just made it 5min ago.

http://www.wca.com.ve/silent/C4GeodatamapENG.jpg

kepler001 27.03.2006 00:08

great share thanks

wton 27.03.2006 01:44

=0 geniaaaaaaaaaaaaaaaalll :D
gracias :D

thanks very much :D

Kenster 27.03.2006 02:33

Post a pic of it from the editor?

Zil 27.03.2006 02:34

Really, thnx...greate :)

tpuNIsher 27.03.2006 03:29

nice work and thanks :]

Silentz0r 27.03.2006 08:09

Quote:

Originally Posted by Kenster
Post a pic of it from the editor?

What do you mean?

Met45 27.03.2006 08:38

thx for the share!

ANRDaemon 28.03.2006 04:09

Code:

<?php

require_once(DB interface);
require_once(Some configs);

$DB = new database connection;

// configure map dimension here
$worldMap = array(
  'startX' => 16,
  'startY' => 10,
  'lastX' => 26,
  'lastY' => 26,
);

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>World map</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body><table class="worldMap">
<?php

for($y = $worldMap['startY']; $y <= $worldMap['lastY']; $y++)
{
  print("<tr>\n");
  for($x = $worldMap['startX']; $x <= $worldMap['lastX']; $x++)
  {
    if(file_exists(sprintf('img/%02d_%02d.png', $x, $y)))
    {
      $content = "X: {$x} Y: {$y}
\n";
      // Fetch and paste some data from DB to map
      printf('  <td><div class="mapTile" style="background-image: url(\'img/%02d_%02d.png\');"><div>%s</div></div></td>
', $x, $y, $content);
    }
    else
    {
      print('<td></td>');
    }
  }
  print("</tr>\n");
}

?>
</table>
</body>
</html>

Place XX_YY.png files in ./img subfolder and see something like this:
http://www.l2aw.ru/shadows/HDGE/map/


All times are GMT. The time now is 16:19.