[mapguide-users] Mapguide Site URL

Nichols, Mark A. markn at spicergroup.com
Tue Sep 1 11:27:30 EDT 2009


Mark,

If you are using PHP, you can do the following:

1.  Download phpviewersample.zip from
http://mapguide.osgeo.org/download/releases/2.0.x-samples and extract it to
the Web\www folder.

2.  Modify your ajaxviewersample.php file to reflect your web layout.
Here's an example below.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">

<?php
    include 'utilityfunctions.php';
    MgInitializeWebTier($configFilePath);

    $site = new MgSite();
    $site->Open(new MgUserInformation('Anonymous', ''));

    $sessionId = $site->CreateSession();
    $webLayout = "Library://Folder/Maps and Layouts/Overview Map.WebLayout";
?>

<html>

<head>
    <title>Viewer Sample Application</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>

<frameset rows="50,*" frameborder="NO" border="0" framespacing="0">
    <frame src="title.html?AppName=AJAX" name="TitleFrame" scrolling="NO"
noresize>
    <frame src="../mapviewerphp/ajaxviewer.php?SESSION=<?php echo
$sessionId; ?>&WEBLAYOUT=<?php echo $webLayout; ?>" name="ViewerFrame">
</frameset>

</html>



If you are not using PHP, I would assume you should use the same steps but
with either the javaviewersample.zip or dotnetviewersample.zip.\

I would be interested to know if anyone is doing it a different way!

Mark



On 9/1/09 11:13 AM, "Mark Hedges" <hedgesm at cityofnorthlasvegas.com> wrote:

> 
> I have finished configuring my Mapguide Enterprise 2010 site.  In order to
> access the site I have bookmarked the address from the Web Layout under the
> "View in Browser" header.  As you know the URL Address is very long,
> (http://localhost:8008/mapguide/mapviewerajax/?WEBLAYOUT=Library%3a%2f%2fNorth
> +Las+Vegas%2fWeb+Layouts%2fNorth+Las+Vegas.WebLayout).
> Could someone please explain how I go about changing the site URL Address to
> make more sense.  Thank you in advance.
> Mark



More information about the mapguide-users mailing list