|
||||
[Chameleon] zoomscaleJohn Pulles john.pulles@geodan.nlMon, 19 Jan 2004 11:11:33 +0100
|
Hi list, It seems a (modified) Locate widget does not do an accurate zoom to scale. We modified the Locate widget to zoom to a scale of 50000 and noticed that the centre of the map was not close to the requested location. Looking into the code (at the end of the parseUrl function of the Locate widget) the problem seems that first the pixel coordinates are calculated based on the full (?) extent of the map; after this the zoom function is called. I am not sure if I fully comprehend the code, but it seems more logical to me if the zoom function would use map/world coordinates instead of pixels, or else calculate the pixel coordinates after the zoom-to-scale has been done. The workaround seems to be to use the MapNavigator->recentre function after having recalculated the pixel coordinates with the extent after-the-zoomin. Is this the correct way, or should something else be done? Regards, John. -- ------------------------------------- E-mail: john.pulles@geodan.nl Website: http://www.geodan.nl -------------------------------------
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |