Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: mapping problem
08-02-2012, 11:26 PM #1
- Join Date
- Aug 2012
- Thanked 0 Times in 0 Posts
Please see this test page:
The issue is that the co-ordinates do not change correctly on the stop dragging event 'mouse up'
I have offset the margin of the window so that the change in margin can change the margin can be used to change the x,y by the number of pixels that have been 'dragged' , and even if I modify the pixels by the reolution of the imagery displayed it still doesn't work, perhaps this is a rounding issue.
var oldx = x;
var sm = -250;
dragging = false;
var xm = parseFloat($('#viewerWindow').css('margin-left'));
var ym = parseFloat($('#viewerWindow').css('margin-top'));
var baseRes = parseFloat($(xml).find("layer").eq(d).attr("resolution"))/100;
var sizem = parseFloat($(xml).find("layer").eq(d).find("size").eq(s).attr("m"));
y = y + (ym-sm);
x = x - (xm+sm);
$("#q").val(x +","+ y +","+baseRes);