You need to log in before you can comment on or make changes to this bug.
Reported by Bart. Note none of the sample templates test this case, propose to modify one of the samples to test this and to have a test for it in the future. > Hi list, > > I have a problem with the KeyMapDHTML2 widget. The box indicated on the > key map is not correct when the pixel width/height proportions differ > between KeyMap and MapDHTMLWidget. > > My MapDHTML widget has the following dimensions: width 800 height 560 > > My key map has the following dimensions: > > <cwc2 type="KeyMapDHTML2" > image="C:/ms4w/apps/geoservices05/htdocs/images/nederland.png" SRS="28992" > WIDTH="135" HEIGHT="157" MINX="20000" MAXX="285000" MINY="305000" > MAXY="620000" /> > > Is this to be considered a bug in the KeyMap, or is this by design? I.e. > should all applications use a key map in the same proportions as the main > map?
look at this after the beta
Paul, any news on this one? We would need this one before the end of June. If it needs some funding to get it fixed, let me know. Bart
Bart I think I have this problem fixed, can you update the KeyMapDHTML2 widget and retest ...
Hi Paul, I checked this one, but it still has problems. The main problem is that the width and height ratio from the box drawn in the keymap widget, are the width and height ratio from the keymap dimensions, and not from the main map dimension. You can see the behaviour in action at: http://www.vz.geodan.nl:1112/geoservices05/index.phtml In my demo the box in the keymap should be a lot wider than it is. I think when it is wider, it will be right, also with regard to the position. Bart
Bart, I have come to realize that the KeyMapDHTML2 widget is missing a fairly important capability. The attribute list includes minx, miny, maxx, maxy and SRS, but these values are never used in the code. The problem I fixed before made navigation on the keymap seem to work correctly, but now I am not entirely sure. The navigation code does not take into consideration the extents of the keymap and the SRS of the keymap. This means that the widget only works correctly when the keymap extents and SRS match the map's extents ... I believe that it is correctly accomodating aspect ratio differences, but not geographic differences. This is a non-trivial amount of work to fix.
I changed my Chameleon MAP EXTENT values to match the minx, maxx, miny, maxy values of my reference image. Also, the SRS of both are the same (EPSG:28992). The problem still exists though. Extent in MAP file: EXTENT 20000 285000 305000 620000 SIZE 800 560 <cwc2 type="KeyMapDHTML2" image="C:/ms4w_20/apps/geoservices05/htdocs/images/nederland.png" SRS="28992" WIDTH="135" HEIGHT="157" MINX="20000" MAXX="285000" MINY="305000" MAXY="620000" /> Size of the MapDHTMLWidget is also 800 by 560 pixels.
I have fixed this to calculate the bbox to the correct aspect ratio, cvs has been updated. I am not marking this as fixed because in my testing I may have ran accross another issue with the same symptoms. Bart can you please see if my fix solves your problem?
OK, I tracked down the additional problem I was having. When chameleon was drawing the bbox on the keymap it was also using the map height and width ratio instead of the reference map height and width ratio. Fixed in CVS. Everything seems to be working now.
Verified with CVS. Works swell now.
Closing bug