Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-02-2012, 10:26 PM   PM User | #1
tsam
New to the CF scene

 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
tsam is an unknown quantity at this point
mapping problem

Please see this test page:

http://www.ukaerialphotos.com/test.a...39023&y=141026

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.


function up()
{
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);


}
tsam is offline   Reply With Quote
Reply

Bookmarks

Tags
javascript, map

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:36 AM.


Advertisement
Log in to turn off these ads.