English 中文(简体)
我如何实施谷歌街观点的“前进”行动?
原标题:How do I implement "move forward" action for Google Street View?

我正在一个网页上形成一种习俗观点,该网页在我的贵宾之一展示街观。 我认为,使用V3 Javascript API控制导航的Im。 我的习俗控制实际上在同一个页上与街道观点不同的DIV。

myPano.setPov ({heading:some NewHeading, pitch:some NewPitch, zoom:some NewZoom}) is what I use to tilt and pan/rotate around the field and it workvy. 我不知如何照搬前进行动,而这种行动将类似于 pressing。

在街观中,即使使用者的孤儿和易受感染人群的行踪与这条路相距甚远,但 up的路上行。 我如何使用<条码>序号>,或者同样,我如何计算出一条长/长段,使这一前进方向向前发展?

事先感谢你的人才和贡献。

问题回答
function difference(link) {
  return Math.abs(pano.pov.heading%360 - link.heading);
}

function moveForward() {
  var curr;
  for(i=0; i < pano.links.length; i++) {
    var differ = difference(pano.links[i]);
    if(curr == undefined) {
      curr = pano.links[i];
    }

    if(difference(curr) > difference(pano.links[i])) {
      curr = curr = pano.links[i];
    }
  }
  pano.setPano(curr.pano);
}

ano角

function difference(link) {

    var diff = Math.abs(panorama.pov.heading % 360 - link.heading);
    if(diff>180)
       diff=Math.abs(360-diff);

    return diff;

}

我将考虑使用这一功能差异,而不是用raz子提出的差异来监测正确的方式。

For instance (image below): Link 0: backward Link 1: forward Link 2: left (College Avenue)

在微笑差异中,我们有173个落后国家,353个是前方国家,因为在其职能中,当我叫迁出时,这意味着最低程度。!

“entergraph

创始:D。 http://www.mapchannels.com/mm/streetview/driver.htm 在http://groups.google.com/group/google-maps-api/browse_thread/thread/7150eccbba9dfe40/0ca970e639a2c240 rel=“nofollow”http://groups.google.com/group/google-maps-api/browse_thread/thread/7150ecbba9dfe40/0ca709e639a2c<240a>上设立。 希望:D。

  1. Seems to be related to followLink, and it doesn t seem to work locally




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签