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

[ios] Add annotation container view#5148

Closed
boundsj wants to merge 2 commits into
boundsj_scale_annotationsfrom
boundsj_annotation_container
Closed

[ios] Add annotation container view#5148
boundsj wants to merge 2 commits into
boundsj_scale_annotationsfrom
boundsj_annotation_container

Conversation

@boundsj
Copy link
Copy Markdown
Contributor

@boundsj boundsj commented May 26, 2016

Fixes #5140
Fixes #5089

Adds a new UIView subclass to contain MGLAnnotationView instances and an API for helping to manage the addition of new annotations. To mitigate known performance issues with UIView:addSubview:, this batches up the addition of subviews to the container before adding the container itself to the view hierarchy. The organization of the views in the separate container also naturally avoids the "piercing" issue seen before between annotations and callouts.

boundsj added 2 commits May 25, 2016 11:54
This adds an option to MGLAnnotationView so that a developer can control
how their annotation views scale in size as they approach the top of
the map view (along the Y axis). The size change is also affected by
the pitch (tilt) of the map view. If there is no tilt then scaling
is not performed. As the map is tilted scaling is gradually applied.

This turns the MGLAnnotationView implementation into an Objective C++
class so that SDK constants from C++ files can be used.

The new behavior is enabled by default to maintain consistency with
annotations backed by GL sprites. The MBXViewController redundantly
sets the new property as an illustration of use.
@boundsj boundsj added feature iOS Mapbox Maps SDK for iOS ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels May 26, 2016
@boundsj boundsj self-assigned this May 26, 2016
{
annotationView = [[MBXAnnotationView alloc] initWithReuseIdentifier:MBXViewControllerAnnotationViewReuseIdentifer];
annotationView.frame = CGRectMake(0, 0, 40, 40);
annotationView.frame = CGRectMake(0, 0, 10, 10);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MBXAnnotationView is also used for dropped pins, but this is kind of small for that demo. Let’s stop using an annotation view for dropped pins, so we get better visibility on GL annotations, which are still supported. MBXAnnotationView would continue to be used for other demos like “Add n Point Annotations”.

@1ec5 1ec5 added this to the ios-v3.3.0 milestone May 27, 2016
@boundsj boundsj force-pushed the boundsj_scale_annotations branch from c6ae08c to 4b3c26b Compare May 27, 2016 05:57
@boundsj boundsj closed this May 31, 2016
@1ec5
Copy link
Copy Markdown
Contributor

1ec5 commented May 31, 2016

The saga continues in #5194.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold feature iOS Mapbox Maps SDK for iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants