SDF Component Toolkit Applications
|
177
sdfObject.SetGeometry(0, sdfGeometry);
sdfObject.Name = pointName;
sdfObject.Key = pointName;
sdfObject.Url = "";
// The object is built. Now add it to the SDF.
sdfToolKit.BeginUpdate();
sdfToolKit.AddObject(sdfObject);
sdfToolKit.EndUpdate();
clearVars();
actionOp = "UpdateMap";
msgText = "Point added, updating map.";
}
else // Invalid lat/lon values
msgText = "Lat and Lon floating point quantities must
be specified."
}
else //if not the Add command, remove the point
{
var sdfObject = findObject(sdfToolKit, pointName);
if (sdfObject != null)
{
sdfToolKit.BeginUpdate();
sdfToolKit.DeleteObject(sdfObject);
sdfToolKit.EndUpdate();
clearVars();
actionOp = "UpdateMap"; // Refreshes the map
msgText = "Point removed, updating map.";
}
else
msgText = "Point not found.";
}
}
//If it's the Find command, open the SDF as read-only by setting
//the second parameter to 1 (sdfOpenRead) instead of 2
//(sdfOpenUpdate).
else if (op == "Find")
{
var sdfObject = null;
sdfToolKit.Open("c:\\sdf\\poi.sdf", 1, true);
sdfObject = findObject(sdfToolKit, pointName);
if (sdfObject != null)
{
var sdfPoint = sdfObject.Geometry.GetAt(0).GetAt(0);
poi.asp
Example Code (
continued
)
Содержание 15606-011408-9300 - MAP R6.3 UPG
Страница 1: ...15306 010000 5060 October 2001 Autodesk MapGuide Release 6 Developer s Guide ...
Страница 6: ...vi ...
Страница 16: ...16 ...
Страница 30: ...30 ...
Страница 84: ...84 ...
Страница 134: ...134 ...
Страница 202: ...202 ...