Commit Graph

13 Commits

Author SHA1 Message Date
Tim Schaub c6aa996d2a UTFGrid geography class example. 2012-03-04 01:58:22 -07:00
Tim Schaub 2feb860983 Separating UTFGrid example markup and js source. 2012-03-03 16:07:50 -07:00
Tim Schaub 4d31a3ed3a Method for getting both feature id and data.
Having to call two methods to get complete feature information (id and data) is cumbersome.  The `getFeatureInfo` method returns an object with both feature id and data.
2012-02-28 05:37:28 -07:00
tschaub 89e8a872a5 Making the default UTFGrid resolution 2.
According to the latest [spec](https://github.com/mapbox/utfgrid-spec/blob/master/1.2/utfgrid.md): "By default, UTFGrid operates on a 2x2 grid."
2012-02-27 08:57:22 -07:00
Tim Schaub fc03f57591 Simplify constructor by setting projection. 2012-02-26 19:23:22 -07:00
Tim Schaub 6ffce8cfb6 Remove unused list item. 2012-02-25 20:00:46 -07:00
Tim Schaub e1dffacdde Providing a method to get data from the layer.
I think it should be the job of the layer to retrieve data for a given location (instead of the control).  The first part of this change creates a `getData` method on the layer and updates the control to use this method.

The second part of this change removes the assumption that the data returned will be an simple object representing feature attributes.  The UTFGrid specification doesn't say anything about the structure of property values in the optional data member.  The examples given in the spec use string values.  The default callback previously assumed that the data could be rendered in a two column table.  I think it would make more sense not to make this assumption.  With this change, the user must always provide a callback to do anything with returned data.
2012-02-25 17:33:32 -07:00
Tim Schaub 6284e44d2e Making the UTFGrid examples more like the rest. 2012-02-25 16:18:43 -07:00
Matthew Perry 5d00c76c92 Updated examples with another showing multiple grid support 2012-02-08 11:36:50 -08:00
Matthew Perry 0cf589b337 Hide bullets 2012-02-07 16:05:31 -08:00
Matthew Perry 0a74cb45f8 Filled out the html example page 2012-02-07 12:21:03 -08:00
Matthew Perry 4e84a7113d Fix event handling.. no need to detect lastXY 2012-02-07 11:23:04 -08:00
Matthew Perry 54e9fdb784 Initial example html/js page 2012-02-07 10:02:19 -08:00