anyone can have code to encode the polyline(array of ) latitude and longitude value to the ascii string in java
for e.g.
my array was in java
latlng{
{22296401,70797251},
{22296401,70797451},
{22296401,70797851}
}
this above value store into the List object as GeoPoint type like
List<GeoPoint> polyline
and want to convert into ascii string like this
a~l~Fjk~uOwHJy@P
I need method which accept array of latlng value and return the ascii string any help will be appreciate thanks in advance
I got the answer from this post
this two function was needed to encode the polyline array into the ascii string
for testing try the co-ordinate from this site and compare the output
here is the snippet
from the co-ordinate link you getting this point
ok so now you think the co-ordinate are why different see when you get new co-ordinate then you have subtract from the previous one for example
that value you have to pass to the encodeSignedNumber() method and you get the ascii value for that co-ordinate
and so on....