Comments (12)
I've done a bit of digging and have come up with a possible solution.
You need to grab all the textureviews contained within that view and then render them on top of the base bitmap using a canvas.
Solution can be found within this thread (fastlane/fastlane#2081). I've tried it out and I'm correctly seeing my map image.
from react-native-view-shot.
hello sorry for the delay in getting back here but i had a crazy week. I think is a good thing to try, if you want i am cloning and doing some tests to see if i can create a PR 👍 , let me know if any of you is doing the same so we dont overlap 😛
from react-native-view-shot.
well i can see the map now :) with this commit https://github.com/kanekotic/react-native-view-shot/commit/fab00971c1da74ae9ad1a2e09d939e2740821c6f , the view is missaligned when I export but I will try to solve that ... but seems a good direction to solve this 😄
from react-native-view-shot.
so I have been putting a bit of time on this, but still having issues, the problem is how to combine different layers in the bitmap, specifically what areas are going to be ignored, also the layering seem a bit complex. I will keep you guys posted.
meanwhile I find a small workaround for maps that could interest you @elliotstokes and is set the property cacheEnabled
to true in the MapView
to get the map as an image (it works for me, I have not tried it to change it on the fly).
from react-native-view-shot.
Yes it works! Thanks!
from react-native-view-shot.
Hey. I'm seeing the same issue (android only). I'm guessing it's something to do with the way the maps are rendered.
from react-native-view-shot.
this might be somehow related to the same problem appearing for WebView ( #34 ) . there are probably some kind of View like OpenGL View that are not friendly with current implementation of snapshotting. I'm wondering if it's solvable and i would be happy if anyone want to investigate.
it would be good to have somewhere a test app that test bunch of different kind of view, so we can easily test things and do a checklist of things supported per platform.
from react-native-view-shot.
mmh that's very promising! do you think it can be done generically on a View?
from react-native-view-shot.
yeah feel free to do this and get a PR! that would be awesome =)
I guess we'll eventually need to investigate the same for iOS, but ok for now to just focus on android
from react-native-view-shot.
https://github.com/gre/react-native-view-shot-example now includes a react-native-maps example. it seems to work on iOS but I can reproduce the problem for Android.
from react-native-view-shot.
Yes, on Android still i see a black snapshot with only the google logo.
from react-native-view-shot.
@gerardus1995 what about this https://github.com/airbnb/react-native-maps#take-snapshot-of-map ?
if that lib can do the snapshotting instead, we will close that issue.
from react-native-view-shot.
Related Issues (20)
- Image Quality is too low while i am taking view shot of my screen
- White borders when view dimensions are not integers
- Crash error on android HOT 5
- not working on ios RN0.72.4
- newArchEnabled HOT 2
- Viewshot is not capture screen shot of absolute positioned Views/
- Is this package still maintained?, because it doesn't seem to work on android anymore HOT 2
- Run time crash due to use of depricated UI Image apis
- not working on android React-Native 0.7x HOT 1
- In scrollable content when i take a shot end of the content styles not applied example borderRadius and color and border
- Android: Image is coming partially black on Android when used in conjunction with ScrollView! HOT 3
- how to avoid black edges formed after capturing. HOT 3
- Regression in 4.0.0-alpha.2 HOT 1
- In android it does nothing and not showing any error logs. Works fine in iOS HOT 5
- Privacy Manifest file HOT 1
- captureRef webview ref error
- view-shot content will not update when webview changes
- One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts HOT 2
- Need support for android O and above
- The generated screenshot appears blurry on Android devices, as if the resolution is incorrect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-view-shot.