Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Feature querying; more geometry types #5110

Merged
merged 7 commits into from
May 28, 2016
Merged

Feature querying; more geometry types #5110

merged 7 commits into from
May 28, 2016

Commits on May 28, 2016

  1. [ios, osx] Feature querying; complex geometry classes

    Added methods to MGLMapView that return the rendered features at a visible point or within a visible rectangle on the map, optionally restricted to a set of layers, plus voluminous documentation.
    
    Added several new geometry classes corresponding to distinct geometry types supported by geometry.hpp. Added parallel “feature” classes to represent these geometries along with tags (IDs) and attributes (properties) from the source.
    
    Grouped classes in the Foundation and SDK groups by theme.
    
    In iosapp, dropped pins’ callout views now display the name of the topmost named feature at that point.
    
    In osxapp, a long press on the map highlights the features under the cursor. Dropping a pin via the menu or context menu item shows the usual dropped pin, but the pin’s title is now the name of a feature under the cursor, if available, rather than “Dropped Pin”.
    
    Fixes the iOS/OS X side of #352.
    1ec5 committed May 28, 2016
    Configuration menu
    Copy the full SHA
    c6683ee View commit details
    Browse the repository at this point in the history
  2. [ios, osx] Streamlined conversion to MGLFeature

    Made writability of MGLFeature properties private, to avoid having to awkwardly explain that changes to the properties don’t change the map (maybe someday they will). This allows the identifier and attributes to be set in only one place, avoiding copy-pasta.
    1ec5 committed May 28, 2016
    Configuration menu
    Copy the full SHA
    ff0cc1c View commit details
    Browse the repository at this point in the history
  3. [ios, osx] MGLFeature tests

    1ec5 committed May 28, 2016
    Configuration menu
    Copy the full SHA
    4ab9838 View commit details
    Browse the repository at this point in the history
  4. [ios, osx] Holes in polygons

    MGLPolygon (and by extension MGLMultiPolygon) now supports interior rings. The data is preserved in feature querying results, and interior rings are respected when adding polygon overlays to the map.
    
    Fixes #1729.
    
    [ios, osx] Updated changelog
    1ec5 committed May 28, 2016
    Configuration menu
    Copy the full SHA
    de905ab View commit details
    Browse the repository at this point in the history
  5. [ios, osx] Cleaned up evaluators

    Removed a level of indirection when creating Objective-C collections from C++ collections. Adopted mbgl typedefs for geometry.hpp types. Factored out MGLPolygon construction.
    1ec5 committed May 28, 2016
    Configuration menu
    Copy the full SHA
    bacf1f5 View commit details
    Browse the repository at this point in the history
  6. [ios, osx] Ignore compound shape types as annotations

    Ignore any multipolyline, multipolygon, or shape collection object passed into -addAnnotation: or -addAnnotations:. Previously, these methods broke apart the compound shape into its constituent shapes in order to recursively add them to the map. But that broke assumptions about a one-to-one correspondence between annotations and their contexts during selection and deletion.
    1ec5 committed May 28, 2016
    Configuration menu
    Copy the full SHA
    974e669 View commit details
    Browse the repository at this point in the history
  7. [osx] Relegated “selection” to context menu

    Moved feature selection to the context menu and restored the press gesture for dropping a pin. Bust complex features into simple shapes to feed into MGLMapView as overlays.
    1ec5 committed May 28, 2016
    Configuration menu
    Copy the full SHA
    b94a125 View commit details
    Browse the repository at this point in the history