zoukankan      html  css  js  c++  java
  • 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>&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);
      }
    });
  • 相关阅读:
    结构体初始化所遇到的问题
    字符串赋值注意事项
    C语言可变参数 "..."
    typedef 定义指针数组和数组指针及其使用。
    指针函数、指针数组、函数指针、数组指针、函数指针数组。
    前端回血day24 flex子项伤的CSS属性
    Fiddler使用
    一句话“截流”和“防抖”
    django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.
    Linux
  • 原文地址:https://www.cnblogs.com/lst619247/p/8065029.html
Copyright © 2011-2022 走看看