Information Technology

Minimal Example

This example show how little is needed.  We are using almost all the default values.  The only exception is the login division which we pass to the aMapApp3 object.  Without this all we get is a map, which is pretty useless.  As it is, initially only the administrator, whose account was created by the setup function, can login and add locations.  However, as new accounts are created, more people will have the ability to add to the map.

Note that we only need four divisions and two, the selection_container and the drag_container, wouldn't initially appear.

Green code is standard and can be cut and pasted into your application. 
Red code are values that are unique to the application. 
Grey code is the layout html.  You will have to change this to meet you needs.

require_once "/var/www/configs/SimpleMap_config.php";
require_once XAJAX_PATH."/xajax_core/";
$xajax = new xajax();
require_once UTILITY_LIBRARY;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MapApp Test</title>

<script type="text/javascript" src=""></script>

include MAPAPP_PATH."/mapAppObject.php";
<script language="javascript">
function load() {
    myMapApp = new aMapAppObject(configObject =
                                                  new Object({

<body onLoad="load();">
<br />
Simple Map Example Page</b>
<br /><br />

<div id="select_container"></div>
<div id="map_container" style="width: 600px; height: 500px;"></div>
<div id="drag_container" style="position: absolute; z-index: 113; visibility: visible;
          left: 650px; top: 10px; width: 340px; height: 76px; display: block;"></div>
<div id="login_container" style="position: absolute; z-index: 113; visibility: visible;
          left: 650px; top: 250px; width: 340px; height: 76px; display: block;"></div>


Note that if we don't include the login div in the config object, we wouldn't need to define the select_container, the drag_container or the login_container.  But the result page would be useless until somehow the databases had already been populated.

The resulting page look like,

Click on map to see full size image.