[Chameleon-dev] [Bug 1367] [Chameleon-Widgets]Locate widget used with cwcjsapi does not zoom to the location

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Tue Mar 21 15:32:14 EST 2006


------- Additional Comments From nsavard at mapgears.com  2006-03-21 15:32 -------
There are three issues.

1)  In update.php, when "ADD_POINT_WIDGET" or "ADD_RECTANGLE_WIDGET" form
variable is set a new Locate instance is created.  The Locate setURL() method is
then called but return false since "mbInitDefaults" widget flag is false.  To
overcome this we need to call the Locate InitDefaults() method before calling
setURL() method.

2) The coordinates are not extracted correctly in LocateCB() function in
Locate.widget.php when the element type is a rectangle or a feature.  To correct
that we have to modify the existing code as follow:

if ({$bCWCJSAPI})
    LabelCoords = wh.szLatLong.split("|");
    szCoords = aLabelCoords[1];

    if (point)
        aCoords = szCoords.split(",");

        other code here ...
    else if ( rectangle or feature) 
        aRectCoords = szCoords.split(";");
        aCoordsFirstPoint = aRectCoords[0].split(",");
        aCoordsSecondPoint = aRectCoords[1].split(",");

                                  aCoordsFirstPoint[1], aCoordsSecondPoint[0], 
                                  aLabelCoords[0], "LATLONG",
                                  wh.bAddPoint, wh.bZoomTo);


3)  Finally the window does not close when we click on the "Ok" button.  To fix
that we have to move "wh.close" at the last position in the if ({$bCWCJSAPI})
{...} block  of code.

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.

More information about the Chameleon-dev mailing list