×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    23

    launch nokia maps in a specific location.

    hi,
    how can i launch nokia maps with known latitude and longtitude parameters from my app?
    i've tried to create a LMX file and launch it as document, but it loads it in "Landmark Viewer".
    thank you.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: launch nokia maps in a specific location.

    AFAIK there are no public documentation of how to use Nokia Maps from external application, also different versions of the Maps application will most likely work different ways, thus I would recommend utilizing the Qt APIs for maps instead.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    23

    Re: launch nokia maps in a specific location.

    i've found out how to do that.
    nokia maps has a service that always work on the background and waits for AIW command and launch nokia maps in a specific location.

    Code:
    #include <AiwServiceHandler.h>
    #include <lbsposition.h> 
    #include <epos_cposlandmark.h>
    #include <epos_poslandmarkserialization.h>
    
    void CUtilities::ShowLandmark(const TReal64 longitude, const TReal64 latitude, const TDesC& name){
    
    	_LIT8(KContentTypeLandmark, "application/x-landmark");
    	
    	CAiwServiceHandler* iServiceHandler = CAiwServiceHandler::NewL();
    	CAiwCriteriaItem* criteria = CAiwCriteriaItem::NewLC(KAiwCmdMnShowMap, KAiwCmdMnShowMap, KContentTypeLandmark);
    	CAiwGenericParamList& inParamList = iServiceHandler->InParamListL();
    	CPosLandmark* landmark = CPosLandmark::NewLC();
    	RCriteriaArray interest;
    	CleanupClosePushL(interest);
    
    	criteria->SetServiceClass(TUid::Uid(KAiwClassBase));
    	interest.AppendL(criteria);
    	iServiceHandler->AttachL(interest);
    
    	landmark->SetLandmarkNameL(name);
    	landmark->SetLandmarkDescriptionL(name);
    	TCoordinate coordinate(latitude, longitude);
    	TLocality locality(coordinate, 0);
    	landmark->SetPositionL(locality);
    	
    	HBufC8* landmarkBuffer = PosLandmarkSerialization::PackL(*landmark);
    	CleanupStack::PushL(landmarkBuffer);
    
    	TAiwGenericParam param(EGenericParamLandmark, TAiwVariant(*landmarkBuffer));
    	inParamList.Reset();
    	inParamList.AppendL(param);
    
    	iServiceHandler->ExecuteServiceCmdL(KAiwCmdMnShowMap, inParamList, iServiceHandler->OutParamListL(), 0, NULL); 
    	CleanupStack::PopAndDestroy(4); //landmark, landmarkBuffer, interest, criteria
    	delete iServiceHandler;
    		
    }

Similar Threads

  1. Is there a way to convert Maps Data from Nokia Maps 3 to be compatible with N Maps 2
    By dimchopicha in forum General Development Questions
    Replies: 6
    Last Post: 2011-01-09, 17:50
  2. how to launch browser with specific url
    By mobio.dev in forum Symbian
    Replies: 1
    Last Post: 2010-03-11, 08:36
  3. Replies: 8
    Last Post: 2009-11-12, 10:28
  4. How to launch Nokia Maps application
    By aarniti in forum Symbian
    Replies: 5
    Last Post: 2009-10-15, 12:59
  5. Launch browser with specific IAP on S60 MR
    By nadav_smilansky in forum Symbian
    Replies: 3
    Last Post: 2009-10-14, 18:03

Posting Permissions

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