<br><br>
<div><span class="gmail_quote">On 12/2/05, <b class="gmail_sendername">Luis Treviņo</b> &lt;<a href="mailto:ltrevino@gpobsi.com.mx">ltrevino@gpobsi.com.mx</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi!<br><br>I want to display the position of the mouse (lat/long) while it is over my<br>map and the exact position of the mouse when the map is clicked. Could
<br>anybody help me with this?<br><br>Thanks in advance.<br><br>Luis<br></blockquote></div>
<div><br>I am pretty sure the standard mouse coordinate display function is something like this:</div>
<div>&nbsp;</div>
<div><font size="2">
<p>function mapplet_mouse_moved(name,x,y) </p>
<p>{</p>
<p>with (Math)</p>
<p>{</p>
<p>tempstring = document.mapserv.mapsize.value;</p>
<p>mapsizeArray = tempstring.split(&quot; &quot;);</p>
<p>if (document.mapserv.imgext.value != '')</p>
<p>{</p>
<p>tempstring = document.mapserv.imgext.value;</p>
<p>imgextArray = tempstring.split(&quot; &quot;);</p>
<p>}</p>
<p>if (imgextArray)</p>
<p>{</p>
<p>coordx = imgextArray[0]*1+(x*(imgextArray[2]-imgextArray[0])/mapsizeArray[0]);</p>
<p>coordy = imgextArray[3]*1-(y*(imgextArray[3]-imgextArray[1])/mapsizeArray[1]);</p>
<p>}</p>
<p>else</p>
<p>{</p>
<p>coordx = '';</p>
<p>coordy = '';</p>
<p>}</p>
<p>window.status = &quot;WGS-84 UTM X: &quot; + round(coordx) + &quot; Y: &quot; + round(coordy);</p>
<p>}</p>
<p>}</p>
<p>function mapplet_mouse_exited(name)</p>
<p>{</p>
<p>window.status=&quot;&quot;;</p>
<p>}</p>
<p>&nbsp;</p>
<p>We use this in our mapplet (java)&nbsp;based mapserver sites.</p>
<p>As far as displaying the coodinate when clicked, you just need to add a tool that passes the coordx and coordy values to a new window or something like that.</p>
<p>Good Luck</p>
<p>-Mike</p></font></div>