Autodesk 15606-011408-9300 Developer Guide - Page 177
poi.asp, continued, if sdfObject != null
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 177 highlights
poi.asp Example Code (continued) 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); SDF Component Toolkit Applications | 177