We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SearchEngine
OfflineSearchEngine
private val tileRegionId = "Washington DC" private val tileStore = TileStore.create() private val descriptors = listOf(OfflineSearchEngine.createTilesetDescriptor()) // Working if coordinates are in US, UK, Mexico, e.g: // private val dcLocation Point.fromLngLat(-77.0339911055176, 38.899920004207516) // Not working if coordinates are in HK, Japan, China Mainland private val dcLocation = Point.fromLngLat(127.024612, 37.532600) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) searchEngine = OfflineSearchEngine.create( OfflineSearchEngineSettings( tileStore = tileStore ) ) searchEngine.addEngineReadyCallback(engineReadyCallback) searchEngine.addOnIndexChangeListener(object : OfflineSearchEngine.OnIndexChangeListener { override fun onIndexChange(event: OfflineIndexChangeEvent) { if (event.regionId == tileRegionId && (event.type == EventType.ADD || event.type == EventType.UPDATE)) { logI("SearchApiExample", "$tileRegionId was successfully added or updated") searchRequestTask = searchEngine.reverseGeocoding( OfflineReverseGeoOptions(center = dcLocation), searchCallback ) } } override fun onError(event: OfflineIndexErrorEvent) { logI("SearchApiExample", "Offline index error:", event) onFinished() } }) }
In OfflineSearchKotlinExampleActivity.kt the IndexChangeListener will not be invoked if change the coordinates to HK, Japan, China Mainland, e.g:
private val dcLocation = Point.fromLngLat(114.1547347, 22.2846202) <== HK private val dcLocation = Point.fromLngLat(127.024612, 37.532600) <== Japan
But the orginal coordinates provided by sample works, and tried GPS in Maxico and UK also works.
The IndexChangeListener should be invoked, and tile should be able to load, and then can perform offline search.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
SearchEngine
class, and etc.)OfflineSearchEngine
class, and etc.)Code examples
Observed behavior and steps
In OfflineSearchKotlinExampleActivity.kt the IndexChangeListener will not be invoked if change the coordinates to HK, Japan, China Mainland, e.g:
private val dcLocation = Point.fromLngLat(114.1547347, 22.2846202) <== HK
private val dcLocation = Point.fromLngLat(127.024612, 37.532600) <== Japan
Screenrecorder-2024-05-31-15-17-36-98.mp4
But the orginal coordinates provided by sample works, and tried GPS in Maxico and UK also works.
Expected behavior
The IndexChangeListener should be invoked, and tile should be able to load, and then can perform offline search.
The text was updated successfully, but these errors were encountered: