[ka-Map-users] mouse quest

Paul Spencer pspencer at dmsolutions.ca
Sun Oct 29 22:24:18 EST 2006


No doubt it could stand some improvement.

Currently the mouse cursor is controlled in the code.  There is no  
way to override it using CSS which seems like a shame.  I think this  
may be a good change.

I remember implementing this and having problems with the target  
ids.  I never came up with a good way to handle this.  I'm more than  
willing to commit code if you can figure out how it should work.

Google's functionality is decent and I would be happy for ka-Map to  
work that way.

Cheers

Paul

PS if you are going to attempt this and you can get it done in a week  
or two, I'll include it in the next ka-Map beta - otherwise it may  
have to wait until after 1.0 final 'cause I'll only be accepting bug  
fixes after the next beta.

On 29-Oct-06, at 9:46 PM, Zeppe wrote:

> Hi everyone,
> I don't know how about you, but I really don't like the mouse  
> behaviour in ka-map. At least the way it is implemented in  
> kaNavigator.
>
> First I can't set the cursor in FireFox. When it is cursor:move in  
> stylesheet it activates only when I am on the border of the map  
> viewport.
>
> Second and the most annoying thing is when mousepressed and you  
> drag it outside the map viewport, then try to comeback with mouseup  
> kaNavigator treats it as the mouse is pressed and drags it further  
> with jumping efekts.
>
> Third kaNavigator has such implementation for mouseout:
> kaNavigator.prototype.onmouseout = function(e) {
>     e = (e)?e:((event)?event:null);
>     if (!e.target) e.target = e.srcElement;
>     if (e.target.id == this.kaMap.domObj.id) {
> 	//?????????????????????
>     	this.bMouseDown = false;
>         return kaTool.prototype.onmouseout.apply(this, [e]);
>     }
> };
> However the code never gets through the second "if". Namely  
> e.target.id is never equal this.kaMap.domObj.id. I tried to  
> window.alert the value, and surprisingly I get that e.target.id are  
> the ids of tiled images, i.e. i0, i1 ... Moreover, disabling  
> mouseout event for kaMap does not help at all, behaviour is  
> practically the same as with the mouseout.
>
> Well, I've been struggling with these three problems for the whole  
> day but in vain. Basically, what I wanted to do is to make mouse  
> behave like in GoogleMaps: you drag the map until mouseup.
> Is there anyone who has a clue about solutions for these problems?  
> I've looked up many examples in ka-map wiki, but no one has  
> approached these problems.
>
> Thanks in advance, guys
>
> Zeppe
> _______________________________________________
> 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    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+






More information about the ka-Map-users mailing list