[marker flicker] Fix flicker of map pins on state change#728
Merged
gilbox merged 2 commits intoreact-native-maps:masterfrom Nov 4, 2016
Merged
[marker flicker] Fix flicker of map pins on state change#728gilbox merged 2 commits intoreact-native-maps:masterfrom
gilbox merged 2 commits intoreact-native-maps:masterfrom
Conversation
Contributor
Author
athaeryn
added a commit
to athaeryn/react-native-maps
that referenced
this pull request
Oct 27, 2016
gilbox
reviewed
Oct 28, 2016
components/decorateMapComponent.js
Outdated
|
|
||
| if (provider === PROVIDER_DEFAULT) { | ||
| components.default = getDefaultComponent(); | ||
| if (!components.default) components.default = getDefaultComponent(); |
Contributor
There was a problem hiding this comment.
thanks for catching this! I wonder if it would be better to do:
components[DEFAULT_PROVIDER] = getDefaultComponent();
instead.... It's just a little weird because the value of DEFAULT_PROVIDER is null.
Contributor
Author
There was a problem hiding this comment.
Yeah that's a bit clearer (and can use the existing cache return at the beginning of the function).
carleryd
added a commit
to carleryd/react-native-maps
that referenced
this pull request
Oct 31, 2016
mlanter
commented
Oct 31, 2016
| if (provider === PROVIDER_DEFAULT) { | ||
| components.default = getDefaultComponent(); | ||
| return components.default; | ||
| components[PROVIDER_DEFAULT] = getDefaultComponent(); |
Contributor
Author
There was a problem hiding this comment.
Don't need to check if already set, because it was then it would have been returned earlier.
Contributor
Author
Contributor
|
domo arigatou! |
|
When do you plan to release this? |
|
@gilbox How I can help you with release? |
timxyz
pushed a commit
to 3sidedcube/react-native-maps
that referenced
this pull request
Nov 22, 2016
* commit '3d28a7d9fd005d59219668cf61177fe574170b84': (24 commits) examples-setup.md: update android instructions (react-native-maps#743) add example for overlay overpress and docs iOS google maps custom tile support (react-native-maps#770) [Docs] Fix capitalisation of Xcode and CocoaPods (react-native-maps#749) Implements animateToRegion to Google Maps iOS (react-native-maps#779) [RN][iOS][google] Set region only when view has width&height - Fix type issue in AIRMapManager - Setup Gemfile in example/ios dir to avoid problems with different versions of cocoapods - Update examples-setup.md to use bundler - Change MapView so that we only set the native region prop when there is a width and height. GoogleMaps iOS requires the width and height to properly calculate the map zoom level. updates [marker flicker] Fix flicker of map pins on state change (react-native-maps#728) add onPress for polygons and polylines on iOS and Android Use latest Google Play Services (react-native-maps#731) Update installation.md (react-native-maps#742) Add latest patch releases to the changelog (react-native-maps#752) [ios][google] implement fitToSuppliedMarkers and fitToCoordinates (react-native-maps#750) If we've disabled scrolling within the map, then don't capture the touch events (react-native-maps#664) Fix dynamic imageSrc removal, fix flicker in react-native-maps#738 (react-native-maps#737) Fix Anchor point on Google Maps iOS Added ios google maps circle support Added google map type only check Fixed typo in google maps podspec Added ios google maps polygon, polyline, maptype support ...
Exilz
pushed a commit
to archriss/react-native-maps
that referenced
this pull request
Dec 9, 2016
Contributor
|
Looks like does not happen in recent versions (0.19.0) Let us know if still persists. |
|
Still having this flickering bug. |
|
still bug exist in version 0.27.1 |
pinpong
pushed a commit
to pinpong/react-native-maps
that referenced
this pull request
Feb 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #683 caused by #548.
In #548, MapMarker.js was changed from
const AIRMapMarker = requireNativeComponent('AIRMapMarker', MapMarker);toconst AIRMapMarker = this.getAirComponent();.AirMapMarkeris what is returned in the render method.The bug was that
this.getAirComponent()was returning a new native component each time causing a re-render. This only happened for the default component, not the other ones since they were cached. The fix is to cache the default component.Note: this seems to affect map markers with arbitrary views inside them the most.
Before:

After:
