[ka-Map-users] Query tool question (make it resizable?)

Clark Endrizzi cendrizzi at gmail.com
Tue Sep 27 13:21:56 EDT 2005


Hmm, actually this will be trickier than I first thought...

When you zoom in it should resize the query sqaure and make it bigger based
on the zoom. That's kinda tough but I'm sure there are some functions that
would assist in this isn't there? SInce the size of the square on the mini
map change and all. Any pointers?

Thanks,
Clark

On 9/27/05, Clark Endrizzi <cendrizzi at gmail.com> wrote:
>
> Ok, I implemented the ability to stay.
> http://dev.naiutah.com/KaMap/cvs_version/htdocs/
>
> I would love to see this option become a part of kamap (so I don't have to
> modify it manually every time I upgrade). so I tried to make it work well
> (even commented!). Basically I added a third argument called "options" to
> the query class/object that I figure could be used to specify the behaivor
> of the query tool. Currently I only have "stay" as an option (which might
> sound lame but I couldn't think of a better option name). I think I'm going
> to play with doing some other options as well, like maybe the resizable
> stuff. This way I figure the options argument could be added as comma
> seperated arguments or something. Perhaps this doesn't follow the same
> programming style, let me know how I could change it if it doesn't..
>
> There is some things that could probably be changed. Like if you have a
> selection box currently available then a single click should cancel it....
>
> The notable code is below:
> the class:
> function kaQuery( oKaMap, type, options)
>
> In the mouse up section:
>  if(this.options = 'stay'){
> this.bMouseDown = false;
> }else{
> this.startx = this.endx = this.starty = this.endy = null;
> }
>
> Thanks,
> Clark
>
> On 9/27/05, Paul Spencer <pspencer at dmsolutions.ca> wrote:
> >
> > I don't believe I've seen a query tool that works this way before.
> > You could probably modify the existing query tool to do what you
> > want, but it will be tricky to make it moveable/resizeable. It would
> > be trivial to leave the query rectangle on the map after mouseup and
> > to provide a clear capability. I would start there and then go on to
> > see if you can make it resize.
> >
> > Cheers
> >
> > Paul
> >
> > On 27-Sep-05, at 11:51 AM, Clark Endrizzi wrote:
> >
> > > Hi,
> > > Every other feature I've thought I might need to implement has
> > > either been implemented or trivial to do some other way than I was
> > > thinking. With this in mind, the default query tool doesn't quite
> > > work the way I'd like it to so I'm curious if there is any easy way
> > > to make it work this way (described below).
> > >
> > > I would rather the query stay where it is and make it resizable.
> > > After the resize it would return the coordinates just like it is
> > > now. If the user want to do a different query region altogether
> > > they would use the query tool and draw another and/or there could
> > > be a clear button. This could be done quite well using the
> > > availabe cursors and stuff but I imagine knowing whether you're at
> > > the border won't be as trivial as my image question. Has it been
> > > done?
> > >
> > > --
> > > -Clark Endrizzi
> > > _______________________________________________
> > > ka-Map-users mailing list
> > > ka-Map-users at lists.maptools.org
> > > http://lists.maptools.org/mailman/listinfo/ka-map-users
> > >
> >
> > +-----------------------------------------------------------------+
> > |Paul Spencer pspencer at dmsolutions.ca |
> > +-----------------------------------------------------------------+
> > |Applications & Software Development |
> > |DM Solutions Group Inc http://www.dmsolutions.ca/|<http://www.dmsolutions.ca/%7C>
> > +-----------------------------------------------------------------+
> >
> >
> >
> >
> >
>
>
> --
> -Clark Endrizzi
>



--
-Clark Endrizzi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20050927/31b32d47/attachment.html


More information about the ka-Map-users mailing list