-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MapView to support MKPointAnnotation using new attribute annotate in Map... #810
Conversation
Please review the changes for supporting annotation inside MapView |
if (title.length){ | ||
pin.title = title; | ||
} | ||
[view addAnnotation:pin]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never going to remove the pin, right?
Yes correct |
Wouldn't it make more sense to provide an array of pins? Also, we'd really want to be able to remove them. We could do that by maintaining a dictionary of annotations keyed by coordinate internally and when the array is updated we'd remove the ones that are no longer in the array. |
… remove the old pins and add new ones
Running UIExplorer, going into MapView, and tapping on the annotation freezes the app. I've tried this with a blank project with MapView, along with an ordinary annotation; same problem. Occurs in both simulator and device. Inspecting memory usage via Xcode reveals that after annotation is tapped, memory usage keeps on rising, and CPU suddenly jumps to ~180%, and stays around there. |
That's weird … I'm seeing this on iOS 8.1 simulator, but not on iOS 8.3 |
OK, I've found the problem. I'm landing a fix ASAP, but in the meantime if it's blocking you, you can fix it by replacing the layoutSubviews method in RCTMap.m with
|
Why shouldn't the annotation be a At least provide a way to customize the annotation, replace the default drop pin on iOS, leverage the appearance between iOS and Android. |
Fixed typo in view.md
MapView to support Pin annotation