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

Missing coordinates in MGLPolylineFeature #6538

Closed

Description

@rmnblm

Platform: iOS 10, Swift 3
Mapbox SDK version: 3.4.0-alpha.4

I'm currently facing a problem with above solution: The function mapView.visibleFeatures(in:) correctly returns all features inside my touchable square. The problem is: there are some coordinates missing in the MGLPolylineFeature depending on the zoom level I'm currently at. See examples below:

ZoomLevel between 12-13

line1

<MGLPolylineFeature: 0x1740be1e0; count = 81; bounds = { sw = {47.1, 8.6}, ne = {47.1, 8.6}}>

ZoomLevel between 13-14

line2

<MGLPolylineFeature: 0x1742b5480; count = 66; bounds = { sw = {47.1, 8.6}, ne = {47.1, 8.6}}>

Is this a bug or am I doing something wrong? 🙈

Activity

  1. 1ec5 commented on Sep 30, 2016

    @1ec5
    Contributor

    As noted in the documentation:

    Features come from tiled vector data or GeoJSON data that is converted to tiles internally, so feature geometries are clipped at tile boundaries and features may appear duplicated across tiles. For example, suppose the specified rectangle intersects with a road that spans the screen. The resulting array includes those parts of the road that lie within the map tiles covering the specified rectangle, even if the road extends into other tiles. The portion of the road within each map tile is included individually.

    Unfortunately, this means that the returned feature can’t correspond to an entire annotation. You’ll have to do some custom logic to match the returned feature to the original annotation.

  2. added
    iOS
    on Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    iOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions