Re: [OpenMap Users] on demand raster layer

From: Luigi Trevisant <luitre_at_email.it>
Date: Thu, 12 Jan 2006 10:04:18 +0000

I've implemented something similar in this way

Let url be the URL of the selected file.
I've the easy class ImmaginePlugIn, that simply puts the image in the
upper left corner, obviously you have to add it to a layer

Tell me if you want something different....


package com.bbn.openmap.plugin;

import java.awt.*;
import java.net.*;
import javax.swing.*;
import com.bbn.openmap.omGraphics.*;
import com.bbn.openmap.proj.*;

/**

* _at_author Luigi Trevisant
* _at_version 1.0
*/

public class ImmaginePlugIn extends AbstractPlugIn{
    ImageIcon ii;
    URL url;
    OMRaster omr;

    public ImmaginePlugIn(URL url) {
        this.url = url;
        ii = new ImageIcon(url);
       /*
          This plugin doesn't extend the image to fit the map area.
           It simply puts the image in the upper left corner
       */
        if(ii != null)
            omr = new OMRaster(1,1,ii);

    }


    public OMGraphicList getRectangle(Projection p) {
        OMGraphicList list = new OMGraphicList();

        if(omr != null){
           list.add(omr);
           list.generate(p);
        }



        return list;
    }
}




Raghu ha scritto:

>hello,
> it is from a FileChooser .
>
>- Raghu
>--- Luigi Trevisant <luitre_at_email.it> wrote:
>
>
>
>>With "on demand" you mean selecting from a
>>FileChooser or something similar?
>>
>>Raghu ha scritto:
>>
>>
>>
>>>hello ,
>>>Is anybody experimented displaying the raster
>>>
>>>
>>layer
>>
>>
>>>on demand. pl let me know.
>>>thx in advance .
>>>
>>>
>>>regards
>>>Raghu
>>>
>>>Raghu (Raghavendra K)
>>>Scientist , ADRIN(DOS,ISRO),
>>>203,AKBAR ROAD , TARBUND , MANOVIKAS NAGAR ,
>>>
>>>
>>SECUNDERABAD .
>>
>>
>>>Mob: 91-9440563501
>>>OFF : 91-040-27781234
>>>
>>>__________________________________________________
>>>Do You Yahoo!?
>>>Tired of spam? Yahoo! Mail has the best spam
>>>
>>>
>>protection around
>>
>>
>>>http://mail.yahoo.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"]
>>
>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Email.it, the professional e-mail, gratis per te:
>>http://www.email.it/f
>>
>> Sponsor:
>> Cartucce, toner, ricariche...scegli a chi
>>rivolgerti per la tua stampante. Clicca qui
>> Clicca qui:
>>
>>
>>
>http://adv.email.it/cgi-bin/foclick.cgi?mid=4198&d=11-1
>
>
>>--
>>[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"]
>>
>>
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
>


 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Vuoi proteggere la tua casa? Chiedi a Ras come, clicca e fai un preventivo online!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=4028&d=12-1

--
[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 Thu Jan 12 2006 - 04:09:10 EST

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