react-native-mapbox-gl
react-native-mapbox-gl copied to clipboard
Cut/Clip/Crop Image (ImageSource) with ShapeSource
Is there a way to crop/clip an image (url) using ImageSource with a geoJSON shape in ShapeSource?
OR
A way to "fill" the geoJSON ShapeSource with the image (url) - not patterned the way fillPattern renders on zoom, but contained within some lat/lon bounds?
Thanks!
Did you find any solution to this?
@mnuriyumusak Unfortunately no. For the time being I am using the approach of just placing the uncropped image at the appropriate coordinates on the map, and then placing a massive geoJson (essentially wrapping the globe) on top with a hole cut out in the shape i want. This means, though, that for this particular layer the mapbox map is essentially hidden by the geoJson file (and state/country boundaries I then add on top). I would still love a solution to this, but have been busy with other things so haven't revisited.
Attached are some screenshots, one with the map as is with CircleLayer and the other as I describe.