PhotoSphereViewer 全景图
1网站地址:http://photo-sphere-viewer.js.org/markers.html#demo
2参数中文地址:https://www.cnblogs.com/big-tree/p/5933437.html
使用方法:
/**
* Initialize the viewer
*/
var PSV = new PhotoSphereViewer({
// main configuration
panorama: rootURL + '/assets/Bryce-Canyon-National-Park-Mark-Doliner.jpg',
container: 'photosphere',
loading_img: rootURL + '/assets/photosphere-logo.gif',
time_anim: false,
caption: 'Bryce Canyon National Park <b>© Mark Doliner</b>',
default_fov: 70,
default_lat: 0.3,
mousewheel: false,
size: {
height: 500
},
// list of markers
markers: [
{
// image marker that opens the panel when clicked
id: 'image',
longitude: 5.69810,
latitude: -0.13770,
image: rootURL + '/assets/pin-blue.png',
width: 32,
height: 32,
anchor: 'bottom center',
tooltip: 'A image marker. <b>Click me!</b>',
content: document.getElementById('lorem-content').innerHTML
},
{
// html marker with custom style
id: 'text',
longitude: 0,
latitude: 0,
html: 'HTML <b>marker</b> ♥',
anchor: 'bottom right',
style: {
maxWidth: '100px',
color: 'white',
fontSize: '20px',
fontFamily: 'Helvetica, sans-serif',
textAlign: 'center'
},
tooltip: {
content: 'An HTML marker',
position: 'right'
}
},
{
// polygon marker
id: 'polygon',
polygon_px: [3184, 794, 3268, 841, 3367, 1194, 3327, 1307, 3065, 1221, 3097, 847],
svgStyle: {
fill: 'rgba(200, 0, 0, 0.2)',
stroke: 'rgba(200, 0, 50, 0.8)',
'stroke-width': '2px'
},
tooltip: {
content: 'A dynamic polygon marker',
position: 'right bottom'
}
},
{
// circle marker
id: 'circle',
circle: 20,
x: 2500,
y: 1000,
tooltip: 'A circle marker'
}
]
});
/**
* Create a new marker when the user clicks somewhere
*/
PSV.on('click', function(e) {
PSV.addMarker({
id: '#' + Math.random(),
longitude: e.longitude,
latitude: e.latitude,
image: rootURL + '/assets/pin-red.png',
width: 32,
height: 32,
anchor: 'bottom center',
tooltip: 'Generated pin',
data: {
generated: true
}
});
});
/**
* Delete a generated marker when the user clicks on it
*/
PSV.on('select-marker', function(marker) {
if (marker.data && marker.data.generated) {
PSV.removeMarker(marker);
}
});
PhotoSphereViewer 全景图的更多相关文章
- Three.js制作360度全景图
这是个基于three.js的插件,预览地址:戳这里 使用方法: 1.这个插件的用法很简单,引入如下2个js <script src="js/three.min.js"> ...
- 3D全景!这么牛!!
如果你用过网页版的百度地图,你大概3D全景图浏览是一种怎样的酷炫体验:在一个点可以360度环顾周围的建筑.景色,当然也可以四周移动,就像身临其境. 全景图共分为三种: ①球面全景图 利用一张全景图围成 ...
- 基于Three.js的360度全景--photo-sphere-viewer--简介
这个是基于three.js的全景插件 photo-sphere-viewer.js ---------------------------------------- 1.能添加热点: 2.能调用陀 ...
- 浏览器中实现3D全景浏览
如果你用过网页版的百度地图,你大概3D全景图浏览是一种怎样的酷炫体验:在一个点可以360度环顾周围的建筑.景色,当然也可以四周移动,就像身临其境. 科普 全景图共分为三种: ①球面全景图 利用一张全景 ...
- 基于Three.js的360X180度全景图预览插件
基于Three.js的360X180度全景图预览插件 时间 2015-08-12 10:01:10 HTML5中国 原文 http://www.html5cn.org/article-8621-1 ...
- Photo Sphere Viewer 全景图
Photo Sphere Viewer 一款基于 three.js 的简易3D插件,方便,实用,友好,看到网上有些API有错误,所以自己写一个修正版的 该js插件可以360度旋转查看全景图,也可以上 ...
- 探索photo-sphere-viewer全景插件
此插件是一位外国人写的,官网API地址:https://photo-sphere-viewer.js.org/#methods 我只是记录下我在使用此插件时用到的方法和相关属性,以防以后忘记 1.按要 ...
- 360全景图three.js与Photo-Sphere-Viewer-master 3D全景浏览开发
1.支持WebGL和canvas的浏览器 (IE10, IE11支持, 但在IE里移动图片时很卡, 不一定是全部人都有这情况) 2.Three.js (文件较大, 有官网demo, 可不下载, 下载p ...
- PCB 全景图技术实现
为了对3D模型理解更透,这里采用threejs(WebGL第三方库)实现,刚开始学习入门,为了能看明白基本上每行代码都注释. 如果仅仅是为了实现全景图,可以用photo-sphere-viewer.j ...
随机推荐
- [ SHELL编程 ] 远程服务器传输文件
在shell编程中经常需要获取远程服务器文件.手工操作中使用scp命令完成.为避免脚本执行scp输入密码进行交互,需先建立本机服务器当前用户和远程服务器指定用户的信任关系.具体代码见操作实例,重点关注 ...
- js字符串和控制语句
1.js的字符串 * 字符串* 字符串是js数据类型中的一种*字符串拼接:+,加号有两层含义* 1.数学中的加法运算;* 2.字符串连接,当加号的任意一边是一个字符串,那就是字符串连接的意思; < ...
- 吴裕雄 oracle PL/SQL编程
- LDA线性判别分析(转)
线性判别分析LDA详解 1 Linear Discriminant Analysis 相较于FLD(Fisher Linear Decriminant),LDA假设:1.样本数据服从正态分布,2 ...
- hdu1042-N!-(java大数)
题目:求n!(0<=n<=10000) import java.math.BigInteger;//操作大整数 import java.math.BigDecimal;//操作大小数 im ...
- 了解一些dos常用命令
备注:[] ——可选项 <>——必填项 DOS 特殊命令应用技巧: 向上箭头“↑”和向下箭头“↓”——回看上一次执行的命令 "Ctrl+C"组合——中断操作 在命令 ...
- 我的第一篇博客之js的XXXX年XX月XX日 星期[日一-六] [上下]午 XX时:XX分
<!DOCTYPE html> <html> <head> <title>test</title> ...
- ABAP IMPORT&EXPORT的用法
1含有事务码 1.1 不注入参数,直接调用 CALL TRANSACTION 'SUIM' AND SKIP FIRST SCREEN. 1.2 注入参数, SET PARAMETER ID: '屏幕 ...
- Python Try Except
Python Try: Except Except 类型一: try: file_size = os.path.getsize('maoyan.csv'); except OSError as err ...
- java.lang.IllegalArgumentException: Missing either @POST URL or @Url parameter.
以前联调的接口,都是类似这样子的http://ip:8080/WLInterface/register 在baseUrl(http://ip:8080/WLInterface/register ) ...