×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    9

    Mapping address suggestions

    In Nokia Drive and Nokia maps, as you start typing an address or a postcode you get an auto complete box with suggestions. Is the webservice this connects to publicly available? I'm writing an app that uses the maps API's and this would be useful to add.
    Thanks

  2. #2
    Nokia Developer Champion
    Join Date
    Sep 2012
    Location
    Morocco
    Posts
    292

    Re: Mapping address suggestions

    You might do it with ReverseGeocodeQuery for each change in the box, search for the elements with reverseGeocodeQuery.QueryAsync you'll get a list of address/postcode as a result in QueryCompleted , that you can put in the autocomplete zone.
    (Didn't tested)

    Hope it helps,
    Yassine

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    9

    Re: Mapping address suggestions

    ReverseGeoCodeQuery will take a GeoCoordinate such as your current location and convert it to a readable location like "Redmond, Washington". What I need is to be able to start typing "Red" into a text box and it gives me autocomplete suggestions of places nearby that start with "Red". Try the search function in Nokia Drive to see what I mean.
    GeoCodeQuery looks more hopeful but its accuracy in picking places near me is way off even with setting the center GeoCoordinate. Either that or its awareness of small to medium sized towns in the UK is lacking.

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Mapping address suggestions

    You might want to have fully qualified search string, i.e. when looking for a city do add country into end, when searching for address, so add city & country.

  5. #5
    Registered User
    Join Date
    Apr 2013
    Posts
    9

    Re: Mapping address suggestions

    But that defeats the point. It should be predicting where you want based on your current location like Nokia Drive does.

  6. #6
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Mapping address suggestions

    Basically apps can hide loads of functionality, thus assuming that they work with strait forward manner without having any additional logic, if often wrong, thus I would suggest you would not make assumptions of how apps made by other work.

    I have no idea of the logic of the Drive apps destination search, but it could indeed could be using more complicated coding than the simple Geocoding service examples are.

    I have one suggestion you could try out, basically maybe you could add a country box under the search string at least, and determin the country initially by yourself (use locale settings, or better use the ReverseGeoCodeQuery ), and then let the user either let it be, or change it. And just add the text from the box into the end of your search string when running the GeoCodeQuery

  7. #7
    Nokia Developer Moderator
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: Mapping address suggestions

    Quote Originally Posted by realworld666 View Post
    ... an auto complete box with suggestions. Is the webservice this connects to publicly available?
    You may want to look at the suggestion service of the RESTful places API. All you need to supply is a location hint for the centre of the search box and the partial text to get a response. You can see a working http/json example in the API explorer, you'll need to access the web service in the standard manner and interpret the results as necessary.

  8. #8
    Registered User
    Join Date
    Apr 2013
    Posts
    9

    Re: Mapping address suggestions

    Quote Originally Posted by jasfox View Post
    You may want to look at the suggestion service of the RESTful places API. All you need to supply is a location hint for the centre of the search box and the partial text to get a response. You can see a working http/json example in the API explorer, you'll need to access the web service in the standard manner and interpret the results as necessary.
    That looks like exactly what I'm looking for. I'll check it out tonight. Many thanks

  9. #9
    Registered User
    Join Date
    Apr 2013
    Posts
    9

    Re: Mapping address suggestions

    What is the best way to get the longitude and latitude coordinates of a suggestion?

  10. #10
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Mapping address suggestions

    Quote Originally Posted by realworld666 View Post
    What is the best way to get the longitude and latitude coordinates of a suggestion?
    What excatly do you mean by that ? Suggestion is not a palce, it is suggestion for complete string for the current partial input, which you could then use with teh geocoding services..

  11. #11
    Registered User
    Join Date
    Apr 2013
    Posts
    9

    Re: Mapping address suggestions

    Quote Originally Posted by symbianyucca View Post
    What excatly do you mean by that ? Suggestion is not a palce, it is suggestion for complete string for the current partial input, which you could then use with teh geocoding services..
    What I mean is, lets assume this feature is used in an AutoCompleteBox for the destination in a GPS navigation app. Here's an example:
    http://demo.places.nlp.nokia.com/pla...plication/json
    This returns
    {
    "suggestions":[
    "Carman Close, Nottingham, NG16 1, United Kingdom",
    "Boyden Carmichael Smith",
    "Carmel, Holywell, United Kingdom",
    "Carmel Gardens, Nottingham, NG5 6, United Kingdom",
    "Carman Recovery",
    "Carmel, Caernarfon, United Kingdom",
    "Mount Carmel House, Derby, DE22 1, United Kingdom",
    "Mount Carmel Street, Derby, DE23 6, United Kingdom",
    "Carmel, Llanelli, United Kingdom",
    "Carmen Grove, Leicester, LE6 0, United Kingdom",
    "Capel Carmel, Pwllheli, United Kingdom",
    "Carmarthen, United Kingdom"
    ]
    }

    What I want is the first suggestion which is "Carman Close, Nottingham, NG16 1, United Kingdom". I want to navigate to that place and put a pin in the map but to do it I need a latitude and longitude for the location. How do I get from that suggestion to latitude and longitude? I know its an entire street but there must be a way to get a position that's in the vicinity of the suggestion?

  12. #12
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Mapping address suggestions

    You would simply use the string as input for GeoCode query, and it would then give you the geo location which you could use.

  13. #13
    Registered User
    Join Date
    Apr 2013
    Posts
    9

    Re: Mapping address suggestions

    Quote Originally Posted by symbianyucca View Post
    You would simply use the string as input for GeoCode query, and it would then give you the geo location which you could use.
    Some of the suggestions returned are simply none specific places in the area. For example "Watnall Road Post Office" without any additional information the built in windows phone 8 GeocodeQuery won't return any matches. Is there a HERE version that works for this?

  14. #14
    Nokia Developer Moderator
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: Mapping address suggestions

    Quote Originally Posted by realworld666 View Post
    For example "Watnall Road Post Office" without any additional information the built in windows phone 8 GeocodeQuery won't return any matches. Is there a HERE version that works for this?
    Try the HERE Places API discover service. e.g. http://demo.places.nlp.nokia.com/pla...ication%2Fjson

    Code:
    {
        "results":
        {
            "items":[
                {
                    "position":[
                        53.00415,-1.25055
                    ],
                    "distance":163,
                    "title":"Watnall Sub Post Office",
                    "averageRating":0,
                    "category":
                    {
                        "id":"post-office",
                        "title":"Post office",
                        "href":"http://demo.places.nlp.nokia.com/places/v1/categories/places/post-office?app_id=_peU-uCkp-j8ovkzFGNU&app_code=gBoUkAMoxoqIWfxWA5DuMQ",
                        "type":"urn:nlp-types:category"
                    },
                    "icon":"http://download.vcdn.nokia.com/p/d/places2/icons/categories/20.icon",
                    "vicinity":"41 Main Road<br/>Watnall<br/>Nottingham<br/>NG16 1<br/>United Kingdom",
                    "having":[
                    ], ... etc
    There is a confusion here between when to use Places and when to use Geocoding - Geocoding works best when you have complete address, Places works better when you are doing a fuzzy search and you are looking for an X around Y. The suggestion service mentioned earlier in the thread makes a guess at what sort of text X is likely to be around a given geocoordinate. It is likely to return a mixture of addresses, categories and landmarks. Since in this case the selected suggestion text is still free text (not a formatted address) the best chance to interpret the text would be another part of the places service - i.e. let the back end logic work out the ranking.

    Note that the Places service only returns the correct result because the location hint (the at parameter) is near to the desired location. If you wanted to find the geocoordinates of "41 Main Road, Watnall, Nottingham, United Kingdom", then you could use the on-board Geocoding service, and the correct result would be obtained from anywhere in the World
    Last edited by jasfox; 2013-04-28 at 17:04.

Similar Threads

  1. Problem In Mapping physical key mapping with logical key
    By amatra in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-11-26, 12:55
  2. Mapping a physical address
    By dsiorpaes in forum Symbian C++
    Replies: 0
    Last Post: 2005-09-18, 10:11
  3. can i configure both an IPv6 address and IPv4 address on Symbian?
    By shangoo in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2003-10-16, 08:24
  4. Replies: 0
    Last Post: 2003-10-16, 08:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •