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>&copy; 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> &hearts;',
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 全景图的更多相关文章

  1. Three.js制作360度全景图

    这是个基于three.js的插件,预览地址:戳这里 使用方法: 1.这个插件的用法很简单,引入如下2个js <script src="js/three.min.js"> ...

  2. 3D全景!这么牛!!

    如果你用过网页版的百度地图,你大概3D全景图浏览是一种怎样的酷炫体验:在一个点可以360度环顾周围的建筑.景色,当然也可以四周移动,就像身临其境. 全景图共分为三种: ①球面全景图 利用一张全景图围成 ...

  3. 基于Three.js的360度全景--photo-sphere-viewer--简介

    这个是基于three.js的全景插件  photo-sphere-viewer.js  ---------------------------------------- 1.能添加热点: 2.能调用陀 ...

  4. 浏览器中实现3D全景浏览

    如果你用过网页版的百度地图,你大概3D全景图浏览是一种怎样的酷炫体验:在一个点可以360度环顾周围的建筑.景色,当然也可以四周移动,就像身临其境. 科普 全景图共分为三种: ①球面全景图 利用一张全景 ...

  5. 基于Three.js的360X180度全景图预览插件

    基于Three.js的360X180度全景图预览插件 时间 2015-08-12 10:01:10  HTML5中国 原文  http://www.html5cn.org/article-8621-1 ...

  6. Photo Sphere Viewer 全景图

    Photo Sphere Viewer  一款基于 three.js 的简易3D插件,方便,实用,友好,看到网上有些API有错误,所以自己写一个修正版的 该js插件可以360度旋转查看全景图,也可以上 ...

  7. 探索photo-sphere-viewer全景插件

    此插件是一位外国人写的,官网API地址:https://photo-sphere-viewer.js.org/#methods 我只是记录下我在使用此插件时用到的方法和相关属性,以防以后忘记 1.按要 ...

  8. 360全景图three.js与Photo-Sphere-Viewer-master 3D全景浏览开发

    1.支持WebGL和canvas的浏览器 (IE10, IE11支持, 但在IE里移动图片时很卡, 不一定是全部人都有这情况) 2.Three.js (文件较大, 有官网demo, 可不下载, 下载p ...

  9. PCB 全景图技术实现

    为了对3D模型理解更透,这里采用threejs(WebGL第三方库)实现,刚开始学习入门,为了能看明白基本上每行代码都注释. 如果仅仅是为了实现全景图,可以用photo-sphere-viewer.j ...

随机推荐

  1. Linux性能测试分析命令_sar

    sar主要用于收集并统计系统资源的信息,包括CPU.IO.内存.网卡流量等. sar语法 用法:sar [ 选项 ] [ <时间间隔> [ <次数> ] ] 常用选项说明: - ...

  2. Mac下如何安装WebStorm + 破解

    1.官网下载       下载地址   选择好系统版本以后,点击DOWNLOAD        2.安装 双击下载好的安装包.将WebStromt拖入application文件夹,然后在Launchp ...

  3. 浅析SQL Server 中的SOS_SCHEDULER_YIELD类型的等待

    本文出处:http://www.cnblogs.com/wy123/p/6856802.html 进程的状态转换 在说明SOS_SCHEDULER_YIELD等待之前,先简要介绍一下进程的状态(迷迷糊 ...

  4. Python unindent dese not match any out indentation level 问题

    今天写个小程序出现 “unindent dese not  match any out indentation level”. 一直没找到原因,经过仔细对比发现实际上是缩进的问题. 上下两行的缩进用的 ...

  5. 有关于分布式和SOA的理解

    我的理解分布式和SOA都差不多,类似功能独立分开.举个例子,做一辆车,按照传统模式,先生产车架,然后生产车轮..然后一辆车完成.现在分布式就是生产车架与生产车轮分离,所有的材料 就是最后一次组装的时候 ...

  6. 移动端web页面滚动不流畅,卡顿闪烁解决方案

    移动端web页面滚动不流畅,卡顿闪烁解决方案   1.ios端的-webkit-overflow-scrolling属性可控制页面滚动效果,设置如下实现惯性滚动和弹性效果: -webkit-overf ...

  7. numpy 矩阵变换transpose和swapaxes

    1.transpose 交换 arr = np.random.arange().reshape((,,)) # ** = 则 arr_shape = arr.shape # ,, 则 arr 索引 # ...

  8. day31 粘包问题

    TCP粘包问题 cmd客户端代码 import socket import struct import socket import json c = socket.socket() c.connect ...

  9. 调试JS代码的神器

    1.火狐浏览器的 “Web开发者” 可以打断点,实时查看当前值 2.谷歌浏览器的“开发者工具” 可以打断点,实时查看当前值

  10. FileItem类的常用方法(关于文件上传的)

    1.boolean  isFormField().isFormField方法用来判断FileItem对象里面封装的数据是一个普通文本表单字段,还是一个文件表单字段.如果是普通文本表单字段,返回一个tr ...