map_animated_scrollview
kandi X-RAY | map_animated_scrollview Summary
kandi X-RAY | map_animated_scrollview Summary
map_animated_scrollview
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of map_animated_scrollview
map_animated_scrollview Key Features
map_animated_scrollview Examples and Code Snippets
Community Discussions
Trending Discussions on map_animated_scrollview
QUESTION
Using this code i try to add on each marker an onpress option
there is the source source and there is a sample of my work
after many try i give up ... is there a way to add on my onpress the x position to my Animated.ScrollView
when i scroll i can see the marker changing but i want to add an onpress function in each marker. when press one off the marker i want to the scrollview set to the position of my maker
...ANSWER
Answered 2018-Jul-23 at 14:20To scroll to a position x,y in your scroll view. Use the scrollTo function in the scroll view. Checkout here the react native documentation about it https://facebook.github.io/react-native/docs/scrollview#scrollto.
Use the ref property to execute the method in your scrollview.
Now you need to identify the x and y of your markers so you can scroll to them. Never done something like that but here is an article of someone calculating the x and y of react native elements https://github.com/facebook/react-native/issues/1374.
QUESTION
So I wanted to try out this map example https://codedaily.io/tutorials/9/Build-a-Map-with-Custom-Animated-Markers-and-Region-Focus-when-Content-is-Scrolled-in-React-Native
where the full code can be found here: https://github.com/browniefed/map_animated_scrollview/blob/master/index.ios.js
It's fairly easy to use and works on iOS like a charm, but not on Android and looks like this (to the left iPhone X, to the right Pixel 2 XL):
Obviously, the circles around the marker on the map aren't rendered on android. I know that in some cases you need different code bases for each operating system, but I can't find a solution in this case.
As always, thanks in advance.
...ANSWER
Answered 2018-Oct-28 at 20:25Are you sure that the styling is right? Maybe the code is right but it is being displayed somewhere outside the screen. I always had problems with it. It looks awesome on ios but android doesn't and vice versa. Look at the position : "absolute" maybe it causes it to disappear.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install map_animated_scrollview
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page