javascript - 我如何修改我的 javascript 代码来提醒这个?

标签 javascript jquery css templates google-maps

http://geodit.com:8000/test

如果您访问我的网站,您会看到我安装了 Google Local Search API。 基本上,它通过 javascript 访问 Google 并执行搜索。

有人搜索某些内容并点击其中一个结果后,我该如何提醒该地址? (现在, map 上弹出了一些窗台信息白框。我不想那样。我只想提醒地址)

最佳答案

改变

LocalResult.prototype.select = function() {
  unselectMarkers();
  this.selected_ = true;
  this.highlight(true);
  gInfoWindow.setContent(this.html(true));
  gInfoWindow.open(gMap, this.marker());
};

LocalResult.prototype.select = function() {
      unselectMarkers();
      this.selected_ = true;
      this.highlight(true);
      var msg = 'Address\n\t';
      msg += this.result_.addressLines.join('\n\t');
      msg += '\nCity\n\t';
      msg += this.result_.city;
      msg += '\nCountry\n\t';
      msg += this.result_.country;
      alert(msg);
};

关于javascript - 我如何修改我的 javascript 代码来提醒这个?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4664473/

相关文章:

css - HTML : Div is not in align?

javascript - 我怎样才能在幻灯片中为卡车制作动画?

javascript - 仅当图像具有 .landscape 类时,如何将类添加到容器 div?

javascript - $.cookie 给出错误

javascript - 基于正则表达式匹配启用 javascript/jquery 中的按钮

javascript - 具有相同id的多个div中的Ajax json值

css - H1不在容器中

html - 在不更改背景图像不透明度的情况下更改背景颜色不透明度

javascript - 使用 AngularJS 在( Bootstrap )选项卡中锚定链接

javascript - 更改 <img src ="XXX"/>,新图像完成加载时的 js 事件?