MapTools.org

[Chameleon] Pixel to Geo Conversion problems

J. Delfos delfos@myrealbox.com
Thu, 26 Feb 2004 22:15:20 -0800 (PST)
Jeff,

I have had similar problems, though not exactly the same. The problems I
had were that changes made to the map extent by javascript parts (e.g.
zooming and recentering) were forgotten as soon as I submitted the form;
it went back to the original extent. I patched it by pasting this code
into the "clickUpdateMap" function, in Updatemap.Widget.php:

    {$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 makes sure that the form variables for your extent are up to date
compared to what your javascript did, when you submit the form. Perhaps
you should try having it execute this code prior to using the functions
which currently aren't working, to make sure your form variables are
current before it does any processing.

regards,

Jacob



--- Jeff Hamm <jeff@planyukon.ca> wrote:
> 
> I've previously reported that my PrintWidget did not use the updated
> extents of my DHTML map (e.g. after a zoom operation). It appears that
> my 'stock versions' of Query and ROI widgets are also affected (under
> IE5.5).
> In the case of Query, I used debug messages to discover the values of
> click coords, and its clearly evident that the min/max extent are always
> the same. For the ROI widget, defined regions are displayed as though
> the map were displayed at full extent. If I zoom in, define an ROI, the
> region appears scaled and positioned according to the original extents.
> 
> REcenter widget works OK, but it doesn't do a pixeltogeo conversion, so
> I'm wondering where to look for the problem.
> 
> Anyone experiencing similar problems? suggestions?
> To reproduce the problem, try doing a point query at a couple of
> different display extents here: atlas.planyukon.ca/chameleon/htdocs
> 
> Thanks
> Jeff Hamm
> YLUPC
> Yukon, CANADA
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon


__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools


This archive was generated by Pipermail.