hi,everyone
> I want to generate a rectangle that own 2000 meter width and 1000 meter height.
> I used the function Length.METER.toRadians,but finnally I got a rectangle whose width is 15 meters and height is 35 meters.
> y???
> any reply will be appreciated.
> fllow my code:
> /********************************************************************************
> public OMGraphicList createGraphics (OMGraphicList graphics) {
> OMLine line;
>
> graphics.clear();
>
> /
/create a rectange that own width 2000 M and height 1000M
>
//and center at beijing site
> float centerX = 39.5622f;
> float centerY = 116.2422f;
>
//bottom line
> line = createLine(centerX - Length.METER.toRadians(1000f),
> centerY - Length.METER.toRadians(500f),
> centerX + Length.METER.toRadians(1000f),
> center!
!
Y - Length.METER.toRadians(500f),
> OMGraphic.LINETYPE_STRAIGHT,
> Color.red, Color.yellow);
> line.setAppObject(new Integer(10));
> graphics.addOMGraphic(line);
>
//right line
> line = null;
> line = createLine(centerX + Length.METER.toRadians(1000f),
> centerY - Length.METER.toRadians(500f),
> &n!
!
bsp; centerX + Length.METER.toRadians(1000f),
> centerY + Length.METER.toRadians(500f),
> OMGraphic.LINETYPE_STRAIGHT,
> Color.green, Color.yellow);
> line.setAppObject(new Integer(20));
> graphics.addOMGraphic(line);
>
//top line
> line = null;
> line = createLine(centerX - Length.METER.toRadians(1000f),
> centerY + Length.METER.toRadians(500f),
> centerX + Length.METER.toRadians(1000f),
> centerY + Length.METER.toRadians(500f),
> &nbs!
!
p; OMGraphic.LINETYPE_STRAIGHT,
> Color.blue, Color.yellow);
> line.setAppObject(new Integer(30));
> graphics.addOMGraphic(line);
>
//left line
> line = null;
> line = createLine(centerX - Length.METER.toRadians(1000f),
> centerY - Length.METER.toRadians(500f),
> !
!
centerX - Length.METER.toRadians(1000f),
> centerY + Length.METER.toRadians(500f),
> OMGraphic.LINETYPE_STRAIGHT,
> Color.blue, Color.yellow);
> line.setAppObject(new Integer(40));
> graphics.addOMGraphic(line);
> return graphics;
> }
> *********!
!
***********************************************************************/
>
> thanx u in advance!
>
Content-type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit
_______________________________________________
空前赛事,异国之旅
加拿大C&C为您指点迷津
快来全情投入
e龙卡有奖推荐
精彩票务在线
柯达摄影乐园
--
[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 Thu May 16 22:52:59 2002