devprog_nc
Posts: 16
Joined: Wed Sep 13, 2006 3:32 pm
Location: New Caledonia

Shape is not visible

Tue Oct 13, 2009 3:51 am

Hi,

I would like to create shape only with code.
If I use long and lat, I can see the shape on my map.

But now, I can't see the shape on my map.

Maybe I make a mistake, but I don't find it.

Someone would help me please ?

Thank you
Tems

=================================


Dim color_background As Brush = New GpsViewNET.Brush
color_background.Blue = 255
color_background.Transparent = False

Dim color_border As Pen = New GpsViewNET.Pen
color_border.Red = 255

objShape(1) = New GpsShapeNET.Shape

Dim nodeDatumGrid As New GpsToolsNET.Position
nodeDatumGrid.Datum = GpsToolsNET.Datum.WGS_84 'modifié au lieu de 1

objMapShape = Map_Zone.NewMapShape(objShape(1))
objMapShape.Background = color_background
objMapShape.Border = color_border
objMapShape.Border.Width = 1
objMapShape.Background.Transparent = False

objMapShape.NodeTemplate = Nothing

Dim objposition_1(10) As GpsToolsNET.Position
For ia As Integer = 0 To 10
objposition_1(ia) = New GpsToolsNET.Position
objposition_1(ia).Grid = GpsToolsNET.Grid.UTM_SOUTH
Next

objposition_1(1).Northing = 7539560.07433687 : objposition_1(1).Easting = 642487.755393781
objposition_1(2).Northing = 7539492.2233826 : objposition_1(2).Easting = 646769.287314894
objposition_1(3).Northing = 7534228.38620658 : objposition_1(3).Easting = 646932.419847244
objposition_1(4).Northing = 7531673.29762993 : objposition_1(4).Easting = 644213.392522222
objposition_1(5).Northing = 7533704.79957455 : objposition_1(5).Easting = 642021.239643725
objposition_1(6).Northing = 7536527.12993528 : objposition_1(6).Easting = 642024.939118763
objposition_1(7).Northing = 7539560.07433687 : objposition_1(7).Easting = 642487.755393781


objShape(1).ShapeID = 10000

objShape(1).NewNode(-1)
objShape(1).Position = objposition_1(1)

objShape(1).NewNode(-1)
objShape(1).Position = objposition_1(2)

objShape(1).NewNode(-1)
objShape(1).Position = objposition_1(3)

objShape(1).NewNode(-1)
objShape(1).Position = objposition_1(4)

objShape(1).NewNode(-1)
objShape(1).Position = objposition_1(5)

objShape(1).NewNode(-1)
objShape(1).Position = objposition_1(6)

objShape(1).NewNode(-1)
objShape(1).Position = objposition_1(7)

Map_Zone.Update()

Return to “GpsTools”