dBox main.dragOn persistence

Richard Greenwood richard.greenwood at GMAIL.COM
Fri Feb 1 22:24:23 EST 2008


It looks to me like you are persisting your state, but you have
something peculiar with the box behavior. Pan keeps working as long as
I don't drag. (and you're never getting an image drag.)

Try setting boxoff() and dragon().

Rich


On Feb 1, 2008 3:34 PM, Lawrence Hartpence
<hartpence_gis at co.jasper.ia.us> wrote:
> Hello,
>
> I am using dBox with CGI MapServer 4.8 in a MS4W configuration.  The URL for
> my site is http://71.7.3.212/JasperMaps/Parcels/goParcels.html
>
> I have a pick list selections to zoom out, zoom in or pan.  I am trying to the
> dragOn() method for the pan tool.  This works the first time I select PAN from
> the pick list, but if I want to drag another pan, I need to select it from teh
> pick list again.  Does anyone know what I am missing?  The following is the
> part of my code where I am trying to set this up.
>
>
> Thanks!
> Lawrence
>
> function main_setbox(minx, miny, maxx, maxy) {
>
>       var MSMode = document.the_form.mode.value
>       var zoomVal = document.the_form.zoomdir.options
> [document.the_form.zoomdir.selectedIndex].value;
>         //document.the_form.zoomdir.value = zoomVal;
> alert(zoomVal)
>     if(MSMode == 'browse') {
>         if (zoomVal == 1 &&amp; minx != maxx &&amp; miny != maxy){
>
>          document.the_form.imgbox.value = minx + " " + miny + " " + maxx + " "
> + maxy;
>          document.the_form.submit();
>
>            }
>       else if (zoomVal == 1 &&amp; minx == maxx &&amp; miny == maxy){
>
>          document.the_form.imgxy.value = minx + " " + miny;
>          document.the_form.submit();
>          }
>         if (zoomVal == 0 &&amp; minx != maxx &&amp; miny != maxy){
>
>          document.the_form.imgbox.value = minx + " " + miny + " " + maxx + " "
> + maxy;
>          document.the_form.submit();
>
>            }
>       else if (zoomVal == 0 &&amp; minx == maxx &&amp; miny == maxy){
>
>          document.the_form.imgxy.value = minx + " " + miny;
>          document.the_form.submit();
>          }
>
>         if (zoomVal == -1){
>
>          document.the_form.imgxy.value = minx + " " + miny;
>          document.the_form.submit();
>          }
>
>
>           }
>
>
>      else if(MSMode != 'browse') {
>
>       if(minx != maxx &&amp; miny != maxy){
>          document.the_form.imgbox.value = minx + " " + miny + " " + maxx + " "
> + maxy;
>          document.the_form.submit();
>            }
>       else {
>          document.the_form.imgxy.value = minx + " " + miny;
>          document.the_form.submit();
>          }
>
>     }
>   }
>



-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the mapserver-users mailing list