<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=308174213-20052009><FONT face=Arial color=#0000ff size=2>Paul, 
</FONT></SPAN></DIV>
<DIV><SPAN class=308174213-20052009><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=308174213-20052009><FONT face=Arial color=#0000ff size=2>I 
would guess that this really is about the client-side map interface and not 
about MapServer.&nbsp; Does your interface only allow them to click/select the 
topmost layer?&nbsp; Do you pick which layer is selectable?&nbsp; Do you let 
them pick which layer is selectable?&nbsp; Is it random?&nbsp; 
</FONT></SPAN></DIV>
<DIV><SPAN class=308174213-20052009><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=308174213-20052009><FONT face=Arial color=#0000ff size=2>Tells 
us more about the client-side app.</FONT></SPAN></DIV>
<DIV><SPAN class=308174213-20052009><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=308174213-20052009><FONT face=Arial color=#0000ff 
size=2>David.</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
  mapserver-users-bounces@lists.osgeo.org 
  [mailto:mapserver-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>Paul 
  james<BR><B>Sent:</B> Wednesday, May 20, 2009 7:55 AM<BR><B>To:</B> 
  mapserver-users@lists.osgeo.org<BR><B>Subject:</B> Re: [mapserver-users] Get 
  the nearest layer with mapscript...<BR><BR></FONT></DIV>Thanks Pano...<BR>But 
  It´s not that simple...<BR>What I need is figure out what LAYER was clicked... 
  <BR><BR>Paul<BR><BR>
  <DIV class=gmail_quote>On Wed, May 20, 2009 at 6:43 AM, Pano Voudouris <SPAN 
  dir=ltr>&lt;<A 
  href="mailto:pvoudouris@gaiocorp.com">pvoudouris@gaiocorp.com</A>&gt;</SPAN> 
  wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV lang=EN-US vlink="purple" link="blue">
    <DIV>
    <P><SPAN style="FONT-SIZE: 9pt; COLOR: rgb(31,73,125)">Probably don’t 
    understand what exactly you are trying to achieve here but it is not as 
    simple as map.getLayer(0) to get the topmost layer? And once you have the 
    layer object use one of the query function to select the record? E.g.&nbsp; 
    myLayerObj.queryByPoint ?</SPAN></P>
    <P><SPAN style="FONT-SIZE: 9pt; COLOR: rgb(31,73,125)"></SPAN>&nbsp;</P>
    <P><SPAN style="FONT-SIZE: 9pt; COLOR: rgb(31,73,125)">Pano</SPAN></P>
    <P><SPAN style="FONT-SIZE: 9pt; COLOR: rgb(31,73,125)"></SPAN>&nbsp;</P>
    <DIV 
    style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(181,196,223) 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
    <P style="MARGIN-LEFT: 36pt"><B><SPAN 
    style="FONT-SIZE: 10pt">From:</SPAN></B><SPAN style="FONT-SIZE: 10pt"> <A 
    href="mailto:mapserver-users-bounces@lists.osgeo.org" 
    target=_blank>mapserver-users-bounces@lists.osgeo.org</A> [mailto:<A 
    href="mailto:mapserver-users-bounces@lists.osgeo.org" 
    target=_blank>mapserver-users-bounces@lists.osgeo.org</A>] <B>On Behalf Of 
    </B>Paul james<BR><B>Sent:</B> 19 May 2009 21:46<BR><B>To:</B> <A 
    href="mailto:mapserver-users@lists.osgeo.org" 
    target=_blank>mapserver-users@lists.osgeo.org</A><BR><B>Subject:</B> 
    [mapserver-users] Get the nearest layer with mapscript...</SPAN></P></DIV>
    <DIV>
    <DIV></DIV>
    <DIV class=h5>
    <P style="MARGIN-LEFT: 36pt">&nbsp;</P>
    <P style="MARGIN-LEFT: 36pt">Hello guys...<BR>I have several layers (lines, 
    points, poly) ...<BR>I´m developing a <SPAN><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black">measure tool... User can click on map 
    and I have to select that layer to calculate de Area with 
    postgis...</SPAN></SPAN><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"><BR><BR><SPAN></SPAN></SPAN></P>
    <P style="MARGIN-LEFT: 36pt"><SPAN><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black">I´m trying to do that WITHOUT using 
    "LAYER ACTIVE SYSTEM"...</SPAN></SPAN><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"><BR><BR><SPAN></SPAN></SPAN></P>
    <P style="MARGIN-LEFT: 36pt"><SPAN><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black">Is That possible using mapscript? How 
    Can I find the nearest and toppest layer ?</SPAN></SPAN><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"><BR><BR><SPAN>Thanks!</SPAN><BR><BR><SPAN>Paul</SPAN></SPAN></P></DIV></DIV></DIV></DIV><BR>_______________________________________________<BR>mapserver-users 
    mailing list<BR><A 
    href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR><A 
    href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" 
    target=_blank>http://lists.osgeo.org/mailman/listinfo/mapserver-users</A><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>