HTA - 谷歌地图

时间:2015-07-08 06:34:06

标签: hta

我有以下.hta文件,它显示两个点,它们的图标+它们之间的线。

我不是这方面的专家......

我需要帮助: 1 - 显示点标题始终(目前仅在鼠标悬停在每个点上时显示) 2 - 添加"图例"到了hta

好吧 - 关于"传奇" - 我发现google maps infowindow - 但是我没有任何示例如何将它添加到包含hta中的地图...

非常感谢您的帮助。

这是我的.hta文件:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google Maps JavaScript API Example: Map Markers</title>
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=xxxxxxxxxxxxxxxxx"
            type="text/javascript"></script>
    <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));


        map.addControl(new GLargeMapControl());
        map.addControl(new GScaleControl());



var CAR = new GIcon(G_DEFAULT_ICON); CAR.image = "http://dl.dropbox.com/u/1204823/Icons/CAR.png";
var LDG = new GIcon(G_DEFAULT_ICON); LDG.image = "http://dl.dropbox.com/u/1204823/Icons/LDG.png";

          markerOptions = { icon:LDG,title:"A 212: US_CA,La Canada - Bruck Home"};
          var point = new GLatLng(34.219261,-118.19088);
          map.addOverlay(new GMarker(point, markerOptions));

          markerOptions = { icon:CAR,title:"B 213: US_CA,Inglewood - Alamo Lax"};
          var point = new GLatLng(33.954487,-118.377007);
          map.addOverlay(new GMarker(point, markerOptions));

          var polyline = new GPolyline([new GLatLng(34.219261,-118.19088), new GLatLng(33.954487,-118.377007)], "#ff0000", 5);
          map.addOverlay(polyline);


        map.setCenter(new GLatLng(34.086874,-118.2839435), 11 );

      }
    }

    </script>
  </head>
  <title>My Monster Application</title>
  <hta:application id="oMyApp"
    applicationname="monster"
    border="thin"
    caption="yes"
    icon="/graphics/creature.ico"
    showintaskbar="yes"
    singleinstance="yes"
    sysmenu="yes"
    windowstate="maximize">
  <body onload="initialize()" onunload="GUnload()">
  <div id="map_canvas" style="width: 1260px; height: 915px"></div>
  </body>
</html>

0 个答案:

没有答案