<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<small><big>sorry in advance for my asking the long code<br>
but I am rying for a while but it fails. I just adapted the code <br>
which resides in wiki's site to my purpose.<br>
<br>
</big>~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
<?php<br>
if (!extension_loaded('php_mapscript.so')) {<br>
  if (!dl('php_mapscript.so')) {<br>
       exit;<br>
   }  <br>
}<br>
<br>
function click2map ($click_x, $click_y) {<br>
    global $map;<br>
    $e= &$map->extent; //for saving writing<br>
    $x_pct = ($click_x / $map->width);<br>
    $y_pct = 1 - ($click_y / $map->height);<br>
    $x_map = $e->minx + ( ($e->maxx - $e->minx) * $x_pct);<br>
    $x_map2=$_GET['$x_map'] ;<br>
    <br>
    $y_map = $e->miny + ( ($e->maxy - $e->miny) * $y_pct);<br>
        return array($x_map, $y_map);<br>
}<br>
<br>
$map_file="./kara.map";<br>
<br>
$map = ms_newMapObj($map_file);<br>
<br>
$jeolayer = $map->getLayerByName("jeo");<br>
$jeoClass0 = $jeolayer->getClass(9);<br>
$jeoStyle = $jeoClass0->getStyle("*");<br>
$jeoStyle->color->setRGB(0,255,0);<br>
<br>
$map_pt = click2map($_GET['image_x'],$_GET['image_y'],$map->extent);<br>
//Create the point<br>
$pt = ms_newPointObj();<br>
$pt-> setXY($map_pt[0],$map_pt[1]);<br>
<br>
$img = $map->draw();<br>
$layer = $map->getLayerByName('fay');<br>
$url = $img->saveWebImage();<br>
<br>
?><br>
 <HTML><br>
     <HEAD><br>
                <TITLE>Example 1: Displaying a map</TITLE><br>
      </HEAD><br>
     <BODY><br>
<form method="get" action="query2.php" ><br>
   <input style="border:thin solid black;" type="image" <br>
          name="image" src="<?php echo $url?>"  > <br>
</form><br>
</BODY><br>
 </HTML><br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
query2 .php:<br>
-------------<br>
<?<br>
  print_r($_GET);<br>
  print_r($x_map);<br>
  print_r($x_map2); <br>
  echo $HTTP_GET_VARS['dene'];<br>
 ?><br>
</small>--------------------<br>
I only get image's coordinates. But  I could get nothing about map's
coordinates<br>
and any variable from 1st php file during running of <small>query2
.php.<br>
<br>
<big>Are there anyone having any idea ?<br>
<br>
kind regards<br>
<br>
Ahmet Temiz<br>
</big>TURKEY<br>
</small>
<BR><PRE>

______________________________________
Inflex - installed on mailserver for domain @deprem.gov.tr
Queries to: postmaster@deprem.gov.tr

______________________________________
The views and opinions expressed in this e-mail message are the sender's own
and do not necessarily represent the views and the opinions of Earthquake Research Dept.
of General Directorate of Disaster Affairs.

Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C.
B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir.

</pre><BR></body>
</html>