调用后台获取手机客户端提交的经纬度进行定位
2012-09-13 09:20
483 查看
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>当前所在位置</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> <link rel="stylesheet" type="text/css" href="css/main.css"> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script charset="utf-8" src="http://api.map.soso.com/v1.0/main.js"></script> <script language="javascript"> function init() { var x,y; $.get("fastweb.do?m=querylastgps",function(data){ // $('#result').text(data);//直接展示JSON数据 var j = eval("("+data+")"); x=j.gps.x; y=j.gps.y; $('#address').text(j.gps.address); var center = new soso.maps.LatLng(x,y); var map = new soso.maps.Map( document.getElementById("container"), { center: center, zoomLevel: 14 } ); var marker = new soso.maps.Marker({ position: center, map: map }); var decor = new soso.maps.MarkerDecoration({ content: 'P', margin: new soso.maps.Size(0, -4), align: soso.maps.ALIGN.CENTER, marker: marker }); }); } </script> </head> <body onload="init()"> 当前所在位置:<div id="address" ></div> <div id="container" style="width:800px; height:600px"></div> <div id="centerInfo" ></div> <div id="zoomLevelInfo" ></div> </body> </html>
相关文章推荐
- 调用后台获取手机客户端提交的经纬度进行定位
- struts2 + ajax(由前台的form提交数据到后台,再根据form所调用返回获取的后台json格式的数据返回到前端,然后前端用jquery对json数据进行解析)==》》涉及文件上传的部分
- struts2 + ajax(由前台的form提交数据到后台,再根据form所调用返回获取的后台json格式的数据返回到前端,然后前端用jquery对json数据进行解析)==》》涉及非文件上传的部分
- Android获取手机基站信息并进行基站定位(基站定位原理)
- JS获取手机经纬度,实现城市定位的方法
- 手机无网状态下获取经纬度,离线定位的方法。
- django后台和app客户端的搭建指南(python,android)。模拟手机获取验证码的请求
- 通过 JS 实现与后台进行连接,提交表单,将获取到的数据pos给服务器。
- ios开发之 -- 调用系统定位获取当前经纬度与地理信息
- ios开发之 -- 调用系统定位获取当前经纬度与地理信息
- Android之使用HttpPost提交数据到服务器(Android手机客户端和后台服务器交互)
- ASP.NET后台手动调用POST提交并获取返回值 用于短信平台接口
- ASP.NET后台手动调用POST提交并获取返回值,用于短信平台接口//这是一个短信平台的后台提交功能
- Android获取手机基站信息并进行基站定位(基站定位原理)
- iOS - (利用/调用系统定位获取当前经纬度与地理信息)
- 手机定位:获取我的位置经纬度
- select语句的结果集直接发向客户端的(一个SQL语句会前后进行各种调用,包括解析(parse)调用、执行(executive)调用、获取(fetch)调用)
- Android开发之--android调用手机存在的地图进行定位
- iOS - (利用/调用系统定位获取当前经纬度与地理信息)
- android百度地图定位,点击给定经纬度的某点进行弹窗