Don Dietrick wrote:
>
> On Friday, August 1, 2003, at 11:57 AM, Adam Russell wrote:
>
>> Adam Russell wrote:
>>
>>> I need to label regions on a map and place the labels according to
>>> the regions' lat/lon . What is the best way to go about doing this?
>>> Any examples out there?
>>> Thanks!!
>>>
>> I wasn't very specific here so let me say this:
>> Here I get an OMPoly from an EsriGraphicList
>>
>> File dbf = new File("data/shape/zt25_d00.dbf");
>> File sp = new File("data/shape/zt25_d00.shp");
>> File shx = new File("data/shape/zt25_d00.shx");
>> EsriLayer el=new EsriLayer("PUKE", dbf.toURL(),
>> sp.toURL(), shx.toURL());
>> EsriGraphicList egl=el.getGeometry(sp.toURL(),
>> shx.toURL());
>> OMPoly op=(OMPoly)egl.getOMGraphicAt(326);
>>
>> What I would really like is some sort of label for that polygon.
>> However, it seems I cannot just create a LabeledOMPoly at this point
>> because
>> the OMPoly I just grabbed from the EsriGraphicList doesn't know
>> anything about its lat/lon at this point, right?
>
>
> Actually, it does. You don't really have to create a LabeledOMPoly,
> you can create an OMText. You can create a separate OMGraphicList for
> OMTexts, if you want to control the labels separately and
> generate/render it accordingly.
>
OK, forgive me for possibly being dense here but why is it if I
put a couple of printlns in like so:
File dbf = new File("data/shape/zt25_d00.dbf");
File sp = new File("data/shape/zt25_d00.shp");
File shx = new File("data/shape/zt25_d00.shx");
EsriLayer el=new EsriLayer("PUKE", dbf.toURL(),
sp.toURL(), shx.toURL());
EsriGraphicList egl=el.getGeometry(sp.toURL(), shx.toURL());
OMPoly op=(OMPoly)egl.getOMGraphicAt(326);
System.out.println(op.getLat());
System.out.println(op.getLon());
The values ouputted for both lat/lon are 0? I am just trying to
get these so as to position the label.
>
>
>
-- [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 Wed Aug 6 11:29:57 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT