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.

Add centerOffset and calloutOffset properties to MGLAnnotation #2151

Closed

Description

@friedbunny

MGLAnnotation needs the ability to shift the positioning of annotations and their callouts, akin to MapKit's centerOffset and calloutOffset.

Per @incanus in #1121 (comment):

We will hopefully be passing bitmap imagery across the wire instead of relying on pre-made sprite sheets, so this point is moot. At that point, since you are supplying imagery at runtime (which might be created on-the-fly anyway), passing things like calloutOffset and centerOffset is much more natural.

This should probably happen in conjunction with fixing #1504.

/cc @1ec5

Activity

  1. added
    iOS
    on Aug 21, 2015
  2. incanus commented on Aug 24, 2015

    @incanus
    Contributor

    We can maybe leverage the GL style spec's translate property here.

  3. 1ec5 commented on Nov 30, 2015

    @1ec5
    Contributor

    In #3135 for OS X, I’ve eschewed the mbgl::Map methods in favor of looking up the annotation images’ alignment rects directly (since every NSImage has an alignment rect). Eventually, I’d like to reverse it so that MGLAnnotationImage keeps an anchorPoint and calloutEdge, by analogy with -[NSCursor hotspot].

  4. RomainQuidet commented on Dec 2, 2015

    @RomainQuidet
    Contributor

    Hi,
    I'd like to work on this feature.

  5. RomainQuidet commented on Dec 7, 2015

    @RomainQuidet
    Contributor

    center offset for annotations is done, need to offset the touch event and the callout too.

  6. RomainQuidet commented on Dec 8, 2015

    @RomainQuidet
    Contributor

    checkout pull request #3220 for this to work (core + iOS code)

  7. 1ec5 commented on Jan 14, 2016

    @1ec5
    Contributor

    By way of an update, #3261 introduced support for alignment insets in annotation images, so the “center offset” effect can be achieved by padding the annotation image and insetting it to the visible portion.

  8. friedbunny commented on Feb 10, 2016

    @friedbunny
    ContributorAuthor

    @BFTE We're quite happy to help, but in general please create a new issue or post on one that relates to the bug/problem as closely as you can manage. We love fresh bug reports. 😀

  9. added
    MapKit parity
    on Aug 22, 2016
  10. added
    archived
    on Nov 18, 2018
  11. stale commented on Nov 20, 2018

    @stale

    This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

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

    MapKit parityarchivedfeatureiOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions