|
||||
[Chameleon] zoomscalePaul Spencer spencer@dmsolutions.caMon, 19 Jan 2004 08:53:12 -0500
|
John, I think this is a valid request and your assessment of the problem appears to be corrrect, but pls note that the widget doesn't claim to center the map on the point :) Your solution is a quick fix, but having reviewed the code it seems to me that there is quite a lot of extra code in there for such a simple request. This is because we are trying to reuse existing navigation code and it all works on user input from pixel locations. I will file a bug to review this and look at providing some simpler code that navigates based on geographic location. Cheers, Paul John Pulles wrote: > 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. > -- ----------------------------------------------------------------- |Paul Spencer spencer@dmsolutions.ca | |-----------------------------------------------------------------| |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| -----------------------------------------------------------------
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |