关键词搜索

源码搜索 ×
×

Windows Smartphone 嵌入map html 页面

发布2014-06-23浏览1323次

详情内容

前言:开发架构          BS       &      CS ;实现地图导航功能。

BS:Spring+hibernate、Java、JDK1.7      (设想环境)

CS:webservice、C#、.Net framwork 3.5&Windows mobile 6.0 SDK

1、创建“智能设备项目”。


2、使用“webBrowser”空间创建框架内置浏览器。

引入COM下面 windows web程序支持包,在窗体源码中编写如下代码:

  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. namespace MapSmart
  10. {
  11. [System.Runtime.InteropServices.ComVisibleAttribute(true)]
  12. public partial class FrmMap : Form
  13. {
  14. public FrmMap()
  15. {
  16. InitializeComponent();
  17. }
  18. private void FrmMap_Load(object sender, EventArgs e)
  19. {
  20. // JSP中 调用window方法
  21. // οnclick="window.external.functionname()";
  22. //为HTML文件传递JS参数
  23. //object oSum = wb.Document.InvokeScript("sayHello", new object[] { 1, 2 });
  24. string url = "http://map.baidu.com/";
  25. Uri uri = new Uri(url);
  26. this.wb.Navigate(uri, "");
  27. }
  28. }
  29. }
引入webbrowser所需要的库:


3、启动调试查看结果(引入html地址后)效果图。

4、参数传递

1、REST风格URL传递参数。

2、脚本方法调用参数传递:如2中代码注释处。


相关技术文章

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载