Bug 980 - KeyMapDHTML: Display crosshairs when zoomed in.
: KeyMapDHTML: Display crosshairs when zoomed in.
Status: ASSIGNED
: Chameleon
Widget
: 2.0
: All All
: P2 enhancement
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-03-02 19:47 by
Modified: 2006-08-08 07:50 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-03-02 19:47:32
It would be nice if the KeyMapDHTML widget would display a crosshair indicating
where you are on the map (similar to how the KeyMap widget works).  When zoomed
in to a small scale the normal red box becomes a single dot, and at even smaller
scales disappears completely.

Thanks,
Corey
------- Comment #1 From 2006-04-18 04:19:26 -------
We have some code here which can accomplish this. I will put this on my todo
list. Assigning the bug to myself.
------- Comment #2 From 2006-08-08 07:50:45 -------
Documentation for this change:

There are the following extra optional widget attributes:
-PINPOINTIMAGE
-PINPOINTIMAGE_XOFFSET
-PINPOINTIMAGE_YOFFSET
-PINPOINTHORIZONTALIMAGE
-PINPOINTVERTICALIMAGE
-MAXPINPOINTIMAGE_SCALE
-MINBOXSIZE

One can use a single image (cross) for display (PINPOINTIMAGE). Or 2 separate
images (horizontal stripe, vertical stripe), which will be composed to a cross like:

  |
 - -
  |

The last option is using PINPOINTHORIZONTALIMAGE and PINPOINTVERTICALIMAGE. The
offsets are half the size of the image (PINPOINTIMAGE_XOFFSET is half of the
width) in pixels and need to be given irregardless of which option is chosen.

There are 2 options to determine when the crosshair should be shown instead of
the box:
1. by scale, using MAXPINPOINTIMAGE_SCALE, under this map scale a cross will be used
2. by using a minimum size in pixels for the box of the keymap, MINBOXSIZE

The images can be absolute or relative url's.

Example definition:
                         <cwc2 type="KeyMapDHTML"
                               SRS="28992"
                               OUTLINECOLOR="255 0 0" color="-1 -1 -1"
                               KEYMAP_DHTML_MODE="ZOOM"
                               IMAGE="skins/nederland_ref.png"
                               WIDTH="188" HEIGHT="217"
                               MINX="10000"  MAXX="282500"
                               MINY="300400" MAXY="616250"
                               MINBOXSIZE=""
                               PINPOINTHORIZONTALIMAGE="skins/icon_pinpoint_hor.png"
                               PINPOINTVERTICALIMAGE="skins/icon_pinpoint_vert.png"
                               PINPOINTIMAGE_XOFFSET="10"
                               PINPOINTIMAGE_YOFFSET="10"
                               MAXPINPOINTIMAGE_SCALE="25000"
                         />