腾讯地图api接收坐标提交坐标
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>账户管理</title>
<link href='<!--{$resource_path}-->resource/member/css/style.css' rel="stylesheet" type="text/css" />
<script src="<!--{$resource_path}-->resource/member/js/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="http://developer.amap.com/Public/css/demo.Default.css" /> <script type="text/javascript">
$(document).ready(function () {
$(".ctmenu").click(function () {
$(".l_con").toggleClass("l_con1");
$(".r_con").toggleClass("r_con1");
$(this).toggleClass("ctmenu1");
});
});
</script>
<script>
$(function(){
function tabs(tabTit,on,tabCon){
$(tabTit).children().hover(function(){
$(this).addClass(on).siblings().removeClass(on);
var index = $(tabTit).children().index(this);
$(tabCon).children().eq(index).show().siblings().hide();
});
};
tabs(".tab-hd","active",".tab-bd");
});
</script>
</head>
<body onload="initialize()">
<div class="content">
<div class="l_con">
<a class="ctmenu"></a>
<div class="nav_tit">机构详情</div>
<div class="nav_link"><a href="list" target="r_frame" class="sel">机构信息</a></div>
</div>
<div class="r_con">
<div class="r_tit"><h5>机构信息</h5></div>
<div class="di_p">请完善以下信息,方便我们更好的为您服务。</div>
<div class="r_box">
<form action="/adm/department/saveedit" method="post" id="submitform" name="form1">
<table class="user_tab">
<tr>
<th>机构全称:</th>
<td><input type="text" value="<!--{$departmentInfo.name}-->" class="user_input" name ="name"> <span>*</span></td>
</tr>
<tr>
<th>机构简称:</th>
<td><input type="text" value="<!--{$departmentInfo.shortname}-->" class="user_input" name ="shortname"> <span>*</span></td>
</tr>
<tr>
<th height="58">组织机构代码:</th>
<td height="58"><input type="text" value="<!--{$departmentInfo.jigoucode}-->" class="user_input" name ="jigoucode"> <span>*</span>
<p>请正确填写9位组织机构代码证号。</p>
</td>
</tr>
<tr>
<th height="58">办公时间:</th>
<td height="58">
<input type="text" value="<!--{$departmentInfo.officehours}-->" class="user_input" name ="officehours"> <span>*</span><p>
示例:上午 8:30-11:30 下午 13:30-17:30</p>
</td>
</tr>
<tr>
<th>办公电话:</th>
<td><input type="text" value="<!--{$departmentInfo.officetel}-->" class="user_input" name ="officetel"></td>
</tr>
<tr>
<th>办公传真:</th>
<td><input type="text" value="<!--{$departmentInfo.officefax}-->" class="user_input" name ="officefax"> <span>*</span></td>
</tr>
<tr>
<th>电子邮箱:</th>
<td>
<input type="text" value=" <!--{$departmentInfo.email}-->" class="user_input" name ="email"> <span>*</span>
</td>
</tr>
<tr>
<th>邮政编码:</th>
<td><input type="text" value="<!--{$departmentInfo.postcode}-->" class="user_input" name ="postcode"> <span>*</span></td>
</tr>
<tr>
<th height="58">网站名称及网址:</th>
<td height="58"><input type="text" value="<!--{$departmentInfo.site}-->" class="user_input" name ="site"> - <input type="text" value="<!--{$departmentInfo.url}-->" class="user_input" name ="url">
<p>示例:中国滨州-http://www.binzhou.gov.cn,如果单位没有网站请填写”无“</p>
</td>
</tr>
<tr>
<th>办公地点:</th>
<td><input type="text" value="<!--{$departmentInfo.address}-->" class="user_input" name ="address">
</td>
</tr>
<tr>
<th>交通指引:</th>
<td>
<textarea class="textarea" cols="48" rows="5" name ="traffic"><!--{$departmentInfo.traffic}--></textarea><p>示例:滨州市人民政府</p><p>黄河五路与渤海十五路交叉路北100米西侧;101路、102路公交车市政大楼站</p>
</td>
</tr>
<tr>
<th>地图标记:</th>
<td colspan="3">
<input type="hidden" name="map_marker" value="<!--{$departmentInfo.maplabes}-->" class="tstyle" />
<input type="hidden" name="map_marker_ls" value="" class="tstyle" />
<div class="mapview" id="container" style="width:60%; height:300px;"></div>
<!--<p id="info" style="margin-top:10px;"></p>-->
<div class="mapsave">
<input type="button" name="set_marker" id="set_marker" value="设置标记" /><br/>
<input type="button" name="set_marker" id="save_marker" value="设置完成" />
</div>
<div class="clear"></div>
<span class="intro">说明:1.点击设置标记按钮,操作地图(拖动、缩放)找到对应单位地址单击。
<br/> 2.点击设置完成按钮。</span>
</td>
</tr>
<tr>
<th></th>
<td>
<input type="hidden" name="id" value="<!--{$departmentInfo.id}-->" />
<input class="submit" type="submit" name="Submit" value="保存"></td>
</tr>
</table>
</form>
<div id="iCenter" style="width: 540px; height: 300px;">
</div>
</div>
</div>
</div>
<script type="text/javascript" src="http://map.qq.com/api/js?v=1"></script>
<script type="text/javascript">
$(function() {
var sub = $("input#fabu_submit");//提示显示在该对象后面
var timer = 1500;//提示显示时间
var map_marker = $("input[name=map_marker]");
var map_marker_ls = $("input[name=map_marker_ls]");
var map_marker_val = map_marker.val();
var Lng = "<!--{$departmentInfo.y}-->";
var Lat = "<!--{$departmentInfo.x}-->";
var str = ''; //地图部分
if(map_marker_val != '' && map_marker_val.toString().search(",") > 0){
var map_val = map_marker.val();
var map_val2 = map_val.split(",");
Lng = map_val2[1];
Lat = map_val2[0];
}
var center = new soso.maps.LatLng(Lng,Lat);
var map = new soso.maps.Map(document.getElementById('container'),{
center: center,
zoomLevel: 16,
scrollWheel: false,
draggable: false
});
var marker = new soso.maps.Marker({
position: center,
draggable: false,
map: map
}); //鼠标点击地图时事件
soso.maps.Event.addListener(map, "click", function(e) {
var gl=e.latLng;
if(map.getDraggable()){
marker.setPosition(gl);
var ll = gl.getLng() + ',' + gl.getLat();
map_marker_ls.val(ll);
}
//gl.getLat() + ',' + gl.getLng();
//var ll = marker.getPosition().getLng() + ',' + marker.getPosition().getLat();
//map_marker_ls.val(ll);
}); //创建一个导航控件
var navControl = new soso.maps.NavigationControl({
//导航控件的位置
align: soso.maps.ALIGN.TOP_RIGHT,
//偏移
margin: new soso.maps.Size(5, 15),
//作用对象
map: map
});
$("input#set_marker").bind('click', function(){
$(this).css('background-color','#CCC');
$("input#save_marker").css('background-color','#FFF');
map.setScrollWheel(true);
map.setDraggable(true);
});
$("input#save_marker").bind('click', function(){
$(this).css('background-color','#CCC');
$("input#set_marker").css('background-color','#FFF');
var map_ls_v = map_marker_ls.val();
map_marker.val(map_ls_v);
map.setScrollWheel(false);
map.setDraggable(false);
marker.setDraggable(false);
}); var ws = $("#jgmessage input[name=web_site]");
//判断网址是否为空,为空自动加http://
(trim(ws.val()) == '') ? ws.val('http://') : ""; //页面信息验证部分
sub.bind('click', function() {
var agency_name = trim($("#jgmessage input[name=agency_name]").val());
var agency_short_name = trim($("#jgmessage input[name=agency_short_name]").val());
var agency_code = trim($("#jgmessage input[name=agency_code]").val());
var office_time = trim($("#jgmessage input[name=office_time]").val());
var office_phone = trim($("#jgmessage input[name=office_phone]").val());
var email_address = trim($("#jgmessage input[name=email_address]").val());
var post_code = trim($("#jgmessage input[name=post_code]").val());
var web_name = trim($("#jgmessage input[name=web_name]").val());
var web_site = trim($("#jgmessage input[name=web_site]").val());
var office_address = trim($("#jgmessage input[name=office_address]").val()); var err = '';
var reg = new RegExp("^[0-9a-zA-Z]{9}$");//字母数字验证 if(agency_name == ''){
err += '机构全称不能为空\n\n';
} if(agency_short_name == ''){
err += '机构简称不能为空\n\n';
} if(agency_code == ''){
err += '组织机构代码不能为空\n\n';
} else if(agency_code.length != 9 || reg.test(agency_code) == false) {
err += '组织机构代码格式输入有误\n\n';
} if(office_time == ''){
err += '办公时间不能为空\n\n';
} if(office_phone == ''){
err += '办公电话不能为空\n\n';
} if(email_address == ''){
err += '电子邮箱不能为空\n\n';
} if(post_code == ''){
err += '邮政编码不能为空\n\n';
} if(web_name == ''){
err += '网站名称不能为空\n\n';
} if(web_site == '' || web_site == 'http://'){
err += '网址不能为空\n\n';
} if(office_address == ''){
err += '办公地点不能为空\n\n';
} if (err != '') {
alert(err);
return false;
}
});
}); </script>
</body>
</html>
腾讯地图api接收坐标提交坐标的更多相关文章
- 利用百度地图API,获取经纬度坐标
利用百度地图API,获取经纬度坐标 代码很简单,但在网上没找到现成的获取地图经纬度的页面. 就是想,给当前页面传递一个经纬度,自动定位到此经纬度.然后可以重新选择,选择完返回经纬度. 效果如下: 源代 ...
- PHP+百度地图API+JAVASCRIPT实现GPS坐标与百度坐标转换的实例
原文:PHP+百度地图API+JAVASCRIPT实现GPS坐标与百度坐标转换的实例 <!--小幅的坐标转换点位程序--> <!DOCTYPE html> <html&g ...
- 微信小程序wx.getLocation()获取经纬度及JavaScript SDK调用腾讯地图API获取某一类地址
简介 腾讯位置服务为微信小程序提供了基础的标点能力.线和圆的绘制接口等地图组件和位置展示.地图选点等地图API位置服务能力支持,使得开发者可以自由地实现自己的微信小程序产品. 在此基础上,腾讯位置服务 ...
- 腾讯地图 API 调用入门
本文仅为腾讯地图 API 调用入门,如需进阶学习,请在腾讯位置服务网站上进行学习. 登陆网址 https://lbs.qq.com/ 点击右上角的登陆按钮,需要进行注册按照流程进行就好. 完成之后,选 ...
- 批量调用百度地图API获取地址经纬度坐标
1 申请密匙 注册百度地图API:http://lbsyun.baidu.com/index.php?title=webapi 点击左侧 “获取密匙” ,经过填写个人信息.邮箱注册等,成功之后在开放平 ...
- 谷歌地图 API 开发之获取坐标以及街道详情
自己的项目中有获取当前点击的坐标经纬度或者获取当前街道的信息的需求.估计这个对于新手来说,还是比较麻烦的,因为从官网上找这个也并不是很好找,要找好久的,运气好的可能会一下子找到. 献上自己写的测试案例 ...
- JAVA使用经纬度通过腾讯地图API获取详细地址
官方文档:https://lbs.qq.com/service/webService/webServiceGuide/webServiceGcoder package com.weixin.map; ...
- 腾讯地图api将物理地址转化成坐标
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- 百度地图api开发:根据坐标获得地理描述地址
// 创建地理编码实例 var myGeo = new BMap.Geocoder(); // 根据坐标得到地址描述 myGe ...
随机推荐
- Bash shell 简单的并行任务,并等待
首先启动两个command line对于实验 第一 command line 依次输入: bash$ sleep 10001 & [1] 38272 bash$ job1=$! bash$ s ...
- 什么是MEAN全堆栈javascript开发框架
什么是MEAN全堆栈javascript开发框架 使用JavaScript能够完整迅速做出Web应用程序,目前一套工具包括MongoDB.ExpressJS,AngularJS和Node.js越来越受 ...
- 打印Ibatis最后,SQL声明
做项目时,满足这一需求.我们希望最终打印出在数据库运行SQL声明,这些都普遍遇到了一些一般性问题.我会去Appfuse,结果这次没有成功.它是有相关的配置,可是好像没实用.我也就没有深查下去.我想这种 ...
- SQL点滴23—T-SQL中的除法
原文:SQL点滴23-T-SQL中的除法 在T-SQL中没有除法运算,但是在T-SQL中可以实现类似除法的操作Divide.一般除法操作的结果一个列来自于被除关系表,剩下的来自除关系表.这里举一个例子 ...
- OCP-1Z0-051-题目解析-第13题
13. View the Exhibit and examine the structure of the PRODUCTS table. You need to generate a report ...
- 【本·伍德Lua专栏】补充的基础06:简单的错误处理
昨天遇到另外一位独立游戏开发人员,所以多聊了一会,然后-然后就没有看书了.(小若:借口!借口! ) 今天来聊聊错误处理吧.只是毕竟这仅仅是前面的章节.书上的内容似乎有点一笔带过的味道. 没关系,简单更 ...
- solr的配置文件及其含义
solr与.net系列课程(二)solr的配置文件及其含义 solr与.net系列课程(二)solr的配置文件及其含义 本节内容还是不会涉及到.net与数据库的内容,但是不要着急,这都是学时s ...
- vs 中一些快捷键
本文用于记录一些vs中快捷键,以便提高编程效率. 首先小坦克的博客介绍的十几个快捷键挺不错的,还有动画演示.可以跳过去看看. 自己也记录一些自己想用的吧: 1. ctr + W + E 出现error ...
- Coffee
Coffee 从接触Spring 到现在已经差不多2年多了,期间用它做过几个项目,从个人使用角度来说,Spring无疑是非常的成熟和方便的,但是知道怎么用,却不知道原理是码农和攻城师的区别,现在准备自 ...
- JavaScript实例技巧精选(9)—计算器实例1
>>点击这里下载完整html源码<< 这是截图: 利用Javascript和html实现的一个计算器实例,核心代码如下: <script language="J ...