Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - My geocoder search dialog suggestions differ from Google Map

My geocoder search dialog suggestions differ from Google Map

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

My geocoder search dialog suggestions differ from Google Map

Postby GlennMiller » Tue Nov 02, 2010 6:55 pm

My application includes a MapActivity and the Android Search Dialog to allow the user to type a map address to zoom the map. I am using a ContentProvider's query method to offer search suggestions as they type an address in the Search Dialog.

I am testing my results on my HTC Incredible, and noticed I am not getting as accurate suggestions as Android's Google Map search is giving. I'm assuming they are using the same GeoCoder logic I am. For example, in Google Map's if I type in "Eiff" I immediately get results for the "Eiffel Tower, Quai Branly, Paris, France", etc., but with my code, I don't get any results. I have the same inconsistency whether I use a street address or landmark in my query.

Any ideas?

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. private Cursor getSuggestions(String query) {
  2.  
  3.                 final MatrixCursor result = new MatrixCursor(new String[] {
  4.                                 BaseColumns._ID, // must include this column
  5.                                 SearchManager.SUGGEST_COLUMN_TEXT_1});
  6.  
  7.                 Geocoder geoCoder = new Geocoder(getContext(),
  8.                                 Locale.getDefault());
  9.                 try {
  10.                         List<Address> addresses = geoCoder.getFromLocationName(query, 10);
  11.  
  12.                         int i = 0;
  13.                         for (Address address : addresses) {
  14.                                         result.addRow(new Object[] { i++, address.getAddressLine(0)});
  15.                         }
  16.                 } catch (IOException e) {
  17.                         e.printStackTrace();
  18.                 }
  19.  
  20.                 return result;
  21.         }
  22.  
Parsed in 0.013 seconds, using GeSHi 1.0.8.4
GlennMiller
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Nov 02, 2010 6:36 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 2 guests