如何查看特定区域在眼前的位置 [英] how view particular area point out in the front of the eyes
本文介绍了如何查看特定区域在眼前的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何查看特定区域在眼前的位置
嗨
我有一个问题
我创建了自己的地图,得到了图像地图的坐标……,但是....我想在图像地图中搜索特定区域,我使用
jQuery ZOOm In,ZOOM Out ......,我想查看特定图像地图区域的眼睛前面.....不要,div图像移动可以在按钮单击事件上移动
这是我的代码
how view particular area point out in the front of the eyes
hi
i have one issue
i create my own map, i got image map coordinates......,but.... i want to search particular area in the image map , i use
jquery ZOOm In , ZOOM Out...... , i want to view particular image map area front of eye..... don,t div move image can move move on button click event
this is my code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery.iviewer test</title>
<script type="text/javascript" src="scripts/jquery.min.js" ></script>
<!--<script type="text/javascript" src="jquery.js" ></script>-->
<script type="text/javascript" src="scripts/jquery.mousewheel.min.js" ></script>
<script type="text/javascript" src="scripts/jquery.iviewer.js" ></script>
<script type="text/javascript">
var $ = jQuery;
$(document).ready(function(){
$("#viewer").iviewer(
{
src: "images/165.jpg",
update_on_resize: false,
zoom: 100,
initCallback: function ()
{
var object = this;
$("#in").click(function(){ object.zoom_by(1);});
$("#out").click(function(){ object.zoom_by(-1);});
$("#fit").click(function(){ object.fit();});
$("#orig").click(function(){ object.set_zoom(100); });
$("#update").click(function(){ object.update_container_info();});
$("#A1").click(function(){ object.viewCoordinate(2654,896);});
console.log(this.img_object.display_width); //works*
console.log(object.img_object.display_width); //getting undefined.*
},
onFinishLoad: function()
{
$("#viewer").data('viewer').setCoords(-500,-500);
//this.setCoords(-0, -500);
}
//onMouseMove: function(object, coords) { },
//onStartDrag: function(object, coords) { return false; }, //this image will not be dragged
//onDrag: function(object, coords) { }
});
var iviewer = {};
$("#viewer2").iviewer(
{
src: "images/165.jpg",
initCallback: function()
{
iviewer = this;
}
});
$("#chimg").click(function()
{
iviewer.loadImage("images/165.jpg");
return false;
});
});
</script>
<link rel="stylesheet" href="css/jquery.iviewer.css" />
<style>
.viewer
{
width: 50%;
height: 500px;
border: 1px solid black;
position: relative;
}
.wrapper
{
overflow: hidden;
}
</style>
</head>
<body>
<h1>JQuery.iviewer test</h1>
<!-- wrapper div is needed for opera because it shows scroll bars for reason -->
<div class="wrapper">
<span>
<a id="in" href="#">+</a>
<a id="out" href="#">-</a>
<a id="fit" href="#">fit</a>
<a id="orig" href="#">orig</a>
<a id="update" href="#">update</a>
<a id="A1" href="#">Change</a>
</span><div id="viewer" class="viewer" > </div>
<br />
</body>
</html>
推荐答案
= jQuery;
= jQuery;
(文档) .ready(函数(){
(document).ready(function(){
(" #viewer").iviewer( { src:" , update_on_resize: false , 缩放: 100 , initCallback:函数() { var object = 此;
("#viewer").iviewer( { src: "images/165.jpg", update_on_resize: false, zoom: 100, initCallback: function () { var object = this;
这篇关于如何查看特定区域在眼前的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文