Re: [OpenMap Users] erasing graph

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 1 Aug 2008 10:12:53 -0400

If you want to get rid of all the images on your layer, just call
clear() on the OMGraphicList for your layer and then call repaint() on
your layer.

If you want to hide the OMGraphics on your layer, you can set the
visibility of the OMGraphics to false. This allows you to bring them
back later if you want. It depends on what you want to do.

- Don



On Jul 31, 2008, at 1:11 PM, nmy wrote:

>
> Hi Don;
>
> Actually I create a class like RouteLayer in "Crew" example and I
> call this
> class to draw graphs and some images(gif).So to erase all of this
> images, I
> thought that I have to make map to be redrawn on route layer but
> this would
> be wrong.But then I found some functions , these are :
> -routelayer[i].setVisible(false);
> -routelayer[i].hide();
> -layerHandler.turnLayerOn(false,rlayer[i]);
>
> I used the last one . It worked for a few times , than it didnt. I
> mean it
> couldnt hide the routelayer as whole.(Here I create a RouteLayer
> array to
> hold the tracks then I called them to clear.)
>
> I can send some part of the code:
>
> private void clearProc(){
> while(i>=0){
> layerHandler.turnLayerOn(false,rlayer[i]);
> i--;
> }
> }
>
>
>
> Thank you...
>
>
>
>
>
>
>
> Donald Dietrick wrote:
>>
>> Hi nmy,
>>
>> I don't understand how you are putting images on the map. What
>> kind of
>> layer are you using? Are you trying to erase them programmatically
>> or
>> by using mouse clicks for selection?
>>
>> Are the other layers on top of your images? Do you need to move your
>> image layer to the top?
>>
>> Are you using the standard OpenMap application, or have you created
>> your
>> own using OpenMap parts?
>>
>> - Don
>>
>> nmy wrote:
>>> I mean that I put some images(plane) on map and after that want to
>>> erase
>>> all
>>> of them. But I realized that
>>> if I first create the shape layer and then the routelayer ,
>>> image(fighter.gif) cant be seen or some parts of it can be seen.I
>>> thought
>>> that to do erasing process I must first call the shape layer and
>>> recreate.But then I thought it does not work , somebody having any
>>> ideas
>>> ?
>>>
>>>
>>>
>>>
>>>
>>>
>>> nmy wrote:
>>>
>>>> Hi;
>>>>
>>>> I try to erase every images and graphs (at the same time) that I
>>>> created
>>>> on map but I couldn't do what I want on map. Can you suggest me
>>>> some
>>>> ideas?
>>>>
>>>> Thank you for helping.
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
>> with the following text in the BODY of the message "unsubscribe
>> openmap-users"]
>>
>>
>
> --
> View this message in context: http://www.nabble.com/erasing-graph-tp18717085p18759232.html
> Sent from the OpenMap mailing list archive at Nabble.com.
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Aug 01 2008 - 10:13:17 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT