腾讯地图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 ...
随机推荐
- android 如何加入第一3正方形lib图书馆kernel于
注意:只能lib图书馆kernel编译到位.例如下列: alps/kernel/ alps/mediatek/custom/common/kernel/ alps/mediatek/custom/$p ...
- C# 之 托付
托付(delegate) 托付是一种能够把引用存储为函数的类型.托付也能够看成是一种数据类型,能够用于定义变量,但它是一种特殊的数据类型,它所定义的变量能接受的数值仅仅能是一个函数,更确切的说 ...
- 第3章2节《MonkeyRunner源码剖析》脚本编写示例: MonkeyDevice API使用示例(原创)
天地会珠海分舵注:本来这一系列是准备出一本书的,详情请见早前博文“寻求合作伙伴编写<深入理解 MonkeyRunner>书籍“.但因为诸多原因,没有如愿.所以这里把草稿分享出来,所以错误在 ...
- 超酷的jQuery百叶窗图片滑块实现教程
原文:超酷的jQuery百叶窗图片滑块实现教程 今天我们要来分享一款基于jQuery的百叶窗焦点图插件,也可以说是图片滑块插件.这种jQuery焦点图插件的应用非常广泛,在早些年前,我们需要用flas ...
- Appium0.18.x迁移到Appium1.x须知事项
英文原版:https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/migrating-to-1-0.md Migr ...
- MVC5 EF6 Bootstrap3 HtmlHelper
MVC5 + EF6 + Bootstrap3 (9) HtmlHelper用法大全(下) 上一节:MVC5 + EF6 + Bootstrap3 (8) HtmlHelper用法大全(上) 源码下载 ...
- SQL点滴4—筛选数据列的类型,字段大小,是否可为空,是否是主键,约束等等信息
原文:SQL点滴4-筛选数据列的类型,字段大小,是否可为空,是否是主键,约束等等信息 项目需要将Access数据库中的数据导入到SQL Server中,需要检验导入后的数据完整性,数据值是否正确.我们 ...
- PDF解决方案(3)--PDF转SWF
相关专题链接 PDF解决方案(1)--文件上传 PDF解决方案(2)--文件转PDF PDF解决方案(3)--PDF转SWF PDF解决方案(4)--在线浏览 前言:上一篇中介绍了上传的文件转PDF, ...
- [译]ava 设计模式之职责链
(文章翻译自Java Design Pattern: Chain of Responsibility) 职责链模式的主要设计思想是为了构建一连串的处理单元,如果阈值满足的话那么这个单元就来处理这个请求 ...
- leetcode第39题--Combination Sum II
题目: Given a collection of candidate numbers (C) and a target number (T), find all unique combination ...