문제

Is it possible to embed an iframe with filtered data coming from a FT? I have two Fusion Tables, one Parent and one Child. They have a matching ID column. What I need to do is to be able to show filtered data from Child Table into every infowindow of the Parent Table according to their matching ID column (sort of one-to-many connection).

Building on the link generated from the Child FT UI, I could generate a unique "filtering" link utilizing the matching ID column of the Parent Table inside the Custom Card panel.

Is it possible?

도움이 되었습니까?

해결책

It's possible, but not with a template, because <iframe/>'s will be removed.

Modify the infoWindowHtml-property of the FusionTablesMouseEvent

google.maps.event.addListener(layer,'click',function(e){

  e.infoWindowHtml+=
    '<iframe width="100%" src="https://www.google.com/fusiontables/embedviz?'+
    'viz=CARD&amp;q=select+*+from+childTableId+where+ID+%3D+'+
    e.row.ID.value+'&cpr=1"></iframe>';

});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top