[ka-Map-users] RE: Ka-map zoombox/rubberband example

Peter Giencke pgiencke at glc.org
Thu Sep 8 16:23:46 EDT 2005


Paul,

Because of the finite number of scales (and extents) available to ka-map,
smaller/larger extents than the smallest/largest scale may present a
problem. If it's something people want I can take a look into it.

Inclusion of this code in the ka-Map cvs would be great, perhaps I should
come up with a bit of documentation to go along with it first....

-pete

-----Original Message-----
From: Paul Spencer [mailto:pspencer at dmsolutions.ca] 
Sent: Thursday, September 08, 2005 1:21 PM
To: pgiencke at glc.org
Cc: ka-map-users at lists.maptools.org
Subject: Re: Ka-map zoombox/rubberband example

Cool!  Do you plan to put any restrictions on the rubber band like forcing
the aspect ratio of the box to match that of the viewport?

Do you want to have this code in ka-Map cvs?

Cheers

Paul

Peter Giencke wrote:
>  
> Paul,
> 
> I got a quick and dirty zoombox/rubberband function written last 
> night, it's
> here:
> http://mds.glc.org/kamap_cvs3/
> 
> For now, it's using ka-map's zoomToExtents function which is fed the 
> coordinates of the zoombox. Admittedly, this solution requires a fair 
> number of available scales (I'm using 4) to match the zoombox to the map's
extent.
> It's a fairly straightforward solution, using a div and 
> css(loslrs.css) to create the zoombox, and overrides (loslrs.js) 
> ka-map's mouseup, mousedown, and mousemove functions to control it.
> 
> Comments, questions, etc, lemme know,
> -pete
> 
> PS our server is being slow today, so the app might be a bit sluggish....
> 
> 
> -----Original Message-----
> From: Paul Spencer [mailto:pspencer at dmsolutions.ca]
> Sent: Tuesday, September 06, 2005 3:09 PM
> To: pgiencke at glc.org
> Cc: percyd at pdx.edu; lorenzo at ominiverdi.com; 
> ka-map-users at lists.maptools.org
> Subject: Re: [ka-Map-users] Re: Kamap Query System
> 
> Cool.
> 
> a rubber band zoom has not been done yet, I would love to have one. 
> However, for ka-Map I think it is important to implement a rubber band 
> zoom that is sensitive to both the aspect ratio of the current view 
> AND the available scales.  This means that the box should be drawn in 
> the same ratio of width to height and it should be drawn in sizes that 
> match what the user will seem when they actually zoom.  This means that
the box will 'snap'
> between various pre-set sizes as the user moves the mouse.
> 
> I'm not opposed to a different type of rubber band zoom, but I think 
> this one is the most visually accurate for the user and is the one I 
> am most likely to want to add :)  If you implement it differently and 
> want to contribute it, I'd like to hear arguments for/against my 
> proposal from the others on the list
> 
> Cheers
> 
> Paul
> 
> 
> ----------------------------------------------------------------------
> --
> 
> body {
>     margin: 0px;
>     padding: 0px;
>     background-color: white;
>     overflow: hidden;
> }
> 
> .mapLayer1 {
>     visibility: visible;
>     position: absolute;
>     left: 0px;
>     top: 0px;
>     width:1020px;
>     height:1020px;
> 
> }
> 
> #menuSelect
> {
>     position: absolute;
> 	z-index: 999;
> 	visibility:hidden;
> }
> 
> #viewport {
>     position: relative;
>     background-color: #f0f0f0;
>     overflow: hidden;
>     border: 1px solid #000000;
>     width: 800px;
> }
> 
> #toolbar {
>     font-family: arial;
>     font-size: 16px;
>     font-weight: bold;
>     width:100%;
> }
> 
> #footer {
>     font-family: arial;
>     font-size: 10px;
>     width:100%;
>     height: 25px;
> }
> 
> #hourglass
> {
>     visibility:hidden;
>     position:absolute;
>     top: 230px;
>     right: 100px;
>     z-index: 999;
> }
> 
> #legend {
>     position: relative;
>     overflow: none;
>     background-color: #f0f0f0;
>     border: 1px solid #000000;
> }
> 
> #legend2 {
>     position: relative;
>     overflow: none;
>     background-color: #f0f0f0;
>     border: 1px solid #000000;
> }
> 
> #mapC {
>     position: absolute;
>     top: 50px;
>     z-index:199;
>     visibility:hidden;
> }
> 
> #mapB {
>     position: absolute;
>     top: 70px;
>     z-index:199;
>     visibility:hidden;
> }
> 
> #mapD {
>     position: absolute;
>     font-family:courier;
>     font-size:10pt;
>     font-weight:300;
>     left: 825px;
>     bottom: 40px;
>     z-index:199;
> }
> 
> #keymap {
>     position: relative;
>     width: 250px;
>     height: 150px;
>     overflow: hidden;
>     background-color: #f0f0f0;
>     border: 1px solid #000000;
> }
> 
> #scalebar {
>     position: absolute;
>     left: 35px;
>     z-index:99;
>     overflow: hidden;
>     /*background-color: #f0f0f0;*/
>     border: 0px solid #000000;
> }
> 
> 
> .bevel {
>     border-top: 1px solid #666666;
>     border-left: 1px solid #666666;
>     border-right: 1px solid #ffffff;
>     border-bottom: 1px solid #ffffff;
> }
> 
> .label {
>     font-family: arial;
>     font-size: 11px;
>     font-weight: normal;
> }
> 
> 
> .value {
>     font-family: arial;
>     font-size: 11px;
>     font-weight: bold;
> }
> 
> .title {
>     font-family: arial;
>     font-size: 24px;
>     font-weight: bold;
> }
> 
> a { text-decoration: none; color: #333366; }
> 
> .copyright {
>     font-family: arial;
>     font-size: 10px;
>     color: #000033;
> }

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+



More information about the ka-Map-users mailing list