Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make featuresAt return symbols and use style properties #2052

Merged
merged 13 commits into from
Mar 24, 2016

Commits on Mar 24, 2016

  1. return text and icons in featuresAt queries

    fix #303
    
    This increases worker memory usage by around 10% (a couple of MB).
    1/3 of the increase comes from retaining the CollisionTile.
    2/3 of the increase comes from retaining VectorTileFeatures.
    ansis committed Mar 24, 2016
    Configuration menu
    Copy the full SHA
    fe07654 View commit details
    Browse the repository at this point in the history
  2. style-property-aware hit testing, fix #316

    map.featuresAt now includes features whose rendered representation
    matches the query, not features whose geometry matches the query.
    
    A query with `radius: 0` will now match lines and circles if the point
    is within the rendered line.
    
    also fix #2053
    It now checks intersection based on the render type not the geometry
    type. A polygon that is rendered as a line will only match if the query
    matches the line. It will not include it if the query only matches in
    the internal part of the polygon.
    
    implemented:
    circle-radius
    circle-translate
    fill-translate
    line-width
    line-offset
    line-translate
    
    not implemented yet (hard with the current symbol index):
    text-translate
    icon-translate
    ansis committed Mar 24, 2016
    Configuration menu
    Copy the full SHA
    59cef95 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e6c62f4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7801a51 View commit details
    Browse the repository at this point in the history
  5. add `map.getSourceTileData(sourceID, params, cb)

    `getSourceTileData` calls the callback with an array of GeoJSON
    FeatureCollections (one for each tile).
    
    fixes #2106
    ansis committed Mar 24, 2016
    Configuration menu
    Copy the full SHA
    7b0a381 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6097fdf View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    555c956 View commit details
    Browse the repository at this point in the history
  8. fix .map(tr.pointCoordinate.bind(tr)) gotcha

    `.map` calls functions with two arguments. The second argument, the
    index, was being passed to `pointCoordinate` which was using it as the
    targetZ. The targetZ is set to anything other than 0 so remove the
    option.
    ansis committed Mar 24, 2016
    Configuration menu
    Copy the full SHA
    4c05d74 View commit details
    Browse the repository at this point in the history
  9. add more featuresIn query tests

    ansis committed Mar 24, 2016
    Configuration menu
    Copy the full SHA
    9dc8f26 View commit details
    Browse the repository at this point in the history
  10. combine featuresIn, featuresAt into queryRenderedFeatures

    and rename getSourceTileData into querySourceFeatures
    ansis committed Mar 24, 2016
    Configuration menu
    Copy the full SHA
    47976bb View commit details
    Browse the repository at this point in the history
  11. match return formats for querySourceFeatures and queryRenderFeatures

    Both now return array of GeoJSON features.
    Each feature has a `tile` property that is an object with `x`, `y`, and
    `z` properties containing the feature's tile's coord.
    ansis committed Mar 24, 2016
    Configuration menu
    Copy the full SHA
    d0405f4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5903e8a View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e5a4152 View commit details
    Browse the repository at this point in the history