Skip to content

Commit

Permalink
Merge pull request #692 from mapzen/672-incorrect-region
Browse files Browse the repository at this point in the history
Fix incorrect results showing for reverse geocode
  • Loading branch information
ecgreb authored Jul 21, 2016
2 parents fc207f4 + 883aa34 commit ee833df
Show file tree
Hide file tree
Showing 5 changed files with 537 additions and 524 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ class MainActivity : AppCompatActivity(), MainViewController,
SearchViewController.OnSearchResultSelectedListener {

companion object {
@JvmStatic val MAP_DATA_PROP_SEARCHINDEX = "searchIndex"
@JvmStatic val MAP_DATA_PROP_ID = "id"
@JvmStatic val MAP_DATA_PROP_NAME = "name"
@JvmStatic val DIRECTION_LIST_ANIMATION_DURATION = 300L
@JvmStatic val PERMISSIONS_REQUEST: Int = 1
Expand Down Expand Up @@ -293,13 +291,7 @@ class MainActivity : AppCompatActivity(), MainViewController,
if (properties.contains(MAP_DATA_PROP_NAME)) {
poiTapName = properties[MAP_DATA_PROP_NAME];
}
if (properties.contains(MAP_DATA_PROP_SEARCHINDEX)) {
val searchIndex = properties[MAP_DATA_PROP_SEARCHINDEX]!!.toInt()
presenter.onSearchResultTapped(searchIndex)
} else {
presenter.onReverseGeoRequested(poiTapPoint?.get(0)?.toFloat(),
poiTapPoint?.get(0)?.toFloat())
}
presenter.onFeaturePicked(properties, poiTapPoint as FloatArray)
})
checkPermissionAndEnableLocation()
mapzenMap?.setFindMeOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ interface MainPresenter {
fun onIntentQueryReceived(query: String?)
fun onRouteRequest(callback: RouteCallback)
fun generateRawFeature(): Feature
fun onFeaturePicked(properties: Map<String, String>, poiPoint: FloatArray)
}
Loading

0 comments on commit ee833df

Please sign in to comment.