Re: Query on OpenmapApplet with Link Server ...

From: PRADEEP RAMACHANDRAN <arpradeep@lycos.com>
Date: Fri May 25 2001 - 08:52:55 EDT

Hello Don,

Thanks for the hints ...

Here is what I did ...

Have modified the flow of control when a request arrives on the link to be as follows -
fetchGraphics( method as in ShapeLinkServer ) -> AreaLinkHandler.getGraphics(... ) -> AreaLinkHandler->RecordList(...)

The modified AreaHandler uses a LinkSpatialIndex, LinkGraphicList and LinkProperties in all its associated methods. getGraphics in AreaHandler now uses the LinkSpatialIndex object instead of SpatialIndex to locate records. In RecordList a LinkOMGraphicList is created with initial capacity/increment as 10/10. Here is what I have in RecordList ...

 int recNumber=rec.getRecordNumber();
 LinkOMGraphicList recList = new LinkOMGraphicList(10,10);

 recList.setFillPaint (drawParams.drawingAttributes.getFillPaint());
  if (drawParams != null){
    rec.addOMGraphics(recList, drawParams.drawingAttributes);
  } else {
     rec.addOMGraphics(recList, defaultDrawParams.drawingAttributes);
    }

 recList.setAppObject(new Integer(recNumber));
 return recList;

The list returned is added to a LinkOMGraphicList and written onto the link as ...
  
   lglist.addOMGraphic(RecordList(records1[i], drawParams));
   ESRILinkRecord reclink;
   try{
             if (records1[i] instanceof ESRILinkRecord) {
          reclink = (ESRILinkRecord)records1[i];
          reclink.writeLinkGraphics(lgl, properties);
        }
   } catch(IOException ex) {
       if (Debug.debugging("shape")) {
          ex.printStackTrace();
       }
     }

The properties that I have in the properties file are similar to those that would be set for an AreaShapeLayer( keyIndex, areas, fillColor etc. ), with the exception of the shpfile and the indexfile ... the display continues to come up without the color settings ...

Could you please let me know what I have missed ... ?!!

Regards,
Pradeep.

--
On Wed, 23 May 2001 14:07:24  
 Donald F. Dietrick wrote:
>Hi Pradeep,
>
>In order to get defined areas to work for a LinkServer, modifications
>will have to be made to the ShapeLinkServer - right now it contains a
>reference to a LinkSpatialIndex, which is an extension to the
>SpatialIndex in the shape package.  You might have to write a
>AreaShapeLinkServer, that uses an AreaHandler instead, modified in the
>same way that the LinkSpatialIndex was modified to use the link to write
>graphics onto, instead of creating OMGraphics.
>
>  The ShapeLinkServer/ShapeServerStarter would have >to be extended/modified so that it is launched with a >properties file containing the DrawingAttributes >properties for the areas.  You could
>also have it contain the shape and spatial index file >properties in it,too, since the drawing attributes >depend on those.
>
>If you want the client to have some control over the drawing attributes,
>you could add code to use the link request properties to reset some of
>those values when they come in.
> 
>
>- Don
>
Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri May 25 08:54:26 2001

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT