在FusionTableMapLayer中自定义信息窗口 [英] Customizing Info Window in FusionTableMapLayer

查看:76
本文介绍了在FusionTableMapLayer中自定义信息窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过Fusion Table API调用FusionTableMapLayer.我已经在实际的Google Fusion Table程序中为该层开发了一个自定义的信息窗口,但是当我在应用程序中调用该层时,信息窗口将恢复为默认的信息窗口.我如何a)调用保存在Google Fusion Table中的自定义信息窗口,或者b)自定义API调用中的信息窗口?

I am calling a FusionTableMapLayer via the Fusion Table API. I have developed a customized info window for the layer in the actual Google Fusion Table program but when I call the layer in my application, the Info Window reverts to the default Info Window. How do I either a) call the customized Info Window that is saved in the Google Fusion Table or b) customize the Info Window as part of my API call?

推荐答案

使用从向导导出的代码(或至少从向导中导出的styleId和templateId)

Use the code exported from the wizard (or at least the styleId and templateId from it)

new google.maps.FusionTablesLayer({
  query: {
    select: "geometry",
    from: "1EPhndJHBm0ghi06Xq9d8P62hUwCisAcQxYxgH5ax",
  },
  map: map,
  options: {
    styleId: 2,    // get these values from the proper tab on the FusionTables UI
    templateId: 2  // get these values from the proper tab on the FusionTables UI
  }
});

这篇关于在FusionTableMapLayer中自定义信息窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆