Hi Tri,
The OMBitmap isn't being attached to anything, so nothing can paint it
to the map. You need to work within a layer to manage your OMGraphics.
You should examine the RouteLayer.java file for a simple example of a
Layer, or even the com/bbn/openmap/layer/DemoLayer.java. When you look
at a Layer, first look at the paint() method so you see how graphics
are being held and managed to end up on the map. The paint() method
gets called by the Swing thread after you call repaint() on the layer,
so you don't call it directly. After you figure out how the graphics
are being held (usually with an OMGraphicList), you should look at the
projectionChanged() method to see how graphics are added to the
OMGraphicList, with generated being called on them before repaint() is
called.
Sometimes, in simple layers, the OMGraphics are added to a list in the
constructor of the layer. It all depends on what the requirements are
for displaying the data.
Hope this helps,
Don
On Thursday, October 24, 2002, at 09:22 PM, Tri Tran wrote:
> Hi all,
>
> I'm trying to put a graphic on map, using
> com.bbn.openmap.examples.simple.SimpleMap2.java
>
> ...
> mapHandler.add(shapeLayer);
> // add an OMBitmap
> byte[] bytes = {0x11, 0x23, 0x22, 0x44};
> OMBitmap bm = new OMBitmap(-15.0f, 175.0f, 4, 4, bytes);
> bm.select();
> bm.generate(mapBean.getProjection());
> shapeLayer.repaint();
> ....
>
> But nothing seem to appear, I don't know if the OMBitmap is not
> correct or
> the redering part. all I want is to add a 4x4 symbol on a lat/long
> position.
>
> Thanks
>
> --
> [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"]
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Fri Oct 25 08:46:16 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT