Commit Graph

11 Commits

Author SHA1 Message Date
Tim Schaub
551c582ab1 Layer and tile API update.
The tile now has responsibility for resolving feature ids and fetching feature data given x, y pixel offsets with getFeatureId and getFeatureData methods.  The layer has corresponding getFeatureId and getFeatureData methods that take a map location, lookup the appropriate tile, and delegate to the tile for the rest of the work.
2012-02-26 21:05:12 -07:00
Tim Schaub
fc03f57591 Simplify constructor by setting projection. 2012-02-26 19:23:22 -07:00
Tim Schaub
65233dd0bc Add dependency on UTFGrid tile. 2012-02-25 20:01:14 -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
Matthew Perry
867080a074 Option for loading utfgrid via jsonp 2012-02-13 16:56:35 -08:00
Matthew Perry
b01026bd80 Cleaning up the docs to a marginally acceptable level. 2012-02-08 11:16:50 -08:00
Matthew Perry
80656cdfd0 Support specifying grid resolution at the layer level 2012-02-07 12:20:29 -08:00
Matthew Perry
8aaaecc9ee Fix a problem determining zoom levels. Updated some docs. 2012-02-06 09:06:49 -08:00
Matthew Perry
6ff3b895c9 Some refactoring and cleaning up rounding errors in tile math. Added
debugging mechanism.
2012-02-05 11:17:02 -08:00
Matthew Perry
be4db93e9b Preliminary working implementation.. still lots of slop to clean up 2012-02-05 09:33:32 -08:00
Matthew Perry
a6df52ff83 Initial import of UTFGrid support. Needs work. 2012-02-04 12:22:27 -08:00