You need to log in before you can comment on or make changes to this bug.
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@lists.maptools.org [mailto:chameleon-bounces@lists.maptools.org] On Behalf Of Giuseppe Tradigo Sent: 24 January 2005 00:58 To: chameleon@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@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@maunsell.com _______________________________________________ Chameleon mailing list Chameleon@lists.maptools.org http://lists.maptools.org/mailman/listinfo/chameleon
actual fix applied to both 2.1 and 2.0 was: if ({$bCWCJSAPI}) { {$this->mszHTMLForm}.MAP_EXTENTS_MINX.value = goCWCJSAPI.oMap.minx; {$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 = ""; } where $bCWCJSAPI is calculated in PHP as: $bCWCJSAPI = (isset($this->maSharedResourceWidgets["CWCJSAPI"])) ? 1 : 0;