<!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>
&lt;?php<br>
if (!extension_loaded('php_mapscript.so')) {<br>
&nbsp; if (!dl('php_mapscript.so')) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
&nbsp;&nbsp; } &nbsp;<br>
}<br>
<br>
function click2map ($click_x, $click_y) {<br>
&nbsp;&nbsp;&nbsp; global $map;<br>
&nbsp;&nbsp;&nbsp; $e= &amp;$map-&gt;extent; //for saving writing<br>
&nbsp;&nbsp;&nbsp; $x_pct = ($click_x / $map-&gt;width);<br>
&nbsp;&nbsp;&nbsp; $y_pct = 1 - ($click_y / $map-&gt;height);<br>
&nbsp;&nbsp;&nbsp; $x_map = $e-&gt;minx + ( ($e-&gt;maxx - $e-&gt;minx) * $x_pct);<br>
&nbsp;&nbsp;&nbsp; $x_map2=$_GET['$x_map'] ;<br>
&nbsp;&nbsp; &nbsp;<br>
&nbsp;&nbsp;&nbsp; $y_map = $e-&gt;miny + ( ($e-&gt;maxy - $e-&gt;miny) * $y_pct);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return array($x_map, $y_map);<br>
}<br>
<br>
$map_file="./kara.map";<br>
<br>
$map = ms_newMapObj($map_file);<br>
<br>
$jeolayer = $map-&gt;getLayerByName("jeo");<br>
$jeoClass0 = $jeolayer-&gt;getClass(9);<br>
$jeoStyle = $jeoClass0-&gt;getStyle("*");<br>
$jeoStyle-&gt;color-&gt;setRGB(0,255,0);<br>
<br>
$map_pt = click2map($_GET['image_x'],$_GET['image_y'],$map-&gt;extent);<br>
//Create the point<br>
$pt = ms_newPointObj();<br>
$pt-&gt; setXY($map_pt[0],$map_pt[1]);<br>
<br>
$img = $map-&gt;draw();<br>
$layer = $map-&gt;getLayerByName('fay');<br>
$url = $img-&gt;saveWebImage();<br>
<br>
?&gt;<br>
&nbsp;&lt;HTML&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&lt;HEAD&gt;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;TITLE&gt;Example 1: Displaying a map&lt;/TITLE&gt;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&lt;/HEAD&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&lt;BODY&gt;<br>
&lt;form method="get" action="query2.php" &gt;<br>
&nbsp;&nbsp; &lt;input style="border:thin solid black;" type="image" <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name="image" src="&lt;?php echo $url?&gt;"&nbsp; &gt; <br>
&lt;/form&gt;<br>
&lt;/BODY&gt;<br>
&nbsp;&lt;/HTML&gt;<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
query2 .php:<br>
-------------<br>
&lt;?<br>
&nbsp; print_r($_GET);<br>
&nbsp; print_r($x_map);<br>
&nbsp; print_r($x_map2); <br>
&nbsp; echo $HTTP_GET_VARS['dene'];<br>
&nbsp;?&gt;<br>
</small>--------------------<br>
I only get image's coordinates. But&nbsp; 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>