icerockdev/moko-maps

Correct calculation of area for Mapbox getSimilarNearAddresses on Android

Opened this issue · 1 comments

API pass only radius value when we call getSimilarNearAddresses, but Mapbox not support search of simmilar address and we use Geocoder of Android OS. This implementation require min/max lat/lng for search, not just radius.
For now implemented this logic:

// TODO calculate bounds from radius
        @Suppress("MagicNumber")
        val radiusLatitude = maxRadius * 0.001

        @Suppress("MagicNumber")
        val radiusLongitude = maxRadius * 0.001

It should be fixed

Will be not actual after implementation #43