1 我用了一个pictureBox,现在需要在这个图片pictureBox1上用鼠标拉一个巨型区域出来,并使这个区域按1:2的比例放大成图片pictureBox2,怎样做?
2 放大以后,我在这个pictureBox2上选一个点(比如点选北京),得到它的坐标(应该是工作区坐标吧),这个坐标是北京在pictureBox2上的坐标,现在我需要根据这个坐标求出北京在pictureBox1上的坐标,怎么做?
请高手指点
如能解决这个问题,300分相送!!决不失言

解决方案 »

  1.   

    那要看你是基于啥做的啊。代码应该是写在javascript中吧。我用的是javascript做的。不知道别的是否可以做。
      

  2.   

    可以到www.go2map.com看看源代码。很多的代码
      

  3.   

    用vml可以实现,而且代码比较简单
      

  4.   

    http://community.csdn.net/Expert/topic/3278/3278106.xml?temp=3.374881E-02
      

  5.   

    同意楼上的,用vml解决,简单。
      

  6.   

    搞webgis啊 呵呵 
    偶有supermapis 和 mapxtreme 
    有意可联系
      

  7.   

    可以到www.go2map.com看看源代码。很多的代码
    可以到www.go2map.com看看源代码。很多的代码
      

  8.   

    用的电子地图的知识
    我们公司在做,用的active控件!
    你的问题比较的难,可以到
    这个网站看看:
    http://www.kstv.com.cn/myksmap/ksmap_main.asp
      

  9.   

    单是用Picture等控件是难以做到的。你必须自己开发一套组件,对图像进行处理的组件。可以选择GDI+ 或者是用ArchGis和ArchIMS来实现地图的浏览和查询功能,再把他嵌入到Asp.net中来。
      

  10.   

    找一下webgis的资料吧,现在比较热门
      

  11.   

    http://www.codeproject.com/aspnet/imagemap.asp
      

  12.   

    yeefly(topn.net)(Web开发版) 
    你是mapinfo公司老总?
      

  13.   

    js模拟的,和你提的还有差距
    <!--- THE SITE IS DESIGNED BY MYHYLI --->  
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script language="JavaScript">
    <!--
    var zoomvalue=3;
    var magnifierw0=100;
    var magnifierh0=50;function init() {
    document.body.innerHTML+='<div id="magnifier" style="background-image:url(images/spacer.gif);position:absolute; width:100px; height:50px; z-index:100; left: 0px; top: 0px;border:1px solid #FF0000;visibility:hidden;text-align:right;font-size:10px;font-family:Verdana;color:#FF0000;cursor:default;overflow:hidden" onclick="showhide()" onselectstart="return false;">300%</div><div id="zoom" style="background-color:red;position:absolute; width:300px; height:150px; z-index:100; left: 0px; top: 0px;border:1px solid #CCCCCC;visibility:hidden"><iframe name="zoomiframe" src="about:blank" frameborder="0" scrolling="no" width="100%" height="100%"></iframe></div>';
    }function setposition() {
    zoom.style.left=document.body.clientWidth+document.body.scrollLeft-5-zoom.offsetWidth;
    zoom.style.top=document.body.scrollTop+5;
    }function showhide() {
    if (magnifier.style.visibility=='hidden') {
    magnifier.style.left=document.body.scrollLeft+event.clientX-magnifier.offsetWidth/2;
    magnifier.style.top=document.body.scrollTop+event.clientY-magnifier.offsetHeight/2;
    magnifier.style.visibility='visible';
    zoom.style.visibility='visible';
    zoomiframe.location.href=self.location;
    setposition();
    magnifier.setCapture();
    }
    else {
    if (event.shiftKey) {
    if (zoomvalue<1) {zoomvalue+=0.1;}
    else {zoomvalue=zoomvalue+1>8?8:zoomvalue+1;}
    magnifier.style.width=3*magnifierw0/zoomvalue;
    magnifier.style.height=3*magnifierh0/zoomvalue;
    magnifier.innerText=parseInt(zoomvalue*100)+'%';
    }
    else if (event.ctrlKey) {
    if (zoomvalue-1>0) zoomvalue-=1;
    else {if (parseInt(zoomvalue*10)/10>0.5) zoomvalue-=0.1;}
    magnifier.style.width=3*magnifierw0/zoomvalue;
    magnifier.style.height=3*magnifierh0/zoomvalue;
    magnifier.innerText=parseInt(zoomvalue*100)+'%';
    }
    else {
    magnifier.style.visibility='hidden';
    zoom.style.visibility='hidden';
    zoom.style.left=0;
    magnifier.releaseCapture();
    } }
    follow();
    }function follow() {
    if (magnifier.style.visibility=='visible') {
    magnifier.style.left=document.body.scrollLeft+event.clientX-magnifier.offsetWidth/2;
    magnifier.style.top=document.body.scrollTop+event.clientY-magnifier.offsetHeight/2;
    zoomiframe.scrollTo(magnifier.offsetLeft,magnifier.offsetTop);
    zoomiframe.document.body.style.zoom=zoomvalue;
    zoomiframe.document.body.style.border='';
    }
    }document.onmousemove=follow;
    document.onselectstart=new Function('return false;');
    document.ondblclick=showhide;
    window.onresize=setposition;
    window.onload=init;
    // -->
    </script>
    <link rel="stylesheet" href="images/test.css" type="text/css">
    </head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
    <table width=500 border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td>
    <p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
    <p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
    <p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
    <p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
    <p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
    <p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
    <p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
    <p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
    <p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
    <p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
    <p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
    <p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
    <p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
    <p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
    <p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
    <p>双击页面出预览窗口及表示预览区域大小的方框,单击关闭</p>
    <p>在方框内,同时按下shift和鼠标左键,将增加放大比例;</p>
    <p>在方框内,同时按下ctrl和鼠标左键,将增加减小比例;</p>
    <p>你也可以试着将head区里的script单独存成js文件,放到你的页面里看看</p>
    <p>不过使用时有一些限制,例如页面表格不能用100%,必须是象素值,而且不能使用居中或者居右对齐方式</p>
    </td>
    </tr>
    </table>
    </body>
    </html>
      

  14.   

    另外才是结合.net的解决办法
    http://www.codeproject.com/aspnet/imagemap.asp