Autodesk 15606-011408-9300 Developer Guide - Page 148
Autodesk MapGuide Viewer API. Please \n, Assign array of possible drop-down list options
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 148 highlights
Municipal Application Example Code (continued) } // Function: showIncidents() // Description: Constructs SQL 'Where' statement requesting map // features (request is based on user's selection from 'Date' and // 'Status' drop-downs, under 'Incident Entry & Reporting'); sends // the SQL statement to the database that's linked to the 'Incidents' // layer; then refreshes the map, causing the requested features // to display // Arguments: none // Returns: none function showIncidents() { map = getMap(); // Get instance of MGMap // If Autodesk MapGuide Viewer is not busy... if (map.isBusy() == false) { // If user has old copy of Autodesk MapGuide Viewer // display alert only var ApiVersion = map.getApiVersion(); if (ApiVersion < 6.0) { alert("This control uses the latest technology in the\n Autodesk MapGuide Viewer API. Please \n download the latest Autodesk MapGuide Viewer from the Autodesk MapGuide\n Web site (www.autodesk.com/mapguideviewerdownload)."); } // If user has recent copy of Autodesk MapGuide Viewer (API version 6.0 // or greater)... else { // Assign array of possible drop-down list options // to selValue variable; then assign name of selected // list item to 'temp' variable ('Selection' is the // HTML form, 'Status' is the 'status:' drop-down list) var selValue = document.Selection.Status.options; for (var i = 0; i < selValue.length; i++) { if (selValue[i].selected) { var temp = selValue[i].value; } } // If user selected 'Show All', assign text string to // whereClause1 varible 148 | Chapter 7 Applications