-2

地图 API 是否可以从信息框中搜索信息,例如标记信息框?

我的信息框显示一些文本信息。我只想搜索此文本并在地图上仅显示包含我要查找的文本的标记。希望这更清楚。

4

2 回答 2

1

这是你想要的

//Build html for Infowindow
      var html = "<b> Text </b> <br>;
      html = html + "<input type=\"text\" id=\"addressInput\" size=\"10\"/>;
      html = html + "<select id=\"radiusSelect\">";
      html = html + "<option value=\"25\" selected>25mi</option>";
      html = html + "<option value=\"100\">100mi</option>";
      html = html + "<option value=\"200\">200mi</option>";
      html = html + "</select>";
      html = html + "<br/><button onclick='doIt()'>Do It</button>";
      var marker = new google.maps.Marker({
       map: map,
        position: point,
      });
      //marker array to allow clearin markers
       markerArray.push(marker);
       bindInfoWindow(marker, map, infoWindow, html);
于 2012-10-04T15:16:06.667 回答
0

我找不到任何谷歌方法来做到这一点我只是将我的信息窗口副本放入一个数组中,然后搜索数组内容。

于 2013-05-13T10:07:56.793 回答