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.

Can I catch MGLAnnotationImage what I created? #5463

Closed

Description

@Paladinfeng

*_Platform: iOS
*_Mapbox SDK version: v3.3.0-beta1

Activity

  1. changed the title [-]can i catch MGLAnnotationImage what i created?[/-] [+]Can I catch MGLAnnotationImage what I created?[/+] on Jun 24, 2016
  2. Paladinfeng commented on Jun 24, 2016

    @Paladinfeng
    Author

    I have another question, when i create a MGLMapView, and set scrollEnabled to no, i can't be penetrated
    like MKMapView, it's different with System

  3. 1ec5 commented on Jun 24, 2016

    @1ec5
    Contributor

    Regarding MGLAnnotationImage, are you asking whether there's a way to cache the MGLAnnotationImage? You can create an MGLAnnotationImage with a reuse identifier. In -[MGLMapViewDelegate mapView:imageForAnnotation:], you should first call -[MGLMapView dequeueReusableAnnotationImageWithIdentifier:] and return that value if it's non-null; then you only need to create a new MGLAnnotationImage if no image with that identifier could be dequeued.

    Regarding scrollEnabled, what is the expected result and what is the behavior you're seeing instead?

  4. Paladinfeng commented on Jun 24, 2016

    @Paladinfeng
    Author

    I know how to use it, but when i creatd a MGLAnnotationImage over, can i find it using some method like [imageForAnnotation:annotation] ? it will returm me a MGLAnnotation

  5. Paladinfeng commented on Jun 24, 2016

    @Paladinfeng
    Author

    scrollEnabled, i mean, if i put a MGLMapView into a ScrollView, the MGLMapView doesn't affect the scrollView scrolling, u can see it in MKMapView

  6. 1ec5 commented on Jun 24, 2016

    @1ec5
    Contributor

    I suppose we could add an -imageForAnnotation: method to MGLMapView, but it's a low priority given that MGLAnnotationView has a richer API that probably meets your needs better anyways.

    Can you open a separate bug about the scrolling issue, so we can keep the conversation clear? Thanks!

  7. Paladinfeng commented on Jun 24, 2016

    @Paladinfeng
    Author

    ok, thanks for answer my question, u could refer to MKMapView, it has a property named image, instead of using a special MGLAnnotationImage. Maybe mix MGLAnnotationImage and MGLAnnotationView is better. Sorry for my poor English

  8. 1ec5 commented on Jun 24, 2016

    @1ec5
    Contributor

    No problem! Good idea about adding image to MGLAnnotationView; let’s track that in #5469.

  9. added
    iOS
    annotations
    on Jun 24, 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

    annotationsiOSsupport

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions