You Are Here:

Community: Developer Discussion Boards

#1 Old issue searching landmarks - 2008-12-07, 11:04

Join Date: Aug 2008
Posts: 7
sagar.arlekar@gmail.com
Offline
Registered User
Hello,

I have an issue with searching landmarks using the Landmarks module.

1) What is the type of object LmOperation::Execute() returns? The documentation does not tell this.

The following is my function, I want to list all the landmarks found according to the nearest-criterion set.

Code:
def getLandmark(lat, lon):

      lat = float(lat)
      lon = float(lon)

      ld = landmarks.OpenDefaultDatabase();

      categoryManager = ld.CreateCategoryManager();

      criteria = landmarks.CreateNearestCriteria(lat, lon, 500.0, False , 1000.0)

      search = ld.CreateSearch();

      operation = search.StartLandmarkSearch(criteria, landmarks.ENoAttribute, 0, 0);

      result = operation.Execute()

      resultStr = repr(result)

      resultStr = unicode(resultStr)

      note(resultStr, 'info')
The value of resultStr is shown 'None' on note().
Anything wrong with the parameters of CreateNearestCriteria()?
What is the right way to traverse/access landmarks returned by operation.Execute()?

Even setting criterion as criteria = landmarks.CreateAreaCriteria( -90, 90, -90, 90) does not help, resultStr shows 'None'

I have 3 Landmarks on the phone inserted through Nokia Landmarks Application. All landmarks have coordinated close to (12.9, 77.6)
The 3 landmarks are obtained when I do the following

Code:
      landmarkIter = ld.LandmarkIterator(landmarks.ENoAttribute, 0);
      id = landmarkIter.Next();

      while id != landmarks.KPosLmNullItemId:

              landmark = ld.ReadLandmark(id);

              lmName = landmark.GetLandmarkName();
              landmarkList.append(lmName)
              lmName = unicode(lmName);
              note(lmName, 'info')
              id = landmarkIter.Next();
              landmark.Close();

      landmarkIter.Close();
Kindly help me.
Is there something fundamentally wrong? What is the right way to use the criteria?


Regards,
Sagar
Reply With Quote

#2 Old Re: issue searching landmarks - 2008-12-07, 13:45

Join Date: Aug 2008
Posts: 7
sagar.arlekar@gmail.com
Offline
Registered User
Hello, I got the bug. My code was wrong.
The following is the code segment which worked for traversing the searched landmarks

Code:
       landmarkIter = search.MatchIterator()

       lid = landmarkIter.Next();
      
       landmarkList = []
       
       while lid != landmarks.KPosLmNullItemId:
               landmark = ld.ReadLandmark(lid);
               lmName = landmark.GetLandmarkName();
               landmarkList.append(lmName)
               lmName = unicode(lmName);
               note(lmName)
               lid = landmarkIter.Next();
               landmark.Close();

       landmarkIter.Close();
Thanks
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
6110 Navigator Landmarks with Negative Western Longitudes John Angus Location Based Services and Navigation 2 2009-10-12 05:15
Cannot find where the issue is, Bluetooth service discovery newbietoprofessional Mobile Java Networking & Messaging & Security 3 2008-07-14 17:39
issue with at+cusd over bluetooth link hbanks General Messaging 2 2007-09-25 22:21
RTSP video streaming issue on 6280 olivier_irac General Discussion 0 2006-12-04 16:11
Nokia 9500: browsing issue ? cache issuse ? coberle General Browsing 0 2005-10-12 17:31

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ