[Chameleon] Not usual "update" widget behaviour while updating map -
fixed
Jacob Delfos
jacob.delfos at maunsell.com
Tue Jan 25 03:34:45 EST 2005
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20050125/8f4f7a09/attachment.html
More information about the Chameleon
mailing list