المقصود ب اكسس هل هي
spatial database or non-spatial database

-

اعتقد ان هذا الملف مفيد فهو يشرح كيفية عمل تطبيق باستخدام ماب لوبجكت

http://sendinto.com/zx5x70fhdckq/mapobject.pdf.html


هذا الكود للربط مع mdb

Private Sub Command9_Click()

Dim tbl As New MapObjects2.Table
tbl.Database = "D:\Foremanv.foremanv dcidocuments\My Documents\MapObjects\SensorReplacement.mdb"
tbl.Database = "SensorReplacement.mdb"
tbl.Name = "Sensor Replacement"
Dim recs As MapObjects2.Recordset
Set recs = tbl.Records

كود Point

Dim currentPoint As Point3d
currentPoint = vertices(n)
Set pt = New MapObjects2.Point
/*currentPoint is a point of a element of microstation */
/* this part not work*/
pt.X = currentPoint.X
pt.Y = currentPoint.Y
poligono.Parts.Add (pt)
Next n


كود draw points on a map which will have the illusion of movement using VB in MapObject


code shown below:

'start of module level variable
Global lola00001(3, 1)
Global intCountingTimer As Integer
'end of module level variable

Private Sub Form_Load()
lola00001(0, 0) = 50.46197
lola00001(1, 0) = 61.597
lola00001(2, 0) = 41.66
lola00001(3, 0) = 52.557
lola00001(0, 1) = -104.5667
lola00001(1, 1) = -91.697
lola00001(2, 1) = -87.557
lola00001(3, 1) = -81.77
intCountingTimer = 0
End Sub

Private Sub Timer1_Timer()
Dim dblLatitude As Double
Dim dblLongitude As Double
Dim pt As New Point

intCountingTimer = intCountingTimer + 1
If intCountingTimer <= 4 Then
dblLatitude = lola00001((intCountingTimer - 1), 0)
dblLongitude = lola00001((intCountingTimer - 1), 1)
With Map1.TrackingLayer.Symbol(0)
.SymbolType = moPointSymbol
.Size = 4
.Style = mosquaresymbolmarker
.Color = moRed
End With
Dim p As MapObjects2.Point
pt.X = dblLongitude
pt.Y = dblLatitude
With Me.Map1.TrackingLayer
.AddEvent pt, 0
.Refresh False, Me.Map1.Extent
End With
Else
End If
End Sub



C#

/ Offset all of the events by a random amount

//

CMoRectangle extent(m_map.GetExtent());

double maxDist = extent.GetWidth() / 20.0;

CMoTrackingLayer tLayer(m_map.GetTrackingLayer());

int eventCount = tLayer.GetEventCount();

CMoGeoEvent event;

for (int i = 0; i < eventCount; i++)

{

event = tLayer.GetEvent(i);

double xOffset = maxDist * ((double)rand()/(double)RAND_MAX - 0.5);

double yOffset = maxDist * ((double)rand()/(double)RAND_MAX - 0.5);

event.Move(xOffset, yOffset);

}

you can also use event.MoveTo(x, y).



كود Drawing points on the map
dim iIndex as integer
dim pt as new point

do while not recset.eof
pt.x = recset.field("long").value
pt.y = recset.field("lat").value

iIndex = 0
with frmMain.trackinglayer (or whatever form called)
.addevent pt, 0 (or other MO symbol)
.event(iIndex).tag = unique field from table
end with
loop
then, on updates you can either:
1)trackinglayer.clear and re-read events into it
2)pt.MoveTo pt.x, pt.y (reset pt with new values)


وهذا كود للشكل بلغة C#


http://sendinto.com/28kpu7b4or7j/14081.zip.html