Hi Vishal,

take this sample code

Dim pt1 As mapxlib.Point, pt2 As New mapxlib.Point
Dim pts As New mapxlib.Points
Dim ftr As mapxlib.Feature
Dim st As mapxlib.Style

   Set st = Map1.Layers(<your target layer>).Style
   st.SymbolType = 0
   st.SymbolFontColor = 255
   st.SymbolFont.Size = 15
   Set pt1 = Map1.ConvertCoordP(x1, y1, miScreenToMap)  'points taken from
clicks on map
   Set pt2 = Map1.ConvertCoordP(x2, y2, miScreenToMap)  'points taken from
clicks on map

   ' you can aslo set a specific point of your choice
   Map1.Layers(<your target layer>).Editable = True

   pts.Add pt2  ' add to the points object
   pts.Add pt1  ' add to the points object

   'create the new line object
   Set ftr = Map1.FeatureFactory.CreateLine(pts)
   ftr.Style.LineStyle = 11
   Map1.Layers(>your target layer>).AddFeature ftr

I hope this will help you in understanding the code to create line.

cheers,

Ani

-----Original Message-----
From: Vishal Sharma [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 10:07 AM
To: [EMAIL PROTECTED]
Subject: MI-L Urgent (CreateLine)


Hello There

I am using VB 6, Oracle8i, MapX 5.0. I am new to this MapX 5.0 tool.

Could anybody please give me a sample code in VB using MapX 5.0 of

How to draw a line on map using FeatureFactory.Createline and update it with
other attributes in oracle 8i table?

Thanx in advance

HFCL
Vishal Sharma




---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 5785

Reply via email to