<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18939"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV><SPAN class=274422621-07092010><FONT color=#0000ff><FONT face=Arial><FONT
size=2><FONT color=#000000>I am having a slight issue with my below code. I am
trying to filter based on the name of my Layer so that only specific layers will
appear in my layertree/layercontainer. I have a problem because I have two
layers, one is called <STRONG>Rural Block Line</STRONG> and the other is called
simply <STRONG>Block Line. </STRONG>My problem is since I am adding the layer
using a loader/filter function that says -</FONT> </FONT></FONT>
<P><FONT size=2><FONT face=Arial>myarr[1] = record.</FONT><FONT face=Arial><FONT
color=#0000ff><FONT color=#0000ff>get</FONT></FONT>(<FONT color=#a31515><FONT
color=#a31515>"layer"</FONT></FONT>).name.indexOf(<FONT color=#a31515><FONT
color=#a31515>"Rural Block Line"</FONT></FONT>);<SPAN
class=274422621-07092010> </SPAN></FONT></FONT></P><FONT size=2><FONT
face=Arial><SPAN class=274422621-07092010><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>
<P>if</FONT></FONT><FONT size=2><FONT color=#000000>(myarr[0]==-1 &&
myarr[1]==-1 )</FONT></P>
<P>{</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>return</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>false</FONT></FONT><FONT size=2>;</P>
<P>}</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>else</P></FONT></FONT><FONT size=2>
<P>{</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>return</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>true</FONT></FONT><FONT size=2>;</P>
<P>}</P>
<P></FONT> </SPAN></P></FONT></FONT>
<P><FONT size=2><FONT face=Arial><SPAN class=274422621-07092010><FONT
color=#000000>This not only gets the layer called Rural Block Line but also
Block Line, which I do not want. Is there any other way I can rewrite this
filter so that it matches my name exactly or do I have to go through everything
and change names so that nothing has a similar name? Appreciate any assistance
and hope I was clear about my
issue.</FONT></SPAN></P></FONT></FONT></FONT></SPAN></DIV>
<DIV><P><HR>
This e-mail is intended for the original recipient(s) only. If you have received it in error, please advise the sender and delete this message.
</P></DIV>
</BODY></HTML>