34
|
Chapter 3
Accessing Maps
Because
getMap
has an
MGMap
object as its return value, you can use the func-
tion in place of
MGMap
, accessing that object’s methods or properties as
needed.
Warning
Because Netscape Communicator 4.x contains the Same Origin secu-
rity 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 down-
load 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
➤
Plug-
In/Java Edition Downloads in the
Autodesk MapGuide Viewer API Help
.
Содержание 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 ...