Location:

Reverse Geocoding

Reverse geocoding, also known as address resolution, refers to the conversion of services from known geographic coordinates to corresponding address descriptions (such as provinces, cities, neighborhoods, floors, rooms, etc.).

[Navinfo Navigation SDK for Android] only supports reverse geocoding and reverse geocoding services in China, and only supports Chinese map data. It does not support English or Chinese Pinyin map data.

Inverse geocoding is divided into online and offline modes. The reverseGeocoder class provides the method mReverseGeocoder.start(mPoint); to perform inverse geography and get the result in the callback.

Note: Offline data support is required in offline mode.

                (For complete code, see InverseCodeActivity.java in the Demo project)
                // Create an inverse geo object and set the callback to get the data in the callback
                mReverseGeocoder = new ReverseGeocoder(new ReverseGeocoder.EventHandler());
                Point point = new Point(11639580, 3997676);

                // Set offline mode to reverse geography
                mReverseGeocoder.setDataPreference(DataPreference.offlineOnly);

                // Set online mode to reverse geography
                mReverseGeocoder.setDataPreference (DataPreference.onlineOnly);
                
                // Start reverse geography
                mReverseGeocoder.start(mPoint);
                
                //Reverse geography callback function and corresponding event, please see the corresponding code of Demo InverseCodeActivity class.
            

Note: ReverseGeocoder reverse geography belongs to the PoiQuery query module, so PoiQuery should be initialized before calling reverse geography:

                // can set the search rule parameters
                PoiQueryInitParams param = new PoiQueryInitParams();
                PoiQuery.getInstance().init(param);
            

After running, click on the reverse geocode to display the results:

逆地理编码显示结果
TOP