14.01.2013 Views

Developer's Guide - MapGuide Open Source - OSGeo

Developer's Guide - MapGuide Open Source - OSGeo

Developer's Guide - MapGuide Open Source - OSGeo

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Complete examples are available from<br />

http://mapguide.osgeo.org/documentation.html. There are two required<br />

components: the source code and a package file for creating the web layouts.<br />

The Sheboygan sample application must also be installed.<br />

Follow the instructions in README.txt for installing and using the examples.<br />

NOTE The Web API supports .NET, Java, and PHP. For simplicity, all the examples<br />

in this guide use PHP.<br />

To run the examples on a Linux installation, change any Windows-specific<br />

file paths to corresponding Linux paths.<br />

Hello, Map – Displaying a Web Layout<br />

A web layout describes how the map looks when it is displayed in a web<br />

browser. Using Studio, you can create and customize the layout, changing<br />

how it looks in a browser and what features are enabled.<br />

To display the web layout, create an HTML page that includes a Viewer . There<br />

are two Viewers, depending on the needs of your site. The DWF Viewer runs<br />

as a control within the Internet Explorer browser. It requires that users install<br />

the Autodesk DWF Viewer.<br />

The AJAX Viewer does not require installing any additional software. It runs<br />

using most browsers, including Internet Explorer, Mozilla Firefox, and Safari.<br />

To display a web layout using either Viewer, create a Map<strong>Guide</strong> session and<br />

pass the session identifier and the web layout identifier to the Viewer page.<br />

The following example displays a web layout using the AJAX Viewer. It<br />

performs some basic initialization and creates a session, then displays a Viewer<br />

page using the session identifier and the web layout.<br />

Hello, Map – Displaying a Web Layout | 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!