如何在 Google Fusion Tables 中使用 Order by Query
How to use Order by Query in Google Fusion Tables
如何为融合 table 层使用排序查询。
var layer = new google.maps.FusionTablesLayer({
query: {
select: 'LATITUDE',
from: '0ILwUgu7vj0VSZnVzaW9udGFibGVzOjEzNjcwNQ'
//order-by : index,
//group-by : group
},
map: map
});
见documentation for FusionTablesQuery
Properties
from | Type:string | The ID of the Fusion Tables table to display. This ID can be found in the table's URL, as the value of the dsrcid parameter. Required.
limit | Type:number | Limit on the number of results returned by the query.
offset | Type:number | Offset into the sorted results.
orderBy | Type:string | The method by which to sort the results. Accepts either of:
- A column name. The column name may be suffixed with ASC or DESC (e.g. col2 DESC) to specify ascending or descending sort.
- An ST_DISTANCE spatial relationship (sort by distance). A column and the coordinate from which to calculate distance must be passed, for example, orderBy: 'ST_DISTANCE(col1, LATLNG(1.2, 3.4))'.
select | Type:string | A column, containing geographic features to be displayed on the map. See Fusion Tables Setup in the Maps API documentation for information about valid columns.
where | Type:string | The SQL predicate to be applied to the layer.
没有排序依据或分组依据。您可以在 where 子句中包含“组”。
如何为融合 table 层使用排序查询。
var layer = new google.maps.FusionTablesLayer({
query: {
select: 'LATITUDE',
from: '0ILwUgu7vj0VSZnVzaW9udGFibGVzOjEzNjcwNQ'
//order-by : index,
//group-by : group
},
map: map
});
见documentation for FusionTablesQuery
Properties from | Type:string | The ID of the Fusion Tables table to display. This ID can be found in the table's URL, as the value of the dsrcid parameter. Required.
limit | Type:number | Limit on the number of results returned by the query.
offset | Type:number | Offset into the sorted results.
orderBy | Type:string | The method by which to sort the results. Accepts either of:
- A column name. The column name may be suffixed with ASC or DESC (e.g. col2 DESC) to specify ascending or descending sort.
- An ST_DISTANCE spatial relationship (sort by distance). A column and the coordinate from which to calculate distance must be passed, for example, orderBy: 'ST_DISTANCE(col1, LATLNG(1.2, 3.4))'.
select | Type:string | A column, containing geographic features to be displayed on the map. See Fusion Tables Setup in the Maps API documentation for information about valid columns.
where | Type:string | The SQL predicate to be applied to the layer.
没有排序依据或分组依据。您可以在 where 子句中包含“组”。