Coder Social home page Coder Social logo

google-streetview-pano's People

Contributors

addyosmani avatar atotic avatar brendankenny avatar ebidel avatar rbjarnason avatar robdodson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-streetview-pano's Issues

How to set panorama from a position

Like in this example:

var panorama = new google.maps.StreetViewPanorama(
      document.getElementById('pano'), {
        position: fenway,
        pov: {
          heading: 34,
          pitch: 10
        }
      });
  map.setStreetView(panorama);

Views is gone, element still usable?

So, as Views went offline a year ago, streetview pano addresses don't look like this anymore:
google.com/maps/views/view/102684927602131521305/photo/1szTnskrdKIAAAGuu3fZRw

but rather like so:
https://www.google.de/maps/@-23.4411031,151.9041755,3a,75y,194.59h,71.11t/data=!3m7!1e1!3m5!1s0Gu6eoWlrurprZQlhN1K3A!2e0!6s%2F%2Fgeo1.ggpht.com%2Fcbk%3Fpanoid%3D0Gu6eoWlrurprZQlhN1K3A%26output%3Dthumbnail%26cb_client%3Dmaps_sv.tactile.gps%26thumb%3D2%26w%3D203%26h%3D100%26yaw%3D0%26pitch%3D0!7i13312!8i6656

When using the panoid part from the new url structure (3D0Gu6eoWlrurprZQlhN1K3A), I am getting CORS blocked for Googles https://geo0.ggpht.com/ domain, as no Access-Control-Allow-Origin header is present on the requested resource, and a 400 for the resource. Can anyone think of a workaround or is the element just not usable anymore?

_mapApiLoaded called before object is fully initialized

When using google-streetview-pano with iron-pages, going between pages causes this element to fail as data bindings for this.panoId and this.position have not been initialized at the time of the _mapApiLoaded callback.

In the use below, it works fine the first time I load the page, but after using iron-pages to flip between pages a second load will trigger the _mapApiLoaded callback before the _getMapPosition has had a chance to set the this.position value.

 <google-streetview-pano
            position="[[_getMapPosition()]]"
            heading="330"
            pitch="2"
            zoom="0.8"
            disable-default-ui>
          </google-streetview-pano>

This can be fixed by wrapping _mapApiLoaded contents in this.async but its a bit hacky as I don't understand why this is happening. What do you guys think?

    _mapApiLoaded: function() {
      this.async(function() {
        this.pano = new google.maps.StreetViewPanorama(this.$.pano, this._getPanoOptions());
        this.pano.setVisible(true);

        if (this.disableAutoPan) {
          return;
        }
        // Kickoff the rotating animation
        this.rAFid = requestAnimationFrame(this.update.bind(this));
      });
    },

StreetView panorama does not render in Shadow DOM

Description

StreetView panorama does not render in Shadow DOM.
Rendering is ok in Shady DOM.

Expected outcome

The StreetView panorama.

Actual outcome

Nothing, the "map" div seems to be deleted.
capture d ecran de 2016-07-15 12 02 32

Live Demo

https://jsbin.com/quyaji/edit?html,output

Steps to reproduce

  • Set the dom Polymer option to 'shadow'.
  • Add google-streetview-pano custom element.

Browsers Affected

  • Chrome
  • Firefox

Additional notes

The same result occurs when using google-map custom element and switching to StreetView, with the default control or programmatically.

Needs peer review

@ebidel @addyosmani

If either of you has free time I'd love some code review. I think this element could be greatly improved by the universal loader/manager that we've been discussing. For now it requires a google-map element so it doesn't run into a situation where there are two elements both trying to load the google maps API at the same time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.