Quartz 作曲家 JavaScript

发布于 2024-12-17 03:23:52 字数 1445 浏览 1 评论 0原文

我真的很困惑所以任何帮助将不胜感激。蒂亚!

我有一个 Quartz Composition,我想在其中显示街景(来自 Google 地图)并能够控制导航(如能够前进等)。这意味着我需要一个 JavaScript,但我不知道如何将 QC 中的 JavaScript 补丁与 Google Maps API 链接起来。

那么如何添加两个代表纬度和经度的字符串并显示街景呢?

以下是 Google 执行此操作的 HTML 示例:

<!DOCTYPE html>
    <html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0; padding: 0 }
  #map_canvas { height: 100% }
</style>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
  function initialize() {
    var bryantPark = new google.maps.LatLng(37.869260, -122.254811);
    var panoramaOptions = {
      position:bryantPark,
      pov: {
        heading: 90,
        pitch:0,
        zoom:0
      }
    };
    var myPano = new google.maps.StreetViewPanorama(document.getElementById("pano"), panoramaOptions);
    myPano.setVisible(true);
  }
</script>
</head>
<body onload="initialize()">
  <div id="pano" style="width: 1280px; height: 1024px"></div>
</body>
</html>

How can I do this in Quartz Composer JavaScript Patch or any other patch?

多谢!

PS:它已经通过使用用于 QC 的 CoGe Webkit 插件加载页面来部分工作。但我不知道如何通过 QC 控制 HTML 中的 JavaScript。还有其他方法可以将变量从 QC 发送到 HTML 页面或类似的内容吗?

I'm really stuck so any help would be appreciated. TIA!

I have a Quartz Composition in which I want to display a Streetview (from Google Maps) and be able to control the navigation (as in be able to advance forward, etc.). This would mean I need a JavaScript for it and I've got no idea on how to link the JavaScript Patch in QC with the Google Maps API.

So how could I add two strings, representing Lat and Long and display the Streetview?

Here is a sample HTML from Google doing that:

<!DOCTYPE html>
    <html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0; padding: 0 }
  #map_canvas { height: 100% }
</style>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
  function initialize() {
    var bryantPark = new google.maps.LatLng(37.869260, -122.254811);
    var panoramaOptions = {
      position:bryantPark,
      pov: {
        heading: 90,
        pitch:0,
        zoom:0
      }
    };
    var myPano = new google.maps.StreetViewPanorama(document.getElementById("pano"), panoramaOptions);
    myPano.setVisible(true);
  }
</script>
</head>
<body onload="initialize()">
  <div id="pano" style="width: 1280px; height: 1024px"></div>
</body>
</html>

How could I do this in Quartz Composer JavaScript Patch or any other patch?

Thanks a lot!

P.S.: It already works partially by loading the page with CoGe Webkit Plugin for QC. But I have no idea on how to control the JavaScript inside the HTML via QC. Any other way to send variables from QC to a HTML page or anything similar?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

腻橙味 2024-12-24 03:23:52

其实很简单,希望对其他人也有帮助。

HTML:

function initialize(x, y) {
    var pos = new google.maps.LatLng(x, y);
    // whatever else you need it to do
}

QC:

initialize(x, y)

感谢 CoGe WebKit 插件的创建者 Tamas Nagy 的回答!

Really easy actually, hope it will help others as well.

HTML:

function initialize(x, y) {
    var pos = new google.maps.LatLng(x, y);
    // whatever else you need it to do
}

QC:

initialize(x, y)

Thanks to the creator of the CoGe WebKit plugin, Tamas Nagy for the answer!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文