[Geomoose-users] Remove drawing tool layer from service without closing service tab.
Dan Little
danlittle at yahoo.com
Mon Jul 8 07:13:31 PDT 2013
That's going to break when you add or remove layers.
This will be more reliable:
Application.getMapSource('NAME_OF_YOUR_LAYER')._ol_layer.removeAllFeatures();
Not the cleanest, but it will not break when you change your layers around.
>________________________________
> From: Luis Calisto <luis.calisto at hotmail.com>
>To: Dan Little <danlittle at yahoo.com>; "geomoose-users at lists.osgeo.org" <geomoose-users at lists.osgeo.org>
>Sent: Wednesday, July 3, 2013 9:33 AM
>Subject: RE: [Geomoose-users] Remove drawing tool layer from service without closing service tab.
>
>
>
>
>Hi,
>
>
>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();
>
>
>but this code is not the most beautifull solution! what do you thing?
>
>
>thanks!
>Luís
>
>
>
>
>
>
>
>
>
>________________________________
>Date: Mon, 1 Jul 2013 11:04:07 -0700
>From: danlittle at yahoo.com
>Subject: Re: [Geomoose-users] Remove drawing tool layer from service without closing service tab.
>To: luis.calisto at hotmail.com; geomoose-users at lists.osgeo.org
>
>
>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.
>
>
>I'd love to see the code for anything you work out! Thanks!
>
>
>
>>________________________________
>> From: Luis Calisto <luis.calisto at hotmail.com>
>>To: Dan Little <danlittle at yahoo.com>; "geomoose-users at lists.osgeo.org" <geomoose-users at lists.osgeo.org>
>>Sent: Monday, July 1, 2013 12:44 PM
>>Subject: RE: [Geomoose-users] Remove drawing tool layer from service without closing service tab.
>>
>>
>>
>>
>>Hi
>>
>>
>>yes, want to disable drawing on the map but keep up the tab. Is it possible?
>>
>>
>>Thanks in advance
>>
>>
>>Luís Calisto
>>
>>
>>
>>
>>
>>
>>________________________________
>>Date: Mon, 1 Jul 2013 10:31:16 -0700
>>From: danlittle at yahoo.com
>>Subject: Re: [Geomoose-users] Remove drawing tool layer from service without closing service tab.
>>To: luis.calisto at hotmail.com; geomoose-users at lists.osgeo.org
>>
>>
>>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.
>>
>>
>>Are you trying to disable drawing on the map but keep up a tab?
>>
>>
>>
>>>________________________________
>>> From: Luis Calisto <luis.calisto at hotmail.com>
>>>To: "geomoose-users at lists.osgeo.org" <geomoose-users at lists.osgeo.org>
>>>Sent: Friday, June 28, 2013 1:18 PM
>>>Subject: [Geomoose-users] Remove drawing tool layer from service without closing service tab.
>>>
>>>
>>>
>>>
>>>Hello all,
>>>
>>>
>>>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?
>>>
>>>
>>>anyone tried this?
>>>
>>>
>>>Thank you
>>>_______________________________________________
>>>Geomoose-users mailing list
>>>Geomoose-users at lists.osgeo.org
>>>http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>>
>>>
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130708/64ed0890/attachment.html>
More information about the Geomoose-users
mailing list