derekeder/FusionTable-Map-Template — pull request #38 by amenadiel (2014-11-04 21:35:21+00:00)
Title: Adds limit & offset. Changes dataType to json on query request

This PR adds a ```limit``` and ```offset``` parameters to the ```query``` method. While it might seem unnecesary, the idea is to comply with the current available properties of [google.maps.FusionTablesQuery](https://developers.google.com/maps/documentation/javascript/3.exp/reference#FusionTablesQuery) object.

Additionally, it changes the ajax request to ```googleapis.com/fusiontables``` to use dataType json instead of jsonp. The former is easier to debug in devTools, and googleapis.com has long implemented CORS so cross domain request won't be a problem. This allows for a cleaner callback section in which you can add more function calls or debug the response.

Instead of

```
MapsLib.query(selectColumns, whereClause, "", "", "MapsLib.displaySearchCount");
```

the call could be

```
MapsLib.query(selectColumns, whereClause, "", "", "", "", function(response) {
console.info('Table response is',response);
MapsLib.displaySearchCount(response);
});
```