Autodesk 15606-011408-9300 Developer Guide - Page 34
Required Software for Autodesk MapGuide Viewer Plug-In, Accessing Maps
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 34 highlights
Because getMap has an MGMap object as its return value, you can use the function in place of MGMap, accessing that object's methods or properties as needed. Warning Because Netscape Communicator 4.x contains the Same Origin security policy, the map object cannot be accessed by the Autodesk MapGuide Viewer API code in a different frame. This occurs only when the code is written in Java or JavaScript and is on a different domain from the one where the map window file (MWF) resides. To enable codebase principals 1 Make sure Netscape Communicator is not running. 2 In your prefs.js file, located in the Netscape/user directory, add the line: user_pref("signed.Java editions.codebase_principal_support", true); 3 In your JavaScript code, before making any Autodesk MapGuide Viewer API calls or references, add the line: netscape.security.PrivilegeManager.enablePrivilege("UniversalBr owserRead"); 4 When executing the JavaScript code, Netscape Communicator will ask whether to Grant or Deny access to the script. If you select Grant, the script will run normally. Otherwise, the script is prevented from executing. Because codebase principals offer a minimal level of security, they can be useful during development of your code, but you should use object signing and digital signatures before delivery. For detailed information on Netscape Communicator's security models, codebase principals, and object signing, refer to the Netscape developer documentation. Required Software for Autodesk MapGuide Viewer Plug-In To work with Autodesk MapGuide Viewer Plug-In, you may need to download certain Java files provided with Autodesk MapGuide. Specifically, if your application will handle events, you will need to download the Java observer applet file MapGuideObserver6.class. For information about event handling with Autodesk MapGuide Viewer Plug-In, see Chapter 5, "Handling Events." To download this observer applet file, choose Help ➤ Contents ➤ PlugIn/Java Edition Downloads in the Autodesk MapGuide Viewer API Help. 34 | Chapter 3 Accessing Maps