<Geojson /> is not capable to fill the whole google-map (the whole "earth") #4406
Unanswered
qobaid-bunnyrents
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Did you find a fix? or is it a bug? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
The whole google-maps (thus the whole earth) can be represented in a "Rectangle" shape with the following coordinates:
[Lng , Lat]
Now if we want to render/draw a
<Geojson />
with only one Polygon (without holes/Interior-LinearRings) that has the previousely 4 mentioned coordinates, then nothing is really rendered/drawn by this<Geojson />
componentReproducible sample code
Steps to reproduce
<MapView />
component with "Google" as provider.<Geojson />
component with only one Polygon (without holes/Interior-LinearRings) that has the following coordinates for its Exterior-LinearRing:[[-180, 90], [180, 90], [180, -90], [-180, -90], [-180, 90]]
Expected result
I expect to have a successfully rendered/drawn Polygon that covers the whole google-map/earth.
The following attachment shows a correct/expected behavior, rendered by https://geojson.io, when using the same "geojson" provided in the "Reproducible sample code" section.
Actual result
Nothing is rendered/drawn by the
<Geojson />
component.React Native Maps Version
1.2.0
What platforms are you seeing the problem on?
Android, iOS (Google Maps)
React Native Version
0.67.4
What version of Expo are you using?
Not using Expo
Device(s)
iPhone 13 (iOS 15.0), Pixel 3 (Android 11)
Additional information
Maybe this library tries to find the the shortest path when drawing a line between two points, and since the map is wrapable in the horizontal axis then the path's distance will be zero for all lines, thus nothing is drawn/rendered.
** Is there another way to achieve the expected behavior?
Beta Was this translation helpful? Give feedback.
All reactions