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.

■ Images can be copied to the Windows clipboard and used in other<br />

applications.<br />

■ The Autodesk DWF Viewer is only available on Windows.<br />

Characteristics of an eMap DWF:<br />

■ An eMap DWF is dynamic, with all the zooming and panning capabilities<br />

of the Map<strong>Guide</strong> DWF Viewer.<br />

■ Because the eMap Viewer uses the map agent, the entire map is available<br />

for smooth zooming and panning. The layer stylization rules apply.<br />

■ The eMap requires the Autodesk DWF Viewer, either standalone or as a<br />

plug-in for Internet Explorer.<br />

■ The eMap requires an active Map<strong>Guide</strong> session. If the session times out<br />

the map cannot be displayed.<br />

■ Individual views from an eMap DWF can be saved as ePlot DWFs.<br />

■ The Autodesk DWF Viewer is only available on Windows.<br />

Rendering Service<br />

The Rendering Service creates bit-mapped images of a map suitable for<br />

displaying in a browser or saving to a file. The image is returned as an<br />

MgByteReader object, which can be sent to a browser or saved to a file.<br />

For example, to create a PNG image of a map area, perform the following<br />

operations. Note that the aspect ratio of the envelope should match the image<br />

dimensions or the image will be distorted.<br />

$byteReader = $renderingService->RenderMap($map, $selection,<br />

$envelope, $imageWidth, $imageHeight, $color, 'PNG');<br />

header("Content-type: " . $byteReader->GetMimeType() );<br />

$buffer = '';<br />

while ($byteReader->Read($buffer, 50000) != 0)<br />

{<br />

echo $buffer;<br />

}<br />

Rendering Service | 97

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

Saved successfully!

Ooh no, something went wrong!