MapTools.org

[Chameleon] multiple zoomin before map arrives

Paul Spencer spencer@dmsolutions.ca
Mon, 12 Jan 2004 11:55:54 -0500
This is a multi-part message in MIME format.
--------------080006000001070002010405
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Bart,

I'm not sure how this would help?  My feeling is that submit of the page 
actually gets conflicted some how because it happens twice.

Try the attached file to see if it fixes your problem.  What I did was 
to explicitly cancel the event handlers just before the submit.

Cheers,

Paul

bartvde@xs4all.nl wrote:

> Hi Paul,
> 
> I checked and you're right that this is an IE only issue (like many others
> ofcourse :-( ).
> 
> I found a possible solution but don't know exactly where to add this to
> Chameleon, perhaps you can point me to the right widget/piece of code to
> implement this, as this is a "killing bug" for us since our customer only
> works with IE 6.
> 
> The solution is at:
> http://www.insidedhtml.com/tips/backend/ts04/page2.asp
> 
> Thanks in advance.
> 
> Best regards,
> Bart
> 
> 
>>Bart,
>>
>>I think this is an issue with IE.  I have noticed this in chameleon but
>>also other applications I think.  I have never had the problem in
>>Mozilla (that I am aware of).  One possible cause could be that the
>>mouse events are still processed after a submit?  If this is the case
>>then the new javascript framework should be designed to allow event
>>handling to be turned off on a page submit.  I don't know if this will
>>fix the problem.
>>
>>Cheers,
>>
>>Paul
>>
>>bartvde@xs4all.nl wrote:
>>
>>
>>>Hi list,
>>>
>>>when zooming in on the map, sometimes users get impatient (at least a
>>>colleague of mine who just tested the application .... :-( ) and click
>>>on
>>>the map again before the map update has finished. In this case the
>>>Chameleon client application will "hang".
>>>
>>>The same thing happens when first clicking in the map with the zoomin
>>>tool, and then drawing a box before the map update finishes.
>>>
>>>Also when pressing the "update map" button twice too soon, the same
>>>thing
>>>happens.
>>>
>>>Is there any way to prevent this behaviour? It is a pretty serious issue
>>>in my opinion, as the result can be that the application hangs.
>>>
>>>Best regards,
>>>Bart
>>>_______________________________________________
>>>Chameleon mailing list
>>>Chameleon@lists.maptools.org
>>>http://lists.maptools.org/mailman/listinfo/chameleon
>>>
>>
>>--
>>  -----------------------------------------------------------------
>>|Paul Spencer                           spencer@dmsolutions.ca    |
>>|-----------------------------------------------------------------|
>>|Applications & Software Development                              |
>>|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
>>  -----------------------------------------------------------------
>>
>>
> 
> 
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           spencer@dmsolutions.ca    |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------

--------------080006000001070002010405
Content-Type: text/html;
 name="MapDHTMLWidget.widget.php"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="MapDHTMLWidget.widget.php"

<?php
/**
 * Base Widget class
 *
 * @project     CWC2
 * @revision    $Id: MapDHTMLWidget.widget.php,v 1.64 2003/10/31 16:09:21 wbronsema Exp $
 * @purpose     Base Widget class
 * @author      DM Solutions Group (assefa@dmsolutions.ca)
 * @copyright
 * <b>Copyright (c) 2002, DM Solutions Group Inc.</b>
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
include_once("Widget.php");

/**
 * MapDHTMLWidget provides a DHTML enabled mapping interface and the javascript
 * functions for doing javascript-based navigation.
 */
class MapDHTMLWidget extends CWCWidget
{
    var $msAnchorName = "mapanchor";
    var $msMapImageName = "mapimage";
    var $mszMarqueeColor = "RED";
    var $mnMarqueeWidth = 1;
    var $mszMarqueeImageHorizontal = "images/a_pixel.gif";
    var $mszMarqueeImageVertical = "images/a_pixel.gif";
    var $mszURL = "";
    var $mbAllowResize = true;
    var $mfMinScale = 1;
    var $mfMaxScale = -1;
    var $mszWaitImage = "";
    var $mnWaitImageWidth = 0;
    var $mnWaitImageHeight = 0;

    function MapDHTMLWidget()
    {
        // invoke constructor of parent
        parent::CWCWidget();

        $this->mnPriority = PRIORITY_SUPER;
        $this->maAttributes["MARQUEECOLOR"] = new HexColorAttribute( "MARQUEECOLOR", false );
        $this->maAttributes["MARQUEEWIDTH"] = new IntegerAttribute( "MARQUEEWIDTH", false, 0 );
        $this->maAttributes["MARQUEEVERTICALIMAGE"] = new StringAttribute( "MARQUEEVERTICALIMAGE", false);
        $this->maAttributes["MARQUEEHORIZONTALIMAGE"] = new StringAttribute( "MARQUEEHORIZONTALIMAGE", false);
        $this->maAttributes["MINSCALE"] = new FloatAttribute( "MINSCALE", false);
        $this->maAttributes["MAXSCALE"] = new FloatAttribute( "MAXSCALE", false);
        $this->maAttributes["ALLOWRESIZE"] = new BooleanAttribute( "ALLOWRESIZE", false);
        $this->maAttributes["WIDTH"] = new IntegerAttribute( "WIDTH", true, 0 );
        $this->maAttributes["HEIGHT"] = new IntegerAttribute( "HEIGHT", true, 0 );
        $this->maAttributes["WAITIMAGE"] = new StringAttribute( "WAITIMAGE", false);
        $this->maAttributes["WAITIMAGEWIDTH"] = new IntegerAttribute( "WAITIMAGEWIDTH", false, 0 );
        $this->maAttributes["WAITIMAGEHEIGHT"] = new IntegerAttribute( "WAITIMAGEHEIGHT", false, 0 );
        // set the description for this widget
        $this->szWidgetDescription = <<<EOT
The MapDHTML widget displays the actual visualization of the current context
and provides many of the mechanisms for other tools to do their job, primarily
the navigation tools.
EOT;
    }

    /**
     * initialize respectable defaults for the map
     */
    function InitDefaults()
    {
        if (isset($this->maParams["MARQUEECOLOR"]))
            $this->mszMarqueeColor = $this->maParams["MARQUEECOLOR"];
        if (isset($this->maParams["MARQUEEWIDTH"]))
            $this->mnMarqueeWidth = $this->maParams["MARQUEEWIDTH"];
        if (isset($this->maParams["MARQUEEHORIZONTALIMAGE"]))
            $this->mszMarqueeImageHorizontal = $this->maParams["MARQUEEHORIZONTALIMAGE"];
        if (isset($this->maParams["MARQUEEVERTICALIMAGE"]))
            $this->mszMarqueeImageVertical = $this->maParams["MARQUEEVERTICALIMAGE"];
        if (isset($this->maParams["MINSCALE"]))
            $this->mfMinScale = $this->maParams["MINSCALE"];
        if (isset($this->maParams["MAXSCALE"]))
            $this->mfMaxScale = $this->maParams["MAXSCALE"];

        //now check the widget attributes to see if it is overridden
        if (isset($this->maParams["WAITIMAGE"]))
            $this->mszWaitImage = $this->maParams["WAITIMAGE"];
        if (isset($this->maParams["WAITIMAGEWIDTH"]))
            $this->mnWaitImageWidth = $this->maParams["WAITIMAGEWIDTH"];
        if (isset($this->maParams["WAITIMAGEHEIGHT"]))
            $this->mnWaitImageHeight = $this->maParams["WAITIMAGEHEIGHT"];

        $this->mbAllowResize = true;
        $szAllowResize = "true";
        if (isset($this->maParams["ALLOWRESIZE"]))
            $szAllowResize = $this->maParams["ALLOWRESIZE"];
        if (strcasecmp( $szAllowResize , "false" ) == 0)
        {
            $this->mbAllowResize = false;
        }
    }

    /**
     * handle changes coming from the URL.  In this case, we only want
     * to verify that the map size is valid
     */
    function ParseURL()
    {
        if (!$this->mbAllowResize)
        {
            $poMap = $this->moMapObject->oMap;
            if (isset($this->maParams["WIDTH"]))
                $nWidth = $this->maParams["WIDTH"];
            if (isset($this->maParams["HEIGHT"]))
                $nHeight = $this->maParams["HEIGHT"];
            $poMap->set("width", $nWidth);
            $poMap->set("height", $nHeight);
        }
        else
        {
            if (isset($this->moURLArray["MAP_WIDTH"]) &&
                $this->moURLArray["MAP_WIDTH"] != "" &&
                $this->moURLArray["MAP_WIDTH"] > 0 &&
                isset($this->moURLArray["MAP_HEIGHT"]) &&
                $this->moURLArray["MAP_HEIGHT"] != "" &&
                $this->moURLArray["MAP_HEIGHT"] > 0)
            {
                $this->moMapObject->oMap->set("width",
                                              $this->moURLArray["MAP_WIDTH"]);
                $this->moMapObject->oMap->set("height",
                                              $this->moURLArray["MAP_HEIGHT"]);
            }
        }
        if (isset($this->moURLArray['MAP_EXTENTS_MINX']) && ($this->moURLArray['MAP_EXTENTS_MINX'] != "") &&
            isset($this->moURLArray['MAP_EXTENTS_MINY']) && ($this->moURLArray['MAP_EXTENTS_MINY'] != "") &&
            isset($this->moURLArray['MAP_EXTENTS_MAXX']) && ($this->moURLArray['MAP_EXTENTS_MAXX'] != "") &&
            isset($this->moURLArray['MAP_EXTENTS_MAXY']) && ($this->moURLArray['MAP_EXTENTS_MAXY'] != "") )
        {
            $this->moMapObject->oMap->setExtent(
                                      $this->moURLArray['MAP_EXTENTS_MINX'],
                                      $this->moURLArray['MAP_EXTENTS_MINY'],
                                      $this->moURLArray['MAP_EXTENTS_MAXX'],
                                      $this->moURLArray['MAP_EXTENTS_MAXY']);
        }
        
        // return success
        return true;
    }

    /**
     * draw the map DHTML widget interface
     */
    function DrawPublish()
    {
        if (!$this->mbVisible)
            return "<!-- Map hidden -->";

        $poMap = $this->moMapObject->oMap;

        $url = ($this->mszURL == "") ? "images/a_pixel.gif" : $this->mszURL;

        $nWidth = $poMap->width;
        $nHeight = $poMap->height;
        if (!$this->mbAllowResize)
        {
            if (isset($this->maParams["WIDTH"]))
                $nWidth = $this->maParams["WIDTH"];
            if (isset($this->maParams["HEIGHT"]))
                $nHeight = $this->maParams["HEIGHT"];
            $poMap->set("width", $nWidth);
            $poMap->set("height", $nHeight);
        }

        $nScale = $poMap->scale;
        $bZoomScale = false;
        if ($this->mfMinScale > 0 && $nScale < $this->mfMinScale)
        {
            $nScale = $this->mfMinScale;
            $bZoomScale = true;
        }
        elseif ($this->mfMaxScale > 0 && $nScale > $this->mfMaxScale)
        {
            $nScale = $this->mfMaxScale;
            $bZoomScale = true;
        }
        if( $bZoomScale )
        {
            $oNav = new MapNavigator( $this->moMapObject );
            $oNav->zoomScale( $nScale );
        }


        $szReturn = <<<EOT
<table cellpadding="0" cellspacing="0" border="0">
<tr>
    <td bgcolor="000000"><img src="./images/a_pixel.gif" width="1" height="1" id="mapFrameTL" name="mapFrameTL"></td>
    <td bgcolor="000000"><img src="./images/a_pixel.gif" width="1" height="1"></td>
    <td bgcolor="000000"><img src="./images/a_pixel.gif" width="1" height="1" id="mapFrameTR" name="mapFrameTR"></td>
  </tr>
  <tr>
    <td bgcolor="000000"><img src="./images/a_pixel.gif" width="1" height="1"></td>
    <td><a name="mapanchor" ><IMG SRC="./images/a_pixel.gif" WIDTH="{$nWidth}" HEIGHT="{$nHeight}" NAME="{$this->msMapImageName}" id="{$this->msMapImageName}" border="0"></a></td>
    <td bgcolor="000000"><img src="./images/a_pixel.gif" width="1" height="1"></td>
  </tr>
  <tr>
    <td bgcolor="000000"><img src="./images/a_pixel.gif" width="1" height="1" id="mapFrameBL" name="mapFrameBL"></td>
    <td bgcolor="000000"><img src="./images/a_pixel.gif" width="1" height="1"></td>
    <td bgcolor="000000"><img src="./images/a_pixel.gif" width="1" height="1" id="mapFrameBR" name="mapFrameBR"></td>
  </tr>
</table>
EOT;
        return $szReturn;
    }


    /**
     * return an array of javascript functions needed by MapDHTML widget
     * @return array of name = function values
     */
    function GetJavascriptFunctions()
    {
        $poMap = $this->moMapObject->oMap;

/* -------------------------------------------------------------------- */
/*      test if we use the JS API.                                      */
/* -------------------------------------------------------------------- */
        if (isset($this->maSharedResourceWidgets["CWCJSAPI"]))
          $bCWCJSAPI = 1;
        else
          $bCWCJSAPI = 0;

        if ($this->mszURL == "")
        {
            $szFatalImage = $this->getValue("FatalErrorImage");
            if ($szFatalImage != "")
                $szFatalImage = "&szFatalErrorImage=".$szFatalImage;

            if (isset($_SESSION['gnMapSessionMode']))
            {
                $nMapSessionMode = $_SESSION['gnMapSessionMode'];
            }
            else
            {
                $nMapSessionMode = 1;
            }
            
            if (isset($_SESSION['gszCoreWebPath']))
            {
                $url = $_SESSION['gszCoreWebPath']."/common/wrapper/drawmap.php?map_session_mode=$nMapSessionMode&run_query=0&".SID.$szFatalImage;
            }
            else
            {
                $url = "/common/wrapper/drawmap.php?map_session_mode=$nMapSessionMode&run_query=0&".SID.$szFatalImage;
            }
        }
        else
        {
            if ($szFatalImage != "")
            {
                $szFatalImage = "&szFatalErrorImage=".$szFatalImage;
            }

            $url = $this->mszURL.$szFatalImage;
        }

        $nWidth = $poMap->width;
        $nHeight = $poMap->height;
        if (!$this->mbAllowResize)
        {
            if (isset($this->maParams["WIDTH"]))
            {
                $nWidth = $this->maParams["WIDTH"];
            }
            if (isset($this->maParams["HEIGHT"]))
            {
                $nHeight = $this->maParams["HEIGHT"];
            }
            $poMap->set("width", $nWidth);
            $poMap->set("height", $nHeight);
        }
        $aReturn = parent::GetJavascriptFunctions();

/* -------------------------------------------------------------------- */
/*      MapWsetZoomBoxSettings                                          */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWsetZoomBoxSettings";
         $szFunction = "function $szJsFunctionName()\n";
         $szFunction .= <<<EOT
{
    if (CWCIsNav4 || CWCIsNav6)
    {
        document.captureEvents(Event.MOUSEMOVE);
        document.captureEvents(Event.MOUSEDOWN);
        document.captureEvents(Event.MOUSEUP);
        document.captureEvents(Event.RESIZE);
    }
    else if (CWCIsIE)
    {
        gMapWhspc -= gMapWhspcIEadjust;
        gMapWvspc += gMapWvspcIEadjust;
    }
    window.onresize = MapWhandleresize;
}
EOT;
         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapWhandleresize                                                */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWhandleresize";
         $szFunction = "function $szJsFunctionName()\n";
         $szFunction .= <<<EOT
{
    if (CWCIsNav4 || CWCIsNav6) 
    {     // Netscape
        location.reload();
    }
}
EOT;
         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapWchkMouseUp                                                  */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWchkMouseUp";
         $szFunction = "function $szJsFunctionName(e)\n";
         $szFunction .= <<<EOT
{
    if(({$this->mszHTMLForm}.NAV_CMD != null) &&
    ({$this->mszHTMLForm}.NAV_CMD.value == "PAN_MAP" ||
    {$this->mszHTMLForm}.NAV_CMD.value == "RULER" ||
    {$this->mszHTMLForm}.NAV_CMD.value == "QUERY"))
        return true;
    
    if (gMapWdragging) 
    {
        gMapWmouseX = Math.min(Math.max(gMapWmouseX, 0), gMapWiWidth);
        gMapWmouseY = Math.min(Math.max(gMapWmouseY, 0), gMapWiHeight);
        MapWmapTool(e);
    }
}
EOT;
         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapWPointNavigation                                             */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWPointNavigation";
         $szFunction = "function $szJsFunctionName()\n";
         $szFunction .= <<<EOT
{
    szCoord = ""+ gMapWmouseX + "," + gMapWmouseY;
    if ({$bCWCJSAPI})
    {
        goCWCJSAPI.NAV_INPUT_COORDINATES = szCoord;
        goCWCJSAPI.NAV_INPUT_TYPE = "POINT";
        
        //the forms variables settings should not be necessary. But It
        //keeps consistancy since some js functions test the values
        //of the form parameters.
        {$this->mszHTMLForm}.NAV_INPUT_COORDINATES.value =  szCoord;
        {$this->mszHTMLForm}.NAV_INPUT_TYPE.value = "POINT";
        
        goCWCJSAPI.UpdateNavTools();
    }
    else
    {
        {$this->mszHTMLForm}.NAV_INPUT_COORDINATES.value =  szCoord;
        {$this->mszHTMLForm}.NAV_INPUT_TYPE.value = "POINT";
        document.onmousemove = null;
        document.onmouseup = null;
        document.onmousedown = null;
        {$this->mszHTMLForm}.submit();
    }
}
EOT;

         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapWmapTool                                                     */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWmapTool";
         $szFunction = "function $szJsFunctionName(e)\n";
         $szFunction .= <<<EOT
{
    if ( CWCIsNav6)
    {
        if (e.target == "[object HTMLHtmlElement]")
        {
            return;
        }
    }
    MapWgetImageXY(e);
        
    /* -------------------------------------------------------------------- */
    /*      if in js api update the js class with the mouse click position. */
    /* -------------------------------------------------------------------- */
    if ({$bCWCJSAPI})
    {
        if (MapWinsideMap())
        {
            goCWCJSAPI.MouseClicked(gMapWmouseX,gMapWmouseY);
        }
    }
    
    if(({$this->mszHTMLForm}.NAV_CMD != null) &&
    ({$this->mszHTMLForm}.NAV_CMD.value == "PAN_MAP" ||
    {$this->mszHTMLForm}.NAV_CMD.value == "RULER" ||
    {$this->mszHTMLForm}.NAV_CMD.value == "QUERY"))
        return true;
    
    if (MapWinsideMap())
    {
        //alert({$this->mszHTMLForm}.NAV_ALLOW_RECTANGLE.value)
        if ({$this->mszHTMLForm}.NAV_ALLOW_RECTANGLE.value == 0)
        {
            //alert({$this->mszHTMLForm}.NAV_ALLOW_RECTANGLE.value);
            MapWPointNavigation();
            return true;
        }
    }
    if (!gMapWdragging && MapWinsideMap()) {
        MapWstartZoomBox(e);
        return false;
    } 
    else if (gMapWdragging) 
    {
        MapWgetMouse(e);
        MapWstopZoomBox(e);
    }
    return true;
}

EOT;
         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapgetImageXY                                                   */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWgetImageXY";
         $szFunction = "function $szJsFunctionName(e)\n";
         $szFunction .= <<<EOT
{
    if (CWCIsNav4 || CWCIsNav6) 
    {                // Netscape
        gMapWmouseX = e.pageX;
        gMapWmouseY = e.pageY;
    } 
    else if (CWCIsIE) 
    {            // IE
        gMapWmouseX = event.clientX + document.body.scrollLeft;
        gMapWmouseY = event.clientY + document.body.scrollTop;
    } 
    else 
    {                              // Don't know
        gMapWmouseX = gMapWmouseY = 0;
    }
    // subtract offsets from page left and top
    gMapWmouseX = gMapWmouseX - gMapWhspc;
    gMapWmouseY = gMapWmouseY - gMapWvspc;
}

EOT;
         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapgetMouse                                                     */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWgetMouse";
         $szFunction = "function $szJsFunctionName(e)\n";
         $szFunction .= <<<EOT
{
    //window.status = "";
    MapWgetImageXY(e);
    
    //make sure that the forms varaibales are initialized.
    //It seems like that in IE, the mouse move may be called before.
    if ({$this->mszHTMLForm} == null ||
    {$this->mszHTMLForm}.MAP_CURSOR_POS_X == null)
        return true;
    
    if (MapWinsideMap())
    {
        {$this->mszHTMLForm}.MAP_CURSOR_POS_X.value = gMapWmouseX;
        {$this->mszHTMLForm}.MAP_CURSOR_POS_Y.value = gMapWmouseY;
        if ({$bCWCJSAPI})
        {
            goCWCJSAPI.oMap.cursorpos[0] = gMapWmouseX;
            goCWCJSAPI.oMap.cursorpos[1] = gMapWmouseY;
        }
    
    }
    else
    {
        {$this->mszHTMLForm}.MAP_CURSOR_POS_X.value = -1;
        {$this->mszHTMLForm}.MAP_CURSOR_POS_Y.value = -1;
        
        if ({$bCWCJSAPI})
        {
            goCWCJSAPI.oMap.cursorpos[0] = -1;
            goCWCJSAPI.oMap.cursorpos[1] = -1;
        }
        if (document.onmousedown == MapWmapTool)
            document.onmousedown = null;
        if (document.onmouseup == MapWchkMouseUp)
            document.onmouseup = null;
        return true;
    }
    
    if(({$this->mszHTMLForm}.NAV_CMD != null) &&
    ({$this->mszHTMLForm}.NAV_CMD.value == "" ||
    {$this->mszHTMLForm}.NAV_CMD.value == "PAN_MAP" ||
    {$this->mszHTMLForm}.NAV_CMD.value == "RULER" ||
    {$this->mszHTMLForm}.NAV_CMD.value == "QUERY" ||
    {$this->mszHTMLForm}.NAV_CMD.value == "ROI_TOOL"))
        return true;
    
    document.onmousedown = MapWmapTool;
    document.onmouseup = MapWchkMouseUp;
    if (gMapWdragging) 
    {
        gMapWx2 = gMapWmouseX = Math.min(Math.max(gMapWmouseX, 0), gMapWiWidth);
        gMapWy2 = gMapWmouseY = Math.min(Math.max(gMapWmouseY, 0), gMapWiHeight);
        MapWsetClip();
        return false;
    } 
    else 
    {
        return true;
    }

    return true;
}
EOT;
        $aReturn[$szJsFunctionName] = $szFunction;

/* -------------------------------------------------------------------- */
/*      MapWinsideMap                                                   */
/* -------------------------------------------------------------------- */
        $szJsFunctionName = "MapWinsideMap";
        $szFunction = "function $szJsFunctionName()\n";
        $szFunction .= <<<EOT
{
    //alert (gMapWmouseX);
    return ((gMapWmouseX >= 0) && (gMapWmouseX < gMapWiWidth) &&
            (gMapWmouseY >= 0) && (gMapWmouseY < gMapWiHeight));
}
EOT;
         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapWstartZoomBox                                                */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWstartZoomBox";
         $szFunction = "function $szJsFunctionName(e)\n";
         $szFunction .= <<<EOT
{
    MapWgetImageXY(e);
    // keep it within the MapImage
    if (!gMapWdragging) 
    {
        // capture values to pass to map server
        gMapWfirstx = gMapWx1 = gMapWmouseX;
        gMapWfirsty =  gMapWy1 =  gMapWmouseY;
        gMapWx2 =  gMapWx1 + 1;
        gMapWy2 =  gMapWy1 + 1;
        
        CWCDHTML_ClipLayer(gMapWtoplayer, gMapWx1, gMapWy1, gMapWx2, gMapWy2);
        CWCDHTML_ClipLayer(gMapWleftlayer, gMapWx1, gMapWy1, gMapWx2, gMapWy2);
        CWCDHTML_ClipLayer(gMapWrightlayer, gMapWx1, gMapWy1, gMapWx2, gMapWy2);
        CWCDHTML_ClipLayer(gMapWbottomlayer, gMapWx1, gMapWy1, gMapWx2, gMapWy2);
        CWCDHTML_ShowLayer(gMapWtoplayer);
        CWCDHTML_ShowLayer(gMapWleftlayer);
        CWCDHTML_ShowLayer(gMapWrightlayer);
        CWCDHTML_ShowLayer(gMapWbottomlayer);
        gMapWdragging = true;
    } 
    else 
    {
        MapWstopZoomBox(e);
    }
    return false;
}
EOT;
         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapWstopZoomBox                                                 */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWstopZoomBox";
         $szFunction = "function $szJsFunctionName(e)\n";
         $szFunction .= <<<EOT
{
    gMapWdragging = false;
    gMapWsecondx = gMapWx2;
    gMapWsecondy = gMapWy2;
    //TODO : values for the smallest rectangle availablee
    if (gMapWfirstx == gMapWsecondx && gMapWfirsty == gMapWsecondy)
    {
        var szCoord = ""+ gMapWfirstx + "," + gMapWfirsty;
        if ({$bCWCJSAPI})
        {
            goCWCJSAPI.NAV_INPUT_COORDINATES = szCoord;
            goCWCJSAPI.NAV_INPUT_TYPE = "POINT";
            //the forms variables settings should not be necessary. But It
            //keeps consistancy since some js functions test the values
            //of the form parameters.
            {$this->mszHTMLForm}.NAV_INPUT_COORDINATES.value = szCoord;
            {$this->mszHTMLForm}.NAV_INPUT_TYPE.value = "POINT";
            goCWCJSAPI.UpdateNavTools();
        }
        else
        {
            {$this->mszHTMLForm}.NAV_INPUT_COORDINATES.value = szCoord;
            {$this->mszHTMLForm}.NAV_INPUT_TYPE.value = "POINT";
            document.onmousemove = null;
            document.onmouseup = null;
            document.onmousedown = null;
            {$this->mszHTMLForm}.submit();
        }
        return true;
    } 
    else 
    {
        // Zoom to box
        var tx1 = Math.min(gMapWfirstx, gMapWsecondx);
        var tx2 = Math.max(gMapWfirstx, gMapWsecondx);
        var ty1 = Math.min(gMapWfirsty, gMapWsecondy);
        var ty2 = Math.max(gMapWfirsty, gMapWsecondy);
        
        var szCoord = ""+ tx1 + "," + ty1 + ";" + tx2 + "," + ty2;

        if ({$bCWCJSAPI})
        {
            //goCWCJSAPI.NAV_CMD = "ZOOM_IN";
            goCWCJSAPI.NAV_INPUT_COORDINATES = szCoord;
            goCWCJSAPI.NAV_INPUT_TYPE = "RECTANGLE";
            
            //the forms variables settings should not be necessary. But It
            //keeps consistancy since some js functions test the values
            //of the form parameters.
            {$this->mszHTMLForm}.NAV_INPUT_COORDINATES.value = szCoord;
            {$this->mszHTMLForm}.NAV_INPUT_TYPE.value = "RECTANGLE";
            
            CWCDHTML_HideLayer("zBoxTop");
            CWCDHTML_HideLayer("zBoxLeft");
            CWCDHTML_HideLayer("zBoxRight");
            CWCDHTML_HideLayer("zBoxBottom");
            goCWCJSAPI.UpdateNavTools();
        }
        else
        {
            {$this->mszHTMLForm}.NAV_INPUT_COORDINATES.value = szCoord;
            {$this->mszHTMLForm}.NAV_INPUT_TYPE.value = "RECTANGLE";
            document.onmousemove = null;
            document.onmouseup = null;
            document.onmousedown = null;
            {$this->mszHTMLForm}.submit();
        }
        return true;
    }
    return false;
}
EOT;
         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapWsetClip                                                     */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWsetClip";
         $szFunction = "function $szJsFunctionName()\n";
         $szFunction .= <<<EOT
{
    gMapWzright  = Math.max(gMapWx1, gMapWx2);
    gMapWzleft   = Math.min(gMapWx1, gMapWx2);
    gMapWzbottom = Math.max(gMapWy1, gMapWy2);
    gMapWztop    = Math.min(gMapWy1, gMapWy2);
    
    if ((gMapWx1 != gMapWx2) && (gMapWy1 != gMapWy2)) 
    {
        var ovBoxSize = {$this->mnMarqueeWidth};
        CWCDHTML_ClipLayer(gMapWtoplayer, gMapWzleft, gMapWztop, gMapWzright, gMapWztop + ovBoxSize);
        CWCDHTML_ClipLayer(gMapWleftlayer, gMapWzleft, gMapWztop, gMapWzleft + ovBoxSize, gMapWzbottom);
        CWCDHTML_ClipLayer(gMapWrightlayer, gMapWzright - ovBoxSize, gMapWztop, gMapWzright, gMapWzbottom);
        CWCDHTML_ClipLayer(gMapWbottomlayer, gMapWzleft, gMapWzbottom - ovBoxSize, gMapWzright, gMapWzbottom);
    }
}
EOT;
         $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      MapWCreateDHTMLLayers                                            */
/* -------------------------------------------------------------------- */
         $szJsFunctionName = "MapWCreateDHTMLLayers";
         $szFunction = "function $szJsFunctionName()\n";
         if (!$bCWCJSAPI)
             $url .= "&dummy=".urlencode(microtime());
        
        if ($this->mszWaitImage == "" || $this->mnWaitImageWidth == 0 || $this->mnWaitImageHeight == 0 )
        {
            if (isset($this->maSharedResourceWidgets["WaitImage"]->maszContents["WAITIMAGE"]))
            {
                foreach($this->maSharedResourceWidgets["WaitImage"]->maszContents["WAITIMAGE"] as $aWaitImage)
                {
                    if (isset($aWaitImage["LANGUAGE"]) && $aWaitImage["LANGUAGE"] == $_SESSION["gszCurrentLanguage"])
                    {
                        if (isset($aWaitImage["WAITIMAGE"]))
                            $this->mszWaitImage = $aWaitImage["WAITIMAGE"];
                        if (isset($aWaitImage["WAITIMAGEWIDTH"]))
                            $this->mnWaitImageWidth = $aWaitImage["WAITIMAGEWIDTH"];
                        if (isset($aWaitImage["WAITIMAGEHEIGHT"]))
                            $this->mnWaitImageHeight = $aWaitImage["WAITIMAGEHEIGHT"];

                    }
                }
            }
        }

         $waitImage = $this->mszWaitImage;
         if ($waitImage == "")
            $waitImage = "images/a_pixel.gif";

         $waitWidth = $this->mnWaitImageWidth;
         if ($waitWidth == 0)
            $waitWidth = 1;

         $waitHeight = $this->mnWaitImageHeight;
         if ($waitHeight == 0)
            $waitHeight = 1;

         $szFunction .= <<<EOT
{
    var content = "";
    //panning layer
    
    CWCDHTML_CreateLayer("MapLayerBG", gMapWhspc, gMapWvspc, gMapWiWidth, gMapWiHeight,
                         true, content);
    CWCDHTML_SetLayerBackgroundColor("MapLayerBG", 'WHITE');
    
    content = "<img name=\"MapLayerDivImg\" src=\"$url\" width=\"$nWidth\" height=\"$nHeight\" border=\"0\" onload=\"CWCDHTML_HideLayer('ActivityLayer');CWCDHTML_ShowLayer('MapLayerDiv')\">";
    CWCDHTML_CreateLayer("MapLayerDiv", gMapWhspc, gMapWvspc, gMapWiWidth, gMapWiHeight,
                          true, content);
    
    content = '<img name="ActivityImg" src="{$waitImage}" width="{$waitWidth}" height="{$waitHeight}" border="0">';
    CWCDHTML_CreateLayer("ActivityLayer", gMapWhspc + gMapWiWidth/2 - {$waitWidth}/2, gMapWvspc + gMapWiHeight/2 - {$waitHeight}/2, {$waitWidth}, {$waitHeight},
                         true, content);
    
    content = '<img name="MapLayerBGImg" src="images/a_pixel.gif" border="1">';
    
    content = '<img name="zImgTop" src="{$this->mszMarqueeImageVertical}" border="1">';
    CWCDHTML_CreateLayer("zBoxTop", gMapWhspc, gMapWvspc, gMapWiWidth, gMapWiHeight,
                         false, content);
    
    content = '<img name="zImgLeft" src="{$this->mszMarqueeImageHorizontal}" border="1">';
    CWCDHTML_CreateLayer("zBoxLeft", gMapWhspc, gMapWvspc, gMapWiWidth, gMapWiHeight,
                         false, content);
    
    
    content = '<img name="zImgBottom" src="{$this->mszMarqueeImageVertical}" border="1">';
    CWCDHTML_CreateLayer("zBoxBottom", gMapWhspc, gMapWvspc, gMapWiWidth, gMapWiHeight,
                         false, content);
    
    content = '<img name="zImgRight" src="{$this->mszMarqueeImageHorizontal}" border="1">';
    CWCDHTML_CreateLayer("zBoxRight", gMapWhspc, gMapWvspc, gMapWiWidth, gMapWiHeight,
                         false, content);
    
    
    boundingColor = '{$this->mszMarqueeColor}';
    CWCDHTML_SetLayerBackgroundColor("zBoxTop", boundingColor);
    CWCDHTML_SetLayerBackgroundColor("zBoxLeft", boundingColor);
    CWCDHTML_SetLayerBackgroundColor("zBoxRight", boundingColor);
    CWCDHTML_SetLayerBackgroundColor("zBoxBottom", boundingColor);
}

EOT;
         $aReturn[$szJsFunctionName] = $szFunction;

/* -------------------------------------------------------------------- */
/*       Initilalization function called from on load.                  */
/* -------------------------------------------------------------------- */
        $szJsFunctionName = "MapWidgetInitVariables";
        $szFunction = "function $szJsFunctionName()\n";
        $szFunction .= <<<EOT
{
    CWCIsNav4 = (document.layers) ? 1:0;
    
    CWCIsIE = (document.all) ? 1:0;
    CWCIsNav6 = (document.getElementById && !document.all) ? 1:0;
    
    // Constants
    gMapWvspcIEadjust = 0;// orginal code was 7;
    gMapWhspcIEadjust = 0;// orginal code was -2;
    gMapWiWidth = {$nWidth};
    gMapWiHeight = {$nHeight};
    gMapWhspc = 0;
    gMapWvspc = 0;
    
    if (document.layers) //Netscape 4.x
    {
        gMapWhspc = document.images['mapFrameTL'].x;
        gMapWvspc = document.images['mapFrameTL'].y;
    }
    else
    {
        gMapWhspc = CWCDHTML_FindObjectPosX( document.getElementById('mapFrameTL'));
        gMapWvspc = CWCDHTML_FindObjectPosY( document. getElementById('mapFrameTL'));
    }
    
    gMapWhspc+=1;
    gMapWvspc+=1;
    
    MapWsetZoomBoxSettings();
    MapWCreateDHTMLLayers();
}
EOT;
        $aReturn[$szJsFunctionName] = $szFunction;


/* -------------------------------------------------------------------- */
/*      if we use the JS API, add functions that will be called on      */
/*      events happning on the map.                                     */
/* -------------------------------------------------------------------- */
        if ($bCWCJSAPI)
        {
            $szJsFunctionName = "MapWMapExtentsChanged";
            $szFunction = <<<EOT
/**
 * {$szJsFunctionName}
 * called to initialize the JS API widget
 */
function {$szJsFunctionName}()
{
    var sImgName = "MapLayerDivImg";
    var url = "{$url}";
    var d = new Date();
    var unique = d.getTime() + '' + Math.floor(1000 * Math.random());
    url = url + "&UniqId="+unique;
    if (navigator.appName == "Netscape" && navigator.appVersion[0] <= 4)
    {
        document.layers["MapLayerDiv"].document.images[0].src=url; //for netscape4
    }
    else
    {
        document.images["MapLayerDivImg"].src = url;  //for IE and Netscape6 works
    }
}
EOT;

            $aReturn[$szJsFunctionName] = $szFunction;


            $bAllowResize = 0;
            if ($this->mbAllowResize)
              $bAllowResize = 1;
            $szJsFunctionName = "MapWRegisterForEvent";
            $szFunction = <<<EOT
/**
 * {$szJsFunctionName}
 * called to create a dynamic layer
 */
function {$szJsFunctionName}()
{
    goCWCJSAPI.RegisterEvent(MAP_EXTENT_CHANGED, "MapWMapExtentsChanged");
    goCWCJSAPI.RegisterEvent(LAYER_STATUS_CHANGED, "MapWMapExtentsChanged");
    goCWCJSAPI.RegisterEvent(LAYER_ORDER_CHANGED, "MapWMapExtentsChanged");
    goCWCJSAPI.RegisterEvent(LAYER_STYLE_CHANGED, "MapWMapExtentsChanged");
    goCWCJSAPI.RegisterEvent(MAP_NEW_LAYER_ADDED, "MapWMapExtentsChanged");
    goCWCJSAPI.RegisterEvent(MAP_NEW_ELEMENT_ADDED, "MapWMapExtentsChanged");

    //set the js map object to allow resizing or not.
    goCWCJSAPI.oMap.bAllowResize = {$bAllowResize};
}
EOT;

           $aReturn[$szJsFunctionName] = $szFunction;


        }

        return $aReturn;
    }



    /**
     * GetJavascriptOnMouseMoveFunctions
     *
     * Returns functions to be called on mouse mouve event.
     */
    function GetJavascriptOnMouseMoveFunctions()
    {
        $aReturn = array();
        $szJsFunctionName = "MapWgetMouse";
        $szFunction = "$szJsFunctionName(e);\n";
        $aReturn[$szJsFunctionName] = $szFunction;

        return $aReturn;
    }

    /**
     * GetJavascriptOnMouseUpFunctions.
     *
     */
    function GetJavascriptOnMouseUpFunctions2()
    {
        $aReturn = array();
        $szJsFunctionName = "MapWchkMouseUp";
        $szFunction = "$szJsFunctionName(e);\n";
        $aReturn[$szJsFunctionName] = $szFunction;

        return $aReturn;
    }

    /**
     * GetJavascriptOnMouseDownFunctions
     *
     */
    function GetJavascriptOnMouseDownFunctions2()
    {
        $aReturn = array();
        $szJsFunctionName = "MapWmapTool";
        $szFunction = "$szJsFunctionName(e);\n";
        $aReturn[$szJsFunctionName] = $szFunction;

        return $aReturn;
    }


    /**
     * GetJavascriptOnLoadFunctions
     *
     * On load functions.
     */
    function GetJavascriptOnLoadFunctions()
    {
        $aReturn = array();

        $aReturn = parent::GetJavascriptOnLoadFunctions();

        if (isset($this->maSharedResourceWidgets["CWCJSAPI"]))
        {
             $szJsFunctionName = "MapWRegisterForEvent";
             $szFunction = "$szJsFunctionName();\n";
             $aReturn[$szJsFunctionName] = $szFunction;
        }

        return $aReturn;
    }



    /**
     * GetJavascriptInitFunctions
     *
     * Functions to be called at the end of the load.
     */
    function GetJavascriptInitFunctions()
    {
        $aReturn = array();

        $szJsFunctionName = "MapWidgetInitVariables";
        //$szFunction = "setTimeout('$szJsFunctionName()',5000);";
        $szFunction = "$szJsFunctionName();\n";
        $aReturn[$szJsFunctionName] = $szFunction;

        return $aReturn;
    }

    /**
     * GetJavascriptIncludeFunctions
     */
    function GetJavascriptIncludeFunctions()
    {
        $aReturn = parent::GetJavascriptIncludeFunctions();

        $szJsIncludeName = $_SESSION["gszCoreWebPath"]."/widgets/js/cwc_dhtml.js";
        $szInclude = '<script language="JavaScript" src="'.$szJsIncludeName.'"></script>';
        $aReturn[$szJsIncludeName] = $szInclude;

        return $aReturn;     
    }

    /**
     * GetJavascriptVariables
     *
     * Return JS global variables and global code.
     */
    function GetJavascriptVariables()
    {
        $aReturn = array();

        $szVariable = "gMapWvspcIEadjust";
        $szValue = " var $szVariable = 7;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWhspcIEadjust";
        $szValue = " var $szVariable = -2;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWiWidth";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWiHeight";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWhspc";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWvspc";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWmouseX";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWmouseY";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWx1";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWy1";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWx2";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWy2";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWfirstx";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWfirsty";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWsecondx";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWsecondy";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWzleft";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWzright";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWztop";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWzbottom";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWmapX";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWmapY";
        $szValue = " var $szVariable = 0;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWdragging";
        $szValue = " var $szVariable = false;\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWtoplayer";
        $szValue = " var $szVariable = \"zBoxTop\";\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWleftlayer";
        $szValue = " var $szVariable = \"zBoxLeft\";\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWbottomlayer";
        $szValue = " var $szVariable = \"zBoxBottom\";\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "gMapWrightlayer";
        $szValue = " var $szVariable = \"zBoxRight\";\n";
        $aReturn[$szVariable] = $szValue;

        $aReturn[$szVariable] = $szValue;

        return $aReturn;
    }

    /**
     * GetHTMLHiddenVariables
     *
     * Return HTML hidden variables.
     */
    function GetHTMLHiddenVariables()
    {
        $szVariable = "NAV_INPUT_TYPE";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"\">";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "NAV_INPUT_COORDINATES";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"\">\n";
        $aReturn[$szVariable] = $szValue;


        $poMap = $this->moMapObject->oMap;

        $szVariable = "MAP_EXTENTS_MINX";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"".$poMap->extent->minx."\">\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "MAP_EXTENTS_MINY";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"".$poMap->extent->miny."\">\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "MAP_EXTENTS_MAXX";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"".$poMap->extent->maxx."\">\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "MAP_EXTENTS_MAXY";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"".$poMap->extent->maxy."\">\n";
        $aReturn[$szVariable] = $szValue;

        $nWidth = $poMap->width;
        $nHeight = $poMap->height;

        $szVariable = "MAP_WIDTH";
        $szValue = "<INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"$nWidth\">\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "MAP_HEIGHT";
        $szValue = "<INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"$nHeight\">\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "MAP_CURSOR_POS_X";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"\">\n";
        $aReturn[$szVariable] = $szValue;

        $szVariable = "MAP_CURSOR_POS_Y";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"\">\n";
        $aReturn[$szVariable] = $szValue;

        //added NAV_CMD because it is used in the mapdhtml. It was
        //initially created only by the nav tools and could cause
        //a js error if there is no nav tool.
        $szVariable = "NAV_CMD";
        $szValue = " <INPUT TYPE=HIDDEN NAME=$szVariable VALUE=\"\">\n";
        $aReturn[$szVariable] = $szValue;


        return $aReturn;
    }
}
?>

--------------080006000001070002010405--



This archive was generated by Pipermail.