38
|
Chapter 3
Accessing Maps
Map Access Using Java
You can access maps using Java and the Autodesk MapGuide Viewer, Java
Edition in several different ways, including using a wrapper Java applet, a
peer Java applet, or a wrapper Java application.
Wrapper Java Applet
You can write a wrapper Java applet that uses the pre-installed Autodesk
MapGuide Viewer, Java Edition and contains all the Autodesk MapGuide
Viewer API methods. This approach enables the Autodesk MapGuide Viewer
API to work on all operating systems and browsers. To run Autodesk
MapGuide Viewer from a wrapper applet, code your wrapper to instantiate
MGMapComponent
. Then, in HTML, set the
CODE
value of the
<APPLET>
tag
to the name of the wrapper applet. For a Java wrapper applet example,
choose Help
➤
Contents
➤
Examples Advanced
➤
Java Edition Examples
➤
Example6 in the
Autodesk MapGuide Viewer API Help
.
Peer Java Applet
You can write a peer Java applet that runs Autodesk MapGuide Viewer, Java
Edition. This approach is slightly simpler than driving Autodesk MapGuide
Viewer, Java Edition from a wrapper applet, because, with a peer java applet,
Autodesk MapGuide Viewer, Java Edition is automatically provided with
browser services such as
showDocument
. Another benefit is that Autodesk
MapGuide Viewer, Java Edition and the peer applet can exist in separate
frames in the HTML document. To run Autodesk MapGuide Viewer from a
peer applet, your HTML page needs to include the
<APPLET>
tag twice: to set
the
CODE
value to
MGMapApplet
, and to set it to the name of the peer applet.
Wrapper Java Application
You can write a Java wrapper application that runs Autodesk MapGuide
Viewer, Java Edition outside a browser. This approach is analogous to using
Visual Basic to run Autodesk MapGuide Viewer ActiveX Control outside a
browser. You can still have Internet access from a Java application outside a
browser, but browser-specific functionality will not be available. To run
Autodesk MapGuide Viewer from a wrapper application, the application must
embed the
MGMapComponent
object and then implement the
MGMapContext
object interface so that
MGMapComponent
can use the methods defined in
MGMapContext
that are normally provided by the browser.
Содержание 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 ...