Customizing Info Window in FusionTableMapLayer

蓝咒 提交于 2019-12-23 01:37:25

问题


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?


回答1:


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
  }
});


来源:https://stackoverflow.com/questions/37011454/customizing-info-window-in-fusiontablemaplayer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!