Discussion Board

Page 1 of 4 1234 LastLast
Results 1 to 15 of 49
  1. #1
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    S60平台对LBS(Location Based Services)开发的支持是诺基亚的平台战略,也是诺基亚LBS位置服务的基础。LBS的开发将成为2008年的开发热点,希望通过这个专题置顶帖,能够让广大的中国开发伙伴相互分享,相互学习,从而开发出精彩的LBS应用和服务。

    前一段时间我录制了一个对S60 LBS开发的Flash资料,该资料简要介绍了S60对LBS开发的支持状况以及相关的支持框架,其中着重介绍了Location, Landmark和Map & Navigation三个开发框架之间的关系和使用目的。大家如有兴趣,可以下载看看,http://www.forum.nokia.com/info/sw.n...zh_CH.zip.html。在线观看:http://www.crossmo.com/olekercenteru...82con2944.html

    Gening
    Last edited by green_lu; 2008-03-12 at 06:54.

  2. #2
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    Map & Navigation API介绍

    M&N API是S60平台真正的LBS服务框架,包括Geocoding API,Map and Navigation AIW(Application Interworking)API,Map and Navigation Provider Discovery API,Map and Navigation API。通过这个API,开发者的应用(称为Client Application)可以使用S60手机上地图应用(称为Provider Application),如Nokia Map,所提供的地图和导航特性,从而很容易地为开发者的应用加入LBS功能。此API从S60 3rd Edition,FP1引入,计划为S60 3rd Edition,FP2 SDK的一部分,但由于一些知识版权的限制,M&N API将最终作为Plugin API单独发布,目前M&N Plugin API尚未正式发布,期待中...

    注意:由于S60 3rd Edition手机自身不支持M&N框架,M&N应用需要手机安装一个SIS文件补丁(LocationMnfw_30.SISX);从S60 3rd Edition,FP1开始,M&N框架得到全面的支持;从S60 3rd Edition,FP2 SDK开始,AIW开发得到支持,但S60 3rd Edition,FP1 SDK也可以通过AWI Plugin API(http://www.forum.nokia.com/info/sw.n...g-In_Pack.html)获得AIW的开发支持。

    API说明:
    Map and Navigation AIW API:This API defines menus and services, which this subsystems exposes for client's use via AIW FW (supported from S60 3.1 onwards).

    Map and Navigation API:Showing map, showing landmarks on map, selecting a location from map, engaging navigation.
    Geocoding API: This API provides interfaces for geocoding and reverse geocoding features.

    Map and Navigation Provider Discovery API:For querying the availability of a Map provider and services supported by the provider.

    Gening
    Last edited by liuxg; 2008-02-02 at 08:20.

  3. #3
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    LBS开发的资源链接:
    诺基亚论坛LBS技术专区:
    http://www.forum.nokia.com/main/reso..._services.html

    诺基亚论坛LBS英文讨论区:
    http://discussion.forum.nokia.com/fo...play.php?f=159

    诺基亚论坛LBS Wiki社区:
    http://wiki.forum.nokia.com/index.ph...Based_Services

  4. #4
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    Location Acquisition API介绍

    Location Acquisition API从S60 2.6开始被引入,通过此单一API的统一封装,S60应用可以利用各种定位技术,如蓝牙GPS模块定位、手机内置GPS模块定位、无线网络定位来获取手机的位置信息。

    Location Acquisition API基于Symbian OS的标准Client-Server机制,Client应用通过Location Server请求位置信息,请求支持同步和异步方法。我们可以指定Location Server使用何种定位技术,这通过指定不同的定位模块插件(PSY)来实现 。

    Location Acquisition API的基本用例包括两类:
    1.位置查询
    *获取手机当前位置
    *获取更多手机位置信息,如速度,卫星信息等
    *获取手机上一次的位置信息
    *取消位置查询请求
    *定时获取手机位置信息
    *获取位置信息的超时处理

    2.定位模块的操作
    *获取定位模块信息
    *指定定位模块
    *响应定位模块的相关事件通知

    对于S60 3.0开始的平台安全性,Location Acquisition API中RPositionServer和RPositioner类的一些APIs涉及了Location Capability(能力)。

    Gening

  5. #5
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    Location Acquisition API的使用总结

    1. Connect to Location Server: RPositionServer::Connect().

    2. Create a sub-session with Location Server to retrieve location updates: RPositioner::Open().

    3. Inform Location Server who is requesting the location information: RPositioner::SetRequestor().

    4. Set the update options (e.g. to obtain periodic updates): RPositioner::SetUpdateOptions().

    5. Request to be informed (asynchronously) of position updates: RPositioner::NotifyPositionUpdate(). As a standard, NotifyPositionUpdate() takes the parameters TPositionInfo and a TRequestStatus. After the request has been completed, the location information is stored in TPositionInfo and TRequestStatus contains the result of the request.

    6. Extract the current position: TPositionInfo::GetPosition().

    7. Re-issue the request to obtain the next position update: RPositioner::NotifyPositionUpdate().

    8. Cancel any outstanding request(s): RPositioner::CancelRequest() and PositionServer::CancelRequest().

    9. Close the sub-session: RPositioner::Close().

    10. Close the Location Server session: RPositionServer::Close().

    下面是一个简单的例子说明:
    Code:
    #include <lbs.h>
    ...
    // Init Connection
    RPositionServer server;
    RPositioner positioner;
    
    User::LeaveIfError(server.Connect());
    CleanupClosePushL(server);
    User::LeaveIfError(positioner.Open(server)); // use default positioning module
    CleanupClosePushL(positioner);
    
    // Specify Requestors
    _LIT(KCntPhone, "+358501234567");
    _LIT(KSrvName, "MyService");
    
    RRequestorStack stack;
    CRequestor* contact = CRequestor::NewLC(
             CRequestor::ERequestorContact,
             CRequestor::EFormatTelephone,
             KCntPhone);
    stack.Append(contact);
    
    CRequestor* service = CRequestor::NewLC(
             CRequestor::ERequestorService,
             CRequestor::EFormatApplication,
             KSrvName);
    stack.Append(service);
    
    User::LeaveIfError(positioner.SetRequestor(stack));
    
    //User::LeaveIfError(positioner.SetRequestor(CRequestor::ERequestorService ,
    //                                          CRequestor::EFormatApplication , 
    //                                          KSrvName));   //Alternative usage                      
    
    // Issue a Location Request
    TRequestStatus status;
    TPositionInfo posInfo;
    
    positioner.NotifyPositionUpdate(posInfo, status);
    User::WaitForRequest(status);
    User::LeaveIfError(status.Int());
    
    // Analyze Results
    TPosition position;
    posInfo.GetPosition(position);
    
    // Issue a new Location Request
    positioner.NotifyPositionUpdate(posInfo, status);
    User::WaitForRequest(status);
    User::LeaveIfError(status.Int());
    
    // Cleanup
    stack.Reset();
    CleanupStack::PopAndDestroy(service);
    CleanupStack::PopAndDestroy(contact);
    CleanupStack::PopAndDestroy(&positioner); // this will call Close() method
    CleanupStack::PopAndDestroy(&server); // this will call Close() method
    Last edited by green_lu; 2008-02-14 at 07:03.

  6. #6
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    检查S60手机自身所支持的定位方法:

    进入菜单,工具>>设置>>常规>>定位>>定位方法,检查相关选项:
    *蓝牙GPS(支持GPS蓝牙模块)
    *网络辅助GPS(支持A-GPS)
    *集成GPS(内置GPS模块)
    *基于网络(支持网络定位,需运营商支持)
    同时我们还可以指定手机上LBS应用使用的定位方法(或优先级)
    Gening
    IMPOSSIBLE IS NOTHING

  7. #7
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    Landmarks API介绍

    Landmarks API作为泛称,实际上共包括以下五个API(这些API从S60 3.0开始被引入):
    * Landmarks API
    * Landmarks Database Management API
    * Landmarks Search API
    * Landmarks UI Add/Edit API
    * Landmarks UI Selector API

    Landmark (地标),用于人性化的描述一个位置,一般它包括名称,描述信息,图标,地址信息等许多属性内容。我们也可以为地标进行分类(Landmark Category)以便更好地对地标进行管理。Landmark和Landmark Category被保存在服务器端或手机本地的地标数据库中。

    Landmarks API的基本用例包括:
    * 打开地标数据库
    * 管理地标
    * 管理地标分类
    * 为地标指定地标分类
    * 交换地标
    * 侦听地标数据库事件

    Landmarks Search API的基本用例包括:
    * 查找地标
    * 查找地标分类
    * 多地标数据库查询

    Landmarks Database Management API基本用例包括:
    * 获取地标数据库信息
    * 修改地标数据库的配置
    * 管理地标数据库
    * 侦听与地标数据库相关的事件

    此外为了便利开发者的开发,简化UI的实施,S60还提供了两个API:
    * Landmarks UI Selector API可以向用户展示一个对话框,列表展示相关地标数据库的全部地标和地标分类,用户可以从中选择一个或多个地标或地标分类。
    * Landmarks UI Add/Edit API可以对通过Landmarks UI Selector API选择的地标或地标分类进行编辑或直接添加。
    Gening
    IMPOSSIBLE IS NOTHING

  8. #8
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    欲善其事,先利其器,这里简单减少一下使用carbide.c++进行开发的方法:

    1、为项目建立索引(index)
    选中项目,鼠标右键->Index->Rebuild
    2、建立索引后,使用F3(Open Declaration)可以了解类,函数,变量等的定义
    3、建立索引后,使用F4(Open Type Hierarchy)可以了解类(接口)的继承关系
    4、建立索引后,使用Ctr+Alt+H(Open Call Hierarchy)可以了解函数之间的调用关系
    5、选中项目,鼠标右键->Run CodeScanner检查代码的完整性
    6、选中MMP文件,鼠标右键->Run Capabilty Scanner on Project MMP检查项目的Capability


    了解以上方法,基本上就可以充分利用carbide.c++工具了
    Last edited by green_lu; 2008-03-13 at 04:18.
    Gening
    IMPOSSIBLE IS NOTHING

  9. #9
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    这里提供一个关于Landmarks API和Location Acquisition API使用的最新例子,请大家参考。

    注意:
    对于S60 LBS开发,了解GPS定位时卫星的状态信息很重要,我们可以使用BLID Application Satellite Info API实时获得并显示一个有关卫星信息(卫星ID和GPS信号强度)的Dialog。BLID Application Satellite Info API从S60 3rd Edition开始引入,我的例子也说明了此API的使用。

    1.2.0的版本修改了1.10的Bug,请下载1.2.0版本
    Attached Files Attached Files
    Last edited by green_lu; 2008-05-08 at 09:09.
    Gening
    IMPOSSIBLE IS NOTHING

  10. #10
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    S60 3rd中我们可以使用CTelephony API (etel3rdparty.dll) 得到基站网络的cell id,详细说明可以参考:
    http://wiki.forum.nokia.com/index.ph...in_3rd_Edition
    http://wiki.forum.nokia.com/index.ph...-Synchronously
    Gening
    IMPOSSIBLE IS NOTHING

  11. #11
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    Quote Originally Posted by green_lu View Post
    Map & Navigation API介绍

    M&N API是S60平台真正的LBS服务框架,包括Geocoding API,Map and Navigation AIW(Application Interworking)API,Map and Navigation Provider Discovery API,Map and Navigation API。通过这个API,开发者的应用(称为Client Application)可以使用S60手机上地图应用(称为Provider Application),如Nokia Map,所提供的地图和导航特性,从而很容易地为开发者的应用加入LBS功能。此API从S60 3rd Edition,FP1引入,计划为S60 3rd Edition,FP2 SDK的一部分,但由于一些知识版权的限制,M&N API将最终作为Plugin API单独发布,目前M&N Plugin API尚未正式发布,期待中...

    注意:由于S60 3rd Edition手机自身不支持M&N框架,M&N应用需要手机安装一个SIS文件补丁(LocationMnfw_30.SISX);从S60 3rd Edition,FP1开始,M&N框架得到全面的支持;从S60 3rd Edition,FP2 SDK开始,AIW开发得到支持,但S60 3rd Edition,FP1 SDK也可以通过AWI Plugin API(http://www.forum.nokia.com/info/sw.n...g-In_Pack.html)获得AIW的开发支持。

    API说明:
    Map and Navigation AIW API:This API defines menus and services, which this subsystems exposes for client's use via AIW FW (supported from S60 3.1 onwards).

    Map and Navigation API:Showing map, showing landmarks on map, selecting a location from map, engaging navigation.
    Geocoding API: This API provides interfaces for geocoding and reverse geocoding features.

    Map and Navigation Provider Discovery API:For querying the availability of a Map provider and services supported by the provider.

    Gening
    这里是我在以前例子的基础上整理了一个有关M&N API的例子,供大家参考。需要大家注意的是,由于无法获取M&N Plugin API,大家可能无法对程序进行编译,不过大家可以研习代码,并将sis文件签名后安装到S60 3.1手机上(手机上需要安装Nokia Map应用,同时安装对应地图http://europe.nokia.com/A4509291)感受试用

    1.3.1的版本修改了1.3.0的Bug,请下载1.3.1版本
    Attached Files Attached Files
    Last edited by green_lu; 2008-05-13 at 06:43.
    Gening
    IMPOSSIBLE IS NOTHING

  12. #12
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    Map and Navigation AIW(Application Interworking)API介绍:

    这个API是一个AIW extension API,通过S60 Application Interworking Framework,此API可以为拥有定位信息的应用提供地图和导航特性。如何定义AIW Interest服务,请参考S60 SDK相关帮助。

    这个API自身并不提供地图和导航支持,它是客户端(client)应用和地图(provider)应用的连接接口。真正提供地图和导航特性的应用是地图(provider)应用(目前为Nokia Map),客户端(client)仅仅通过M&N AIW API发出服务请求。

    客户端(client)应用需要连接AIW FW libraries (servicehandler.lib)

    M&N AIW API的基本用例包括:
    *显示地图
    *从地图获取位置
    *导航
    *坐标和地址的相互解析
    Gening
    IMPOSSIBLE IS NOTHING

  13. #13
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    Quote Originally Posted by green_lu View Post
    Map and Navigation AIW(Application Interworking)API介绍:

    这个API是一个AIW extension API,通过S60 Application Interworking Framework,此API可以为拥有定位信息的应用提供地图和导航特性。如何定义AIW Interest服务,请参考S60 SDK相关帮助。

    这个API自身并不提供地图和导航支持,它是客户端(client)应用和地图(provider)应用的连接接口。真正提供地图和导航特性的应用是地图(provider)应用(目前为Nokia Map),客户端(client)仅仅通过M&N AIW API发出服务请求。

    客户端(client)应用需要连接AIW FW libraries (servicehandler.lib)

    M&N AIW API的基本用例包括:
    *显示地图
    *从地图获取位置
    *导航
    *坐标和地址的相互解析
    这里是我在以前例子的基础上整理了一个有关M&N AIW API的例子,供大家参考。需要大家注意的是,由于无法获取M&N Plugin API,大家可能无法对程序进行编译,不过大家可以研习代码,并将sis文件签名后安装到S60 3.1手机上(手机上需要安装Nokia Map应用,同时安装对应地图http://europe.nokia.com/A4509291)感受试用

    1.5.1的版本修改了1.5.0的Bug,请下载1.5.1版本
    Attached Files Attached Files
    Last edited by green_lu; 2008-05-13 at 06:42.
    Gening
    IMPOSSIBLE IS NOTHING

  14. #14
    Regular Contributor linstime's Avatar
    Join Date
    Nov 2007
    Posts
    288
    Quote Originally Posted by green_lu View Post
    这里是我在以前例子的基础上整理了一个有关M&N AIW API的例子,供大家参考。需要大家注意的是,由于无法获取M&N Plugin API,大家可能无法对程序进行编译,不过大家可以研习代码,并将sis文件签名后安装到S60 3.1手机上(手机上需要安装Nokia Map应用,同时安装对应地图http://europe.nokia.com/A4509291)感受试用

    1.5.1的版本修改了1.5.0的Bug,请下载1.5.1版本
    hi,
    1.目前那些型号的手机(或者symbian系统)支持你这个例子
    2.如果到nokia的网站查询手机,那些文字可以说明手机支持
    3.你说的“3rd Edition, Feature Pack 1引入”是什么意思?
    是不是Symbian OS 9.2系统已经支持这些功能,但是对于的sdk:FP1中没有支持?
    4.目前M&N Plugin API发布没有?
    5.如果没有发布估计什么时候?
    6.如果发布了请给个连接

  15. #15
    Nokia Developer Expert green_lu's Avatar
    Join Date
    Mar 2003
    Posts
    537
    诺基亚论坛S60位置服务(LBS)开发技术培训开始报名啦!名额有限,愿意参加者请尽早报名。
    http://forum.nokia.com.cn/codecamp/s60_lbs.html
    Gening
    IMPOSSIBLE IS NOTHING

Page 1 of 4 1234 LastLast

Similar Threads

  1. Replies: 158
    Last Post: 2012-05-23, 19:00
  2. UA Profile and Accept headers for S60 3rd Ed. FP 1 Browser
    By Nokia Ron in forum Mobile Web Site Development
    Replies: 5
    Last Post: 2009-10-07, 20:43
  3. HTTP headers for S60 3rd Ed. Browser
    By Nokia Ron in forum Mobile Web Site Development
    Replies: 16
    Last Post: 2009-09-22, 14:28
  4. Almost all tools (S60 MIDP SDK B0.1, Nokia S60 SDK Symbian OS v0.3) Crashes
    By alexandershalamov in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-07-03, 13:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved