首页 > 解决方案 > Mapbox - Reverse Geocoding - multiple language response

问题描述

I'm using Mapbox to Reverse geocode a latitude, longitude location and wanted the city name(Place name) response with multiple languages.

The documentation says,

'If more than one language tag is supplied, text in all requested languages will be returned'

But I'm getting the response only in the first language specified.

MapboxGeocoding.builder()
   .accessToken("xyz..."),
   .query(Point.fromLngLat(-123.1207, 49.2827)) 
   .languages("zh-CN,ru")
   .geocodingTypes(GeocodingCriteria.TYPE_PLACE)
   .mode(GeocodingCriteria.MODE_PLACES)
   .build();

This returns the place name in Chinese and not Russian.

Documentation : https://www.mapbox.com/android-docs/api/mapbox-java/libjava-services/4.0.0/index.html

Verison used: 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.1.0' and also 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.1.0-SNAPSHOT'

标签: androidmapboxmapbox-android

解决方案


我已经联系了 Mapbox 团队。显然,这是他们的移动 SDK 中的一个错误,但他们的 API 工作正常。在这里报告了这个。https://github.com/mapbox/mapbox-java/issues/446


推荐阅读