IssueRaiser

Point annotation clustering

The longstanding “GL point annotation” API (exposed as MGLPointAnnotation on iOS and macOS, `Marker` on Android, and `PointAnnotation` on Qt) should support options for marker clustering. The GeoJSON point clustering implemented in #5724 is important for parity with Mapbox GL JS, but its use will be somewhat limited until this functionality is extended to point annotations, which have a few important advantages over GeoJSON points: - Point annotations can display images that are loaded or even generated at runtime. GeoJSON points can only display images that come with the style (for example, images that are managed in Mapbox Studio). Therefore, it isn’t possible to use a GeoJSON point to represent the current user’s avatar on the map or to draw text into an image and use that image in a GeoJSON point. - An application may need to add, remove, and modify annotations very frequently during the course of a map’s lifetime. With a GeoJSON layer, to add, remove, or modify an annotation, you have to blow away the entire layer and reconstruct it. Therefore, it isn’t feasible to animate GeoJSON points smoothly, and it’s very tedious to implement a “long press to drop pin” UI using GeoJSON points exclusively. - MGLPointAnnotation and `Marker` have built-in support for interactivity, opening a popup when tapped. GeoJSON points require the developer to handle gesture recognition, selection, and spatial querying with custom code. Based on its unique behaviors, `mbgl::SymbolAnnotation` co

Posted by 1ec5 on Jul 28, 2016, 4:27 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments

ux (EdTech)

Point annotation clustering

1ec5Jul 28, 2016, 4:27 AM

The longstanding “GL point annotation” API (exposed as MGLPointAnnotation on iOS and macOS, `Marker` on Android, and `PointAnnotation` on Qt) should support options for marker clustering. The GeoJSON point clustering implemented in #5724 is important for parity with Mapbox GL JS, but its use will be somewhat limited until this functionality is extended to point annotations, which have a few important advantages over GeoJSON points: - Point annotations can display images that are loaded or even generated at runtime. GeoJSON points can only display images that come with the style (for example, images that are managed in Mapbox Studio). Therefore, it isn’t possible to use a GeoJSON point to represent the current user’s avatar on the map or to draw text into an image and use that image in a GeoJSON point. - An application may need to add, remove, and modify annotations very frequently during the course of a map’s lifetime. With a GeoJSON layer, to add, remove, or modify an annotation, you have to blow away the entire layer and reconstruct it. Therefore, it isn’t feasible to animate GeoJSON points smoothly, and it’s very tedious to implement a “long press to drop pin” UI using GeoJSON points exclusively. - MGLPointAnnotation and `Marker` have built-in support for interactivity, opening a popup when tapped. GeoJSON points require the developer to handle gesture recognition, selection, and spatial querying with custom code. Based on its unique behaviors, `mbgl::SymbolAnnotation` co

Comments (0)

No comments yet. Start the discussion.

Comment on this issue