<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><span>That's going to break when you add or remove layers.</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>This will be more reliable:</span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color: transparent;"><span><font size="2"> Application.getMapSource('NAME_OF_YOUR_LAYER')._ol_layer.removeAllFeatures();</font><br></span></div><div
 style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; font-style: normal;"><span><font size="2"><br></font></span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;"><span><font size="2">Not the cleanest, but it will not break when you change your layers around.</font></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Luis Calisto <luis.calisto@hotmail.com><br>
 <b><span style="font-weight: bold;">To:</span></b> Dan Little <danlittle@yahoo.com>; "geomoose-users@lists.osgeo.org" <geomoose-users@lists.osgeo.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, July 3, 2013 9:33 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> RE: [Geomoose-users] Remove drawing tool layer from service without
 closing service tab.<br> </font> </div> <div class="y_msg_container"><br><div id="yiv5610846964">

<style><!--
#yiv5610846964 .yiv5610846964hmmessage P
{
margin:0px;padding:0px;}
#yiv5610846964 body.yiv5610846964hmmessage
{
font-size:12pt;font-family:Calibri;}
--></style>
<div><div dir="ltr">Hi,<div><br></div><div>well for me its enough to remove the features from the drawing layer. I can do this  with the following javascript code: window.Map.layers[28].removeAllFeatures();</div><div><br></div><div>but this code is not the most beautifull solution! what do you thing? </div><div><br></div><div>thanks!</div><div><span style="font-size:12pt;">Luís</span></div><div><br></div><div><br></div><div><br></div><div><br><div><hr id="yiv5610846964stopSpelling">Date: Mon, 1 Jul 2013 11:04:07 -0700<br>From: danlittle@yahoo.com<br>Subject: Re: [Geomoose-users] Remove drawing tool layer from service without closing service tab.<br>To: luis.calisto@hotmail.com; geomoose-users@lists.osgeo.org<br><br><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div><span>Yes, but it's going to be a bit hacky, we don't have an API exposed to 'switch the
 tool'.  I looked around in the code and I don't see an easy/obvious answer.  </span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>I'd love to see the code for anything you work out! Thanks!</span></div><div><br><blockquote style="border-left:2px solid rgb(16, 16, 255);padding-left:5px;">  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Luis Calisto <luis.calisto@hotmail.com><br> <b><span style="font-weight:bold;">To:</span></b> Dan Little
 <danlittle@yahoo.com>; "geomoose-users@lists.osgeo.org" <geomoose-users@lists.osgeo.org> <br> <b><span style="font-weight:bold;">Sent:</span></b> Monday, July 1, 2013 12:44 PM<br> <b><span style="font-weight:bold;">Subject:</span></b> RE: [Geomoose-users] Remove drawing tool layer from service without
 closing service tab.<br> </font> </div> <div class="yiv5610846964ecxy_msg_container"><br><div id="yiv5610846964ecxyiv2523464235">

<style><!--
#yiv5610846964 .yiv5610846964ExternalClass #yiv5610846964ecxyiv2523464235 .yiv5610846964ecxyiv2523464235hmmessage P {
padding:0px;}

#yiv5610846964 .yiv5610846964ExternalClass #yiv5610846964ecxyiv2523464235 body.yiv5610846964ecxyiv2523464235hmmessage {
font-size:12pt;font-family:Calibri;}

--></style>
<div><div dir="ltr">Hi <div><br></div><div>yes, want to disable drawing on the map but keep up the tab. Is it possible?</div><div><br></div><div>Thanks in advance</div><div><br></div><div>Luís Calisto</div><div><br></div><div><br><br><div><hr id="yiv5610846964ecxyiv2523464235stopSpelling">Date: Mon, 1 Jul 2013 10:31:16 -0700<br>From: danlittle@yahoo.com<br>Subject: Re: [Geomoose-users] Remove drawing tool layer from service without  closing service tab.<br>To: luis.calisto@hotmail.com; geomoose-users@lists.osgeo.org<br><br><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div>Can you give a little more information? Some pictures? I think I need a bit more description to understand what you're trying to do.</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style:
 normal;">Are you trying
 to disable drawing on the map but keep up a tab?</div><div><br><blockquote style="border-left:2px solid rgb(16, 16, 255);padding-left:5px;">  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Luis Calisto <luis.calisto@hotmail.com><br> <b><span style="font-weight:bold;">To:</span></b> "geomoose-users@lists.osgeo.org" <geomoose-users@lists.osgeo.org> <br> <b><span style="font-weight:bold;">Sent:</span></b> Friday, June 28, 2013 1:18 PM<br> <b><span style="font-weight:bold;">Subject:</span></b> [Geomoose-users] Remove drawing tool layer from service without
        closing service tab.<br> </font> </div> <div class="yiv5610846964ecxyiv2523464235ecxy_msg_container"><br><div id="yiv5610846964ecxyiv2523464235ecxyiv8521457185">

<style><!--
#yiv5610846964 .yiv5610846964ExternalClass #yiv5610846964ecxyiv2523464235 .yiv5610846964ecxyiv2523464235ExternalClass #yiv5610846964ecxyiv2523464235ecxyiv8521457185 .yiv5610846964ecxyiv2523464235ecxyiv8521457185hmmessage P {
padding:0px;}

#yiv5610846964 .yiv5610846964ExternalClass #yiv5610846964ecxyiv2523464235 .yiv5610846964ecxyiv2523464235ExternalClass #yiv5610846964ecxyiv2523464235ecxyiv8521457185 body.yiv5610846964ecxyiv2523464235ecxyiv8521457185hmmessage {
font-size:12pt;font-family:Calibri;}


--></style>
<div><div dir="ltr">Hello all,<div><br></div><div>i'm creating some services and at the end i want to remove the drawing tool layer from service without closing service tab. Is it possible with javascript? </div><div><br></div><div>anyone tried this? </div><div><br></div><div>Thank you</div>                                    </div></div>
</div><br>_______________________________________________<br>Geomoose-users mailing list<br><a rel="nofollow" ymailto="mailto:Geomoose-users@lists.osgeo.org" target="_blank" href="mailto:Geomoose-users@lists.osgeo.org">Geomoose-users@lists.osgeo.org</a><br><a rel="nofollow" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/geomoose-users">http://lists.osgeo.org/mailman/listinfo/geomoose-users</a><br><br><br></div> </div> </div> </blockquote></div>   </div></div></div>                                        </div></div>
</div><br><br></div> </div> </div> </blockquote></div>   </div></div></div>                                     </div></div>
</div><br><br></div> </div> </div> </blockquote></div>   </div></body></html>