[Chameleon-dev] [Bug 936] New: [Chameleon - Widget] UpdateMap
broken in CWCJSAPI mode
bugzilla-daemon at maptools.org
bugzilla-daemon at maptools.org
Tue Jan 25 07:58:12 EST 2005
http://www.maptools.org/bugzilla/show_bug.cgi?id=936
Summary: [Chameleon - Widget] UpdateMap broken in CWCJSAPI mode
Product: Chameleon
Version: 2.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Widget
AssignedTo: chameleon-dev at lists.maptools.org
ReportedBy: pspencer at dmsolutions.ca
Giuseppe,
That problem has been there for a while. I once fixed it in my own site in
version 1.0.4 when I did some debugging, but I never submitted a bug for it.
Paul, does a bug exist for it? I didn't find one, but it seemed so obvious that
I can't imagine no one else noticed in all that time.
This is what needs to be done:
in UpdateMap.widget.php, line 137, inside the body of the function
"clickUpdateMap", the following lines should be added:
------------------------------------------------------------------------------------------------------------------------
{$this->mszHTMLForm}.MAP_EXTENTS_MINX.value = goCWCJSAPI.oMap.minx;
//custom added, not to lose extents
{$this->mszHTMLForm}.MAP_EXTENTS_MAXX.value = goCWCJSAPI.oMap.maxx;
{$this->mszHTMLForm}.MAP_EXTENTS_MINY.value = goCWCJSAPI.oMap.miny;
{$this->mszHTMLForm}.MAP_EXTENTS_MAXY.value = goCWCJSAPI.oMap.maxy;
{$this->mszHTMLForm}.NAV_CMD.value = ""
------------------------------------------------------------------------------------------------------------------------
before the line
------------------------------------------------------------------------------------------------------------------------
{$this->mszHTMLForm}.UPDATE_MAP.value = "1";
------------------------------------------------------------------------------------------------------------------------
This makes sure that whatever was changed in javascript gets saved before it's
submitted.
regards,
Jacob
-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Giuseppe Tradigo
Sent: 24 January 2005 00:58
To: chameleon at lists.maptools.org
Subject: [Chameleon] Not usual "update" widget behaviour while updating map
By activating JS-API using the following tags in the template file:
<cwc2 type="cwcjsapi" debug="false"/>
<cwc2 type="SharedResource" name="CWCJSAPI"/>
the "update" widget has a reproducible wrong behaviour: using the zoom
widget a couple of times over the map and then clicking update (wether
or not changing the visible layers) will cause the map-view beeing reset
to the center of the map.
----------------------------------------
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
- Brian W. Kernighan
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon
JACOB DELFOS
SPATIAL INFORMATION ANALYST
Maunsell Australia Pty Ltd
629 Newcastle Street, WA 6007
PO Box 81, WA 6902
Leederville
Western Australia
ABN 20 093 846 925
Tel + 61 8 9281 6185
Fax + 61 8 9281 6297
jacob.delfos at maunsell.com
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Chameleon-dev
mailing list