150
|
Chapter 7
Applications
{
whereClause2 =
"ReportDate <= #04/01/99# AND ReportDate >= #03/02/99#"
}
else
{
whereClause2 = "ReportDate is not null";
}
// Combine the two SQL statements into one
whereClause = ((whereClause1) + " AND " + (whereClause2));
// Create an object representing the database setup for
// the 'Incidents' layer, then assign that object to
// a variable called 'mapDatabaseSetup'
var mapLayer = map.getMapLayer("Incidents");
var mapLayerSetup = mapLayer.getLayerSetup();
var mapDatabaseSetup = mapLayerSetup.getDatabaseSetup();
// Run SQL statement you created on the database linked
// to the 'Incidents' layer; then refresh the map, causing
// the items you queried to display in the map.
mapDatabaseSetup.setWhereClause(whereClause);
map.refresh();
}
}
}
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //
// Function: pageSetup()
// Description: Displays the page setup dialog (called by
// the 'Print Setup' button, under 'Print Map')
// Arguments: none
// Returns: nothing
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //
function pageSetup()
{
map = getMap();
// Get instance of MGMap
// If Autodesk MapGuide Viewer is not busy, display Page Setup dialog;
// otherwise display alert
if (map.isBusy() == false)
map.pageSetupDlg();
else
alert("The Autodesk MapGuide Viewer is busy. Please try again
in a few seconds.");
}
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //
// Function printMap()
Municipal Application Example Code (
continued
)
Summary of Contents for 15606-011408-9300 - MAP R6.3 UPG
Page 1: ...15306 010000 5060 October 2001 Autodesk MapGuide Release 6 Developer s Guide ...
Page 6: ...vi ...
Page 16: ...16 ...
Page 30: ...30 ...
Page 84: ...84 ...
Page 134: ...134 ...
Page 202: ...202 ...