×

Discussion Board

Results 1 to 10 of 10

Hybrid View

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    1

    WRT/Ovi Maps integration on N8

    Has anyone managed to launch the Ovi maps app with a location (lat, lng co-ordinates) from a web runtime app? Looking for a solution that will work on the N8.

  2. #2
    Registered User
    Join Date
    Sep 2008
    Location
    Manaus, Brazil
    Posts
    109

    Re: WRT/Ovi Maps integration on N8

    I know that Ovi Maps still not working in WRT, I don't know if Ovi will work iin N8 device
    Javier Zambrano Ferreira

  3. #3
    Regular Contributor
    Join Date
    May 2009
    Location
    sydney
    Posts
    117

    Re: WRT/Ovi Maps integration on N8

    Quote Originally Posted by jzferreira View Post
    I know that Ovi Maps still not working in WRT, I don't know if Ovi will work iin N8 device
    really? how say? I remember there was a landmark xml file that you need to specifiy the location landmark for the map which means WRT can use that map.

  4. #4
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: WRT/Ovi Maps integration on N8

    Quote Originally Posted by wenz View Post
    really? how say? I remember there was a landmark xml file that you need to specifiy the location landmark for the map which means WRT can use that map.
    only way i have found until now to integrate OVIMap in widget is:

    1 ) add a Landmark with your data , lat/lng included (Service.Landmarks)
    2 ) get the id of the added landmark
    3 ) export the landmark from database to xml
    4 ) use LaunchDoc as chained where doc is the exported xml (Service.AppManager)

    all that steps will open the landmark view from which you can call Map by left menu at the Landmark location
    Last edited by lucarocchi; 2010-11-03 at 17:24.

  5. #5
    Registered User
    Join Date
    Jul 2006
    Posts
    9

    Re: WRT/Ovi Maps integration on N8

    Do you have some example code for the four steps? That would be very kind! I'm just starting with WRT/Widgets and need to open Ovi Maps with a certain location showing on the map.
    Thanks!

  6. #6
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: WRT/Ovi Maps integration on N8

    klemensz,
    here is some code snippets
    just an hint , be aware that using this technique , there are some drawbacks ...you will get a lot of exported xml files in some folder , that can't be deleted in js ... in fact you have to change the xml filename for each landmark , otherwise export from database will fails
    Moving to Qt let's you implement the same in a more clean and sane way

    var landmarkService = device.getServiceObject("Service.Landmarks", "IDataSource");

    function addLandmark(item) {
    var id=0;
    // Setup input params using dot syntax
    var landmarkfields = new Object();
    landmarkfields.Country = 'IT';
    //landmarkfields.AreaCode = item.city;
    landmarkfields.City = item.city;
    landmarkfields.District = '';
    landmarkfields.Street = item.address;
    landmarkfields.Telephone = 'tel:'+item.mobile;

    var landmarkposition = new Object();
    landmarkposition.Latitude =parseFloat(item.latitude);
    landmarkposition.Longitude =parseFloat(item.longitude);
    landmarkposition.Altitude =1500;

    var criteria = new Object();
    criteria.Type = 'Landmark';
    var landmark= lmService1.IDataSource.New( criteria );
    //landmark.DatabaseURI = 'file://c:/mylandmarks.ldb';
    landmark.LandmarkName = item.title;
    landmark.LandmarkDesc = item.description;
    landmark.LandmarkFields = landmarkfields;
    landmark.LandmarkPosition = landmarkposition;
    landmark.CoverageRadius=5000;

    try {
    var criteria1 = new Object();
    criteria1.Type = 'Landmark';
    criteria1.Data = landmark;
    var result = landmarkService.IDataSource.Add(criteria1);
    if (result.ErrorCode==0){
    id=result.ReturnValue;
    }else{
    alert("addLandmark " +result.ErrorCode+" "+result.ErrorMessage);
    }
    }catch(e) {
    alert ("addLandmark: " + e);
    }
    return id;
    }
    function exportLandmarks(id,dst){
    // Setup input params using dot syntax
    var data = new Object();
    data.DestinationFile = dst;
    data.MimeType = 'application/vnd.nokia.landmarkcollection+xml';
    data.IdList = [ id ];
    var criteria = new Object();
    criteria.Type = 'Landmark';
    criteria.Data = data;
    try{
    var result = landmarkService.IDataSource.Export(criteria);
    if (result.ErrorCode==0 || result.ErrorCode==1010){
    }else{
    alert("exportLandmarks " +result.ErrorCode+" "+result.ErrorMessage);
    }
    //checkError("IDataSource::exportLandmarks",resultList,DIV_ID,imgId);
    }catch(e){
    alert ("exportLandmarks: " + e);
    }
    }

    var appManager= device.getServiceObject("Service.AppManager", "IAppManager");
    var mime="application/vnd.nokia.landmarkcollection+xml";
    var doc="c:\\landmarks-export.xml";
    launchDoc(doc,mime);

    function launchDoc(doc,mime){
    var criteria=new Object();
    criteria.Document=new Object();
    criteria.Document.DocumentPath= doc;
    criteria.MIMEType= mime;
    criteria.Options= new Object();
    criteria.Options.Mode="Chained";
    result = appManager.IAppManager.LaunchDoc(criteria, launchDocCallback);
    }
    Last edited by lucarocchi; 2010-11-04 at 17:41.

  7. #7
    Registered User
    Join Date
    Aug 2010
    Posts
    1

    Re: WRT/Ovi Maps integration on N8

    *************
    Last edited by leverage; 2010-08-23 at 10:15.

  8. #8
    Registered User
    Join Date
    Sep 2010
    Posts
    7

    Exclamation Re: WRT/Ovi Maps integration on N8

    How about using google maps on n8? Does it work?

  9. #9
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,559

    Re: WRT/Ovi Maps integration on N8

    Quote Originally Posted by pokoot View Post
    How about using google maps on n8? Does it work?
    Sure. You can install Googles Maps app by pointing the device's browser to http://m.google.com

  10. #10
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: WRT/Ovi Maps integration on N8

    pokoot,
    code this img tag in your widget and you got a Google Static Map

    <img border="0" alt="Points of Interest in Lower Manhattan" src="http://maps.google.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&amp;zoom=14&amp;size=512x512&amp;maptype=roadmap&amp;markers=color:blue|label:S|40.702147,-74.015794&amp;markers=color:green|label:G|40.711614,-74.012318&amp;markers=color:red|label:C|40.718217,-73.998284&amp;sensor=false">
    see http://code.google.com/intl/it/apis/...on/staticmaps/ for details

Similar Threads

  1. New ovi store client. at least for N8
    By xlazom00 in forum [Closed] Publishing to Nokia Store
    Replies: 7
    Last Post: 2010-12-06, 20:24
  2. OVI maps in WRT Widget
    By jrambo in forum Symbian
    Replies: 6
    Last Post: 2010-10-01, 15:58
  3. Nokia N8 - Ovi Store - Compatibility
    By Koinup in forum [Closed] Publishing to Nokia Store
    Replies: 4
    Last Post: 2010-05-06, 04:07

Posting Permissions

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