On Friday, April 25, 2003, at 02:18 PM, Aaron Pestel wrote:
> Hello,
>
> I've been working with OpenMap for about a week now. We have been
> migrating a web based application that used to use ObjectFX. The
> transition has been smoother than I expected. The FAQs and mailing
> list archives have been a great help.
We're glad to hear that.
> My question is this:
>
> How can a VPF feature (specifically point and edge) be customized
> beyond just the line and fill color? For example, we would like to
> display an airport VPF entity point feature using the icon of an
> airplane. We would also like to display a railroad VPF edge feature
> with a customized line such as: +++++++++++++++++
>
> What is the best way of doing this sort of thing with OpenMap?
The rendering of VPF features is set up in the
VPFLayerGraphicWarehouse. The VPFLayer is set up to use specific
warehouses with certain data types, but you can extend the warehouse to
create OMGraphics with the drawing attributes you want. The warehouse
does get a chance to parse attributes, so you can pass a list of image
URLs to use for points, for instance, and use OMScalingIcons for point
locations instead of OMPoints.
I think you have a couple of options for the edge rendering. You can
create a Stroke object for the pattern you want (I'm not quite sure of
the details of how to do that) and just set that Stroke in the
OMGraphic. The other way is to use the ShapeDecorator code that was
recently submitted and now available in the 4.6 beta release
(com.bbn.openmap.omGraphics.awt package). There are a couple of
examples in com.bbn.openmap.omGraphics.meteo.
Hope this helps,
Don
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [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 Sat Apr 26 09:14:11 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:35 EDT