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

[ios] fixes #5036 draggable annotation views #5373

Merged
merged 1 commit into from
Jun 24, 2016

Conversation

frederoni
Copy link
Contributor

@frederoni frederoni commented Jun 16, 2016

Fixes #5036

Setting MGLAnnotationView's draggable property to YES will make it draggable.
In order to make it stick to the location where it was dropped, you have to implement;
-mapView:didDragAnnotationView:toLocation:
and update the coordinate property of the associated annotation.

Made a few changes compared to previous PR which didn't take center offset into account.

  • Circle offset is 0,0
  • Rectangle offset is "bottom-left"

drag_small

also updated doc in MGLMapViewDelegate, I hope it's more clear now.

/cc @1ec5 @boundsj @friedbunny

@frederoni frederoni added iOS Mapbox Maps SDK for iOS ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold annotations Annotations on iOS and macOS or markers on Android labels Jun 16, 2016
@1ec5
Copy link
Contributor

1ec5 commented Jun 16, 2016

The macOS build failed because this branch is based on release-ios-3.3.0, which doesn't have the OS X-to-macOS renaming from #5343. I've added a special Bitrise workflow for that release branch, but macOS builds will continue to fail for new PRs made against that branch.

@boundsj @friedbunny @kkaefer, maybe we should cherry-pick #5343 into the release branch to keep things sane. The macOS builds are important to iOS SDK development because the two SDKs share so much code.

@friedbunny
Copy link
Contributor

I'm 👍 on cherry-picking macOS into the release branch.

@1ec5
Copy link
Contributor

1ec5 commented Jun 18, 2016

I’ve cherry-picked #5343 into the release branch; the build failure should go away once you rebase.

@frederoni frederoni force-pushed the 5036-draggable-annotation-views branch from 5efaf14 to cbee7ff Compare June 21, 2016 13:27
@frederoni frederoni removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Jun 22, 2016
@tobrun tobrun mentioned this pull request Jun 23, 2016
@frederoni frederoni merged commit d29bef9 into release-ios-v3.3.0 Jun 24, 2016
@frederoni frederoni deleted the 5036-draggable-annotation-views branch June 24, 2016 17:42
@pveugen pveugen restored the 5036-draggable-annotation-views branch June 25, 2016 09:15
@pveugen pveugen deleted the 5036-draggable-annotation-views branch June 25, 2016 09:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
annotations Annotations on iOS and macOS or markers on Android iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants