Hi Don, I am missing something.....I have tryied what you suggest me...but I get a ClassCastException error (java.lang.String cannot be cast to java.lang.Double) on the Rule added to the DbfHandler i think that the wrong (...or probably i haven't fully understand the whole process...) is
if (!(key instanceof String)) {
java.text.DecimalFormat df = new java.text.DecimalFormat();
DecimalFormatSymbols dfs = new DecimalFormatSymbols(Locale.ENGLISH);
df.setDecimalFormatSymbols(dfs);
try {
key = new Double(df.parse((String) key).doubleValue());
} catch (java.text.ParseException pe) {
}
}
at DbfHandler row 751
probably the correct test is if (key instanceof String)
I have also tryied to put on the val property an explicit float value example 10f or 10.00
However now i try to change the code into the DbfHandler and I will let you know if it works.
Another question. What is the main difference about using ShapeLayer, EsriShapeLayer and EsriPlugin?
Alessio Iannone
Software Engineer
Mobile: 39 329 8834960
Email: alessio.iannone_at_nextant.it
IM: quonn77_at_hotmail.com (AIM)
http://www.linkedin.com/in/alessioiannone
Web sites of the Martial Arts I play
Nextant - Navcomm Applications
Via Alessandro Noale
See who we know in common Want a signature like this?
----- Messaggio originale -----
Da: Don Dietrick <dietrick@bbn.com>
A: Alessio Iannone <alessio_iannone@yahoo.it>
Cc: OpenMapUsers <openmap-users@bbn.com>
Inviato: Venerdì 22 febbraio 2008, 21:37:01
Oggetto: Re: [OpenMap Users] ESRI Shape File draw roads with different sizes
Hi Alessio,
If you use the OpenMap 4.6.4 beta, you can do this in the properties
file for the ShapeLayer, here's an example of what the properties look
like:
neroads.class=com.bbn.openmap.layer.shape.ShapeLayer
neroads.prettyName=Roads
neroads.shapeFile=/data/shape/usa/neroads/MajorHighwysNE.shp
neroads.mouseModes=Gestures
neroads.rules=rule0 rule1
neroads.maxScale=1000000f
neroads.rule0.key=CLASS_RTE
neroads.rule0.op=lt
neroads.rule0.val=2
neroads.rule0.label=PREFIX PRETYPE NAME TYPE SUFFIX
neroads.rule0.label.maxScale=1000000
neroads.rule0.render=true
neroads.rule0.render.maxScale=1000000
neroads.rule0.lineColor=FFFA73
neroads.rule0.lineWidth=4
neroads.rule0.mattingColor=55AAAAAA
neroads.rule1.key=CLASS_RTE
neroads.rule1.op=all
neroads.rule1.label=PREFIX PRETYPE NAME TYPE SUFFIX
neroads.rule1.label.maxScale=200000
neroads.rule1.render=true
neroads.rule1.render.maxScale=500000
neroads.rule1.lineColor=FFFFFF
neroads.rule1.lineWidth=3
neroads.rule1.mattingColor=55AAAAAA
For the .key and .label properties, those values are column names of
the dbf file. For more details about the rules, check out the
javadocs for the com.bbn.openmap.dataAccess.shape.DbfHandler.
OpenMap 4.6.4 will be released very shortly.
You also have the option of looking in the DbfTableModel row contents,
and setting the line width on the OMGraphic in the corresponding
EsriGraphicList. The order of the objects in the two components are
the same and the entries match up.
Hope this helps,
Don
On Feb 22, 2008, at 6:38 AM, Alessio Iannone wrote:
> Hi all i have a Tele Atlas Shape File (It is a network of road of
> rome) that i am assuming that could be readed by the
> EsriLayer....infact it is readed by both ShapeLayer and
> EsriLayer....now what I am trying to do is to let the EsriLayer or
> ShapeLayer reading the FRC field of the
> associated dbf in order to let draw roads with differente line
> width...it is possible? How can I do this?
>
> Best Regards
>
> Alessio Iannone
> Software Engineer
>
> Mobile: 39 329 8834960
> Email: alessio.iannone@nextant.it
>
IM: quonn77@hotmail.com (AIM)
> http://www.linkedin.com/in/alessioiannone
> Web sites of the Martial Arts I play
>
> Nextant - Navcomm Applications
> Via Alessandro Noale
> See who we know in common
> Want a signature like this?
>
>
> L'email della prossima generazione? Puoi averla con la nuova Yahoo!
> Mail
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
[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"]
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:
http://it.docs.yahoo.com/nowyoucan.html
--
[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 Tue Feb 26 2008 - 06:29:31 EST