tangram icon indicating copy to clipboard operation
tangram copied to clipboard

Enable introspection of feature parsing/rendering info

Open bcamper opened this issue 9 years ago • 5 comments
trafficstars

We currently support the return of some feature information via our interactive draw parameter and feature picking events (and getFeatureAtPixel() method).

For a design environment like Tangram Play, it would be very useful to have more such info available. For example, this could enable the user to click any feature/pixel, and get info not just on the feature itself, but also the Tangram layer names it matched, and specific draw parameters that were used to build and render it.

Here's a list of information to consider. Because of added overhead for some of these (especially those that require copying or storing additional styling data that is currently discarded), we may want to put some of this functionality behind an explicit "introspection" mode that can be enabled by the client (e.g. Tangram Play).

  • [x] Enable feature picking/selection for all objects (not just those marked as interactive)
  • [x] Feature properties
  • [x] Data source name and layer the feature originated from
  • [x] Scene layers the feature matched (e.g. [roads.bridges, roads.paths])
  • [ ] Computed draw block for matching scene layers (result of draw block merging)
  • [ ] Computed draw parameters for specific feature (e.g. after JS function-based parameters are evaluated)

bcamper avatar Apr 15 '16 15:04 bcamper

Data source name and layer added in be3640a7e554182e2b1e4bce9aefc817867dc785 & 2b47f8ee895f11b9f7a0e785f0440ebd6c8cdf5b.

bcamper avatar Apr 15 '16 15:04 bcamper

Matching scene layer names added in #274.

bcamper avatar Apr 15 '16 15:04 bcamper

"Introspection mode" WIP (currently enables interactivity for all features) in https://github.com/tangrams/tangram/compare/introspection.

bcamper avatar Apr 15 '16 15:04 bcamper

+1

nvkelso avatar Apr 15 '16 17:04 nvkelso

Ability to turn introspection on/off for all features at run-time included in #303, will be in 0.8. Remaining items such as computed draw parameters remain to be done.

bcamper avatar Jun 07 '16 03:06 bcamper