map24根据经纬度查找地方
来源:互联网 发布:php eol 有什么用处 编辑:程序博客网 时间:2024/05/18 18:20
要使用www.map24.com的地图服务,首先必须注册并获取一个key,我的IP地址是192.168.1.6。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Map Object Location</title>
<script type="text/javascript" language="javascript" src="http://api.maptp.map24.com/ajax?appkey=FJXc5d99b6fa10073be9b1fd334c7d11X35">
</script>
<script type="text/javascript" language="javascript">
function goMap24(){
Map24.loadApi(["core_api", "wrapper_api"], map24ApiLoaded);
}
function map24ApiLoaded(){
Map24.MapApplication.init({
NodeName: "maparea"
});
}
function addLocation(){
//Create a new location.
myLoc = null;
myLoc = new Map24.Location({
Longitude: document.getElementById("longtitude").value,
Latitude: document.getElementById("latitude").value,
Description: "Bob's ToolTip:This is a plain tooltip for the location which is visible on the interactive map.",
LogoURL: "http://img.map24.com/map24/3DSignet/signet3d22x20.gif"
});
//Commit the location. Only after calling commit() it is possible
//to execute further operations on the location such as hide and show.
myLoc.commit();
centerOnLocation(myLoc);
//Enable all buttons below the map that enable further interactions.
document.getElementById('button_show').disabled = false;
document.getElementById('button_hide').disabled = false;
document.getElementById('button_remove').disabled = false;
document.getElementById('button_center').disabled = false;
}
//Show the location if it is currently hidden.
function showLocation(){
myLoc.show();
}
//Hide the location if it is currently shown.
function hideLocation(){
myLoc.hide();
}
//Remove the location.
function removeLocation(){
myLoc.remove();
//Disable all buttons below the map that enable further interactions.
/** document.getElementById('button_show').disabled = true;
document.getElementById('button_hide').disabled = true;
document.getElementById('button_remove').disabled = true;
document.getElementById('button_center').disabled = true;**/
}
function centerOnLocation(myLoc){
myLoc.center({
MinimumWidth: 3034
});
}
</script>
</head>
<body onload="goMap24();">
<p>
<div id="maparea" style="width:700px;height:500px;background-color:#E0E0E0;">
</div>
</p>
<p>
Longtitude: <input type="text" id="longtitude" name="longtitude" value="305.9064025878906"/>
Latitude:<input type="text" id="latitude" name="latitude" value="2797.95849609375" />
</p>
<input type="button" value="Add Location" onclick="addLocation();"/>
<input id="button_show" type="button" value="Show Location" onclick="showLocation();" disabled="disabled"/>
<input id="button_hide" type="button" value="Hide Loction" onclick="hideLocation();" disabled="disabled"/>
<input id="button_remove" type="button" value="Remove Location" onclick="removeLocation();" disabled="disabled"/>
<input id="button_center" type="button" value="Center" onclick="centerOnLocation();" disabled="disabled"/>
</body>
</html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Map Object Location</title>
<script type="text/javascript" language="javascript" src="http://api.maptp.map24.com/ajax?appkey=FJXc5d99b6fa10073be9b1fd334c7d11X35">
</script>
<script type="text/javascript" language="javascript">
function goMap24(){
Map24.loadApi(["core_api", "wrapper_api"], map24ApiLoaded);
}
function map24ApiLoaded(){
Map24.MapApplication.init({
NodeName: "maparea"
});
}
function addLocation(){
//Create a new location.
myLoc = null;
myLoc = new Map24.Location({
Longitude: document.getElementById("longtitude").value,
Latitude: document.getElementById("latitude").value,
Description: "Bob's ToolTip:This is a plain tooltip for the location which is visible on the interactive map.",
LogoURL: "http://img.map24.com/map24/3DSignet/signet3d22x20.gif"
});
//Commit the location. Only after calling commit() it is possible
//to execute further operations on the location such as hide and show.
myLoc.commit();
centerOnLocation(myLoc);
//Enable all buttons below the map that enable further interactions.
document.getElementById('button_show').disabled = false;
document.getElementById('button_hide').disabled = false;
document.getElementById('button_remove').disabled = false;
document.getElementById('button_center').disabled = false;
}
//Show the location if it is currently hidden.
function showLocation(){
myLoc.show();
}
//Hide the location if it is currently shown.
function hideLocation(){
myLoc.hide();
}
//Remove the location.
function removeLocation(){
myLoc.remove();
//Disable all buttons below the map that enable further interactions.
/** document.getElementById('button_show').disabled = true;
document.getElementById('button_hide').disabled = true;
document.getElementById('button_remove').disabled = true;
document.getElementById('button_center').disabled = true;**/
}
function centerOnLocation(myLoc){
myLoc.center({
MinimumWidth: 3034
});
}
</script>
</head>
<body onload="goMap24();">
<p>
<div id="maparea" style="width:700px;height:500px;background-color:#E0E0E0;">
</div>
</p>
<p>
Longtitude: <input type="text" id="longtitude" name="longtitude" value="305.9064025878906"/>
Latitude:<input type="text" id="latitude" name="latitude" value="2797.95849609375" />
</p>
<input type="button" value="Add Location" onclick="addLocation();"/>
<input id="button_show" type="button" value="Show Location" onclick="showLocation();" disabled="disabled"/>
<input id="button_hide" type="button" value="Hide Loction" onclick="hideLocation();" disabled="disabled"/>
<input id="button_remove" type="button" value="Remove Location" onclick="removeLocation();" disabled="disabled"/>
<input id="button_center" type="button" value="Center" onclick="centerOnLocation();" disabled="disabled"/>
</body>
</html>
- map24根据经纬度查找地方
- map24根据两个地方的经纬度来获取路径
- 根据地址和关键字查找详细地址经纬度
- mysql gis 空间数据库 根据 经纬度查找附近
- 根据经纬度(lat,lng)查找附近的地点(续)
- android安卓根据地名查找经纬度(百度地图)
- 根据百度地图JSAPI查找某个地址的经纬度坐标
- 根据经纬度查找附近的人计算公式
- 在数据库中根据经纬度查找数据中所有附近的经纬度点
- 在数据库中根据经纬度查找数据中所有附近的经纬度点
- 调用百度地图API确定地址的经纬度,根据地址的经纬度查找中文地址
- Android根据地址获取经纬度,根据经纬度
- 根据经纬度计算里程
- 根据经纬度查询地名,
- 根据地址获取经纬度
- 根据地理信息获取经纬度
- 根据经纬度查询距离
- 根据经纬度获得城市
- ITS 中常用术语
- 中国船友在线
- 用.net的正则表达式对文章进行拆句处理
- JDBC 概述
- 关于Applet利用数字签名获得本地访问权限的问题
- map24根据经纬度查找地方
- 我的论文被计算机工程与应用录用了
- 今天开设个人博客,作为我的学习笔记
- 简单的C#中的RSA的用法
- js中的所有鼠标事件
- Eclipse插件安装的三种方法
- sql server 2000 的数据类型
- Java对数据库操作中,PrepareStatement的Statement的区别
- map24根据两个地方的经纬度来获取路径