You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love your algorithm and it was working great for me on android but did not seem to be providing right coordinates for the same polyline on ios.
One of the examples:
Polyline: BHmv3jsdxtq2spCxgDw6E15Bj1C
Results returned on browser and android webview:
lat: 49.2891891, lng: -123.1394009
lat: 49.2890346, lng: -123.1391537
lat: 49.2889423, lng: -123.1392899
However results returned on iphone webview have different longitude values (latitudes are same):
lat: 49.2891891, lng: 91.6089639
lat: 49.2890346, lng: 91.60921110000001
lat: 49.2889423, lng: 91.60907490000001
Please help. I have tried debugging it but to no avail.
The text was updated successfully, but these errors were encountered:
bmunjal
changed the title
Different Longitude values from decoder in android and ios web view cordova
Different Longitude values from decoder in android and ios web view cordova - Using Javascript
Nov 27, 2021
The issue happens because as it seams iPhone's WebView does not support BigInt JS type and library falls back to Number. And since Number is double it can't represent large integer numbers and algorithm fails when decodes polyline.
The solution could be to encode polyline with lower precision. For example 5.
Hi there
I love your algorithm and it was working great for me on android but did not seem to be providing right coordinates for the same polyline on ios.
One of the examples:
Polyline: BHmv3jsdxtq2spCxgDw6E15Bj1C
Results returned on browser and android webview:
lat: 49.2891891, lng: -123.1394009
lat: 49.2890346, lng: -123.1391537
lat: 49.2889423, lng: -123.1392899
However results returned on iphone webview have different longitude values (latitudes are same):
lat: 49.2891891, lng: 91.6089639
lat: 49.2890346, lng: 91.60921110000001
lat: 49.2889423, lng: 91.60907490000001
Please help. I have tried debugging it but to no avail.
The text was updated successfully, but these errors were encountered: