Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This returns results in the same format as pointSearch. It also adds a polygonSearch; boxSearch is now implemented as a special case of the polygonSearch.
This correctly uses the feature coordinate system (fixes #705) as the source gcs for feature points (though searches are done in map gcs space).
Before, on polygon features, point searches were done in feature coordinate space. This means that a point that appeared visually in the map gcs to be inside a polygon could fail to be considered in that polygon if in the feature's gcs the point landed outside of the polygon. Now, polygon features' point searches are done in the map's gcs to eliminate this issue. The polygon feature polygonSearch also uses the map's gcs for the same reason.
The
partial
option is now honored. Before, points were considered in a box if their centers were inside the box. Now, points are considered inside a polygon if they are entirely within it taking into account their radius and stroke. Points are partially within the polygon if their radius and stroke land on the polygon border. The point feature has an additional option ofpartial: 'center'
wherein points whose centers are in the box or polygon are returned.The
pointTo2DTriangleBasis
utility function has been renamed topointToTriangleBasis2d
for greater consistency.The polygon example has been modified to highlight polygons when brushed over (ctrl-shift-drag).