Commit Graph

26 Commits

Author SHA1 Message Date
Andy Allan c23b09d72a Fix isBaseLayer documentation
Ensure the documentation matches the code with regards to the default value, and make the explanation slightly clearer as to why it defaults to false.
2013-03-27 14:58:34 +00:00
Tim Schaub 8e555dee56 Overriding createBackBuffer in UTFGrid layer
This layer doesn't need to create a backbuffer.
2013-02-21 12:12:12 -07:00
Marc Jansen a34e627b75 Remove dangling space in license header. 2013-02-07 10:33:20 +01:00
Tim Schaub e6c264286a Merge pull request #832 from perrygeo/2.12-perrygeo
guard against null tileInfo
2013-01-11 09:42:24 -08:00
Matthew Perry b54faf222c guard against null tileInfo 2013-01-10 10:45:02 -08:00
Tim Schaub bbc73a21d8 Update copyright date 2013-01-07 22:01:16 -05:00
Andy Allan baabbc3658 fix typo 2012-06-09 11:39:00 +02:00
Éric Lemoine e0b93c2e45 The OpenLayers code is published under the 2-clause BSD license 2012-03-30 08:33:55 +02:00
Éric Lemoine 650df2a8f1 change copyright header in every OpenLayers js file 2012-03-29 22:14:56 +02:00
Tim Schaub 46054b8543 Correctly getting tile data for a location.
The UTFGrid layer's `getTileInfo` method was not correctly handling dateline wrapping (and was a bit more complicated than it needed to be).  Since it would be useful to all grid layers to be able to retrieve a tile and pixel offset for any map location, this functionality deserves to be on the Grid layer.

The WMTS layer currently exposes a `getTileInfo` method that is used within the layer and by the WMTSGetFeatureInfo control.  This method could be renamed to `getRemoteTileInfo` or something to differentiate it from a method that gets locally cached tile info.  Until that change is made, the method on the Grid layer will be called `getGridData`.
2012-03-06 16:06:15 -07:00
Tim Schaub 28687257d6 Use existing methods on XYZ layer. 2012-03-05 23:07:28 -07:00
Tim Schaub dc4df928ed Doc cleanup for UTFGrid layer. 2012-03-03 17:28:55 -07:00
Tim Schaub 36d22bbb15 Single argument constructor for UTFGrid layer. 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 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