forked from organicmaps/organicmaps
[android] Fixed initialization lan and lon for search items - p2p mode
This commit is contained in:
parent
00db6b99c6
commit
493669353d
1 changed files with 6 additions and 6 deletions
|
@ -308,13 +308,13 @@ jobject ToJavaResult(Result & result, search::ProductInfo const & productInfo, b
|
|||
ms::LatLon ll = ms::LatLon::Zero();
|
||||
string distance;
|
||||
double distanceInMeters = 0.0;
|
||||
if (hasPosition)
|
||||
{
|
||||
if (result.HasPoint())
|
||||
{
|
||||
auto const center = result.GetFeatureCenter();
|
||||
ll = MercatorBounds::ToLatLon(center);
|
||||
|
||||
if (result.HasPoint())
|
||||
{
|
||||
auto const center = result.GetFeatureCenter();
|
||||
ll = MercatorBounds::ToLatLon(center);
|
||||
if (hasPosition)
|
||||
{
|
||||
distanceInMeters = ms::DistanceOnEarth(lat, lon,
|
||||
MercatorBounds::YToLat(center.y),
|
||||
MercatorBounds::XToLon(center.x));
|
||||
|
|
Loading…
Add table
Reference in a new issue