Re: [OpenMap Users] ESRI Layers, not showing attributes

From: Don Dietrick <dietrick_at_bbn.com>
Date: Wed, 29 Jun 2005 15:31:37 -0400

Hi Rick,

The com.bbn.openmap.dataAccess.shape.DrawingAttributesUtility knows
how to set the DrawingAttributes on EsriGraphics from an
EsriGraphicList (OMGraphicList) if you have a dbf file with those
attributes. The EsriPlugIn uses the DrawingAttributesUtility, but it
looks like the EsriLayer didn't get that upgrade. You can move that
code over to the EsriLayer to get that functionality.

- Dn


On Jun 29, 2005, at 2:15 PM, Rick Lane wrote:

> Don,
>
> Thanks for the reply.
>
> I guess what I'm asking is, how does OpenMap import a "Shape File with
> Attributes" from the supplied GUI, and what might be different (or
> done in
> addition to) using the default ESRILayer constructor like I'm doing.
> Clearly OpenMap doesn't *know* what colors to make the geometries
> (and so it
> can't do it manually), it's reading them from the .dbf-- how do I
> go about
> this?
>
> Thanks again,
> Rick
>
> -----Original Message-----
> From: Don Dietrick [mailto:dietrick_at_bbn.com]
> Sent: Wednesday, June 29, 2005 2:09 PM
> To: Rick Lane
> Cc: openmap-users_at_bbn.com; vinilo_at_cancerbero.org
> Subject: Re: [OpenMap Users] ESRI Layers, not showing attributes
>
> Hi Rick,
>
> On Jun 29, 2005, at 1:24 PM, Rick Lane wrote:
>
>
>> Rubén,
>>
>> Thanks for the help, however there are two issues:
>>
>> 1) setDrawingAttributes is a member of ShapeLayer, not ESRILayer
>>
>> 2) *somewhere* (I'm thinking in the .dbf file) these colors and other
>> attributes are stored, because when I go through the standard
>> OpenMap-way of
>> importing the shape files through the UI, the colors are correct. I
>> shouldn't have to do it manually.
>>
>
>
> The .dbf isn't expected to specifically contain colors and rendering
> attributes, it is only expected to contain general attributes about
> the geometries contained in the .shp file.
>
> The DrawingLayer (or to be more precise, the EsriShapeExport object),
> having nothing else to put in the dbf file by default when it saves
> it's OMGraphics into a Shape file, just goes ahead and loads the
> colors and stroke info into the dbf file. If the EsriGraphicList is
> used to read it back in, it does a cursory check to see of the column
> header names contain the color info, and sets those values on the
> OMGraphics if it can. That's all extra stuff over what's expected
> out of the generic Shape format.
>
> For a generic Shape file, you'll have to set the DrawingAttributes
> object to have the colors/stroke you want.
>
> - Don
>
>
>
>
>>
>> Rick
>>
>> -----Original Message-----
>> From: Rubén Ruiz [mailto:vinilo_at_cancerbero.org]
>> Sent: Wednesday, June 29, 2005 1:04 PM
>> To: 'Rick Lane'
>> Subject: RE: [OpenMap Users] ESRI Layers, not showing attributes
>>
>> Properties p = new Properties();
>> p.put("LiceColor","FFAABBCC");
>> ...
>> ...
>> layer.setDrawingAttributes(p);
>>
>> Hope this helps..
>> Rubén Ruiz.
>>
>> -----Mensaje original-----
>> De: owner-openmap-users_at_bbn.com [mailto:owner-openmap-
>> users_at_bbn.com] En
>> nombre de Rick Lane
>> Enviado el: miércoles, 29 de junio de 2005 18:08
>> Para: openmap-users_at_bbn.com
>> Asunto: [OpenMap Users] ESRI Layers, not showing attributes
>>
>> Hello,
>>
>> I'm trying to load a shape file with attributes at runtime, without
>> going
>> through the built-in "add layer" menu included with OpenMap. I
>> have a dbf,
>> shp, and shx file, and when using the aforementioned "add layer"
>> method, it
>> works fine, but whenever I create an ESRILayer object, it seems the
>> graphics
>> draw, but some of the attributes (such as color) are not preserved
>> (everything is black).
>>
>> String dbf = "c:/EEE1Lines.dbf";
>> String shp = "c:/EEE1Lines.shp";
>> String shx = "c:/EEE1Lines.shx";
>> EsriLayer layer = new EsriLayer("Thinger",
>> dbf,
>> shp,
>> shx,
>> DrawingAttributes.DEFAULT);
>>
>> Is there a step I'm missing?
>>
>> Thanks,
>> Rick
>>
>> --
>> [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"]
>>
>>
>>
>>
>> --
>> [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"]
>>
>>
>
>

--
[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 Wed Jun 29 2005 - 15:32:53 EDT

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