Google地图自动查找经纬度 [英] Google maps automatic latitude and longitude finder
本文介绍了Google地图自动查找经纬度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已合作生成地图,需要手动输入纬度和经度.有没有一种方法可以在用户输入的区域上动态生成Google地图.
在此先感谢
我使用的代码是
I''ve co for generating a map where i need to enter the latitude and longitude manually. Is there a way to generate the google map dynamically on the area entered by the user.
Thanks in advance
The code i''ve used is
<div id="mapsearch">
<span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>
</div>
<!-- Maps Api, Ajax Search Api and Stylesheet
// Note: If you are already using the Maps API then do not include it again
// If you are already using the AJAX Search API, then do not include it
// or its stylesheet again
//
// The Key Embedded in the following script tags is designed to work with
// the following site:
// http://www.abhilashaengineering.com
-->
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjfewZCwoKLTq3HmI_i3FYBQIrbY-MYJHVPV3NhA9XUpGkb0yzhRskeXa2xR_0Y55q4MAqbDm5loJxw">
type="text/javascript"></script>
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-msw&key=ABQIAAAAjfewZCwoKLTq3HmI_i3FYBQIrbY-MYJHVPV3NhA9XUpGkb0yzhRskeXa2xR_0Y55q4MAqbDm5loJxw">
type="text/javascript"></script>
<style type="text/css">
@import url("http://www.google.com/uds/css/gsearch.css");
</style>
<!-- Map Search Control and Stylesheet -->
<script type="text/javascript">
window._uds_msw_donotrepair = true;
</script>
<script src="http://www.google.com/uds/solutions/mapsearch/gsmapsearch.js?mode=new">
type="text/javascript"></script>
<style type="text/css">
@import url("http://www.google.com/uds/solutions/mapsearch/gsmapsearch.css");
</style>
<style type="text/css">
.gsmsc-mapDiv {
height : 300px;
}
.gsmsc-idleMapDiv {
height : 300px;
}
#mapsearch {
width : 550px;
margin: 10px;
padding: 4px;
}
</style>
<script type="text/javascript">
function LoadMapSearchControl() {
var options = {
zoomControl : GSmapSearchControl.ZOOM_CONTROL_ENABLE_ALL,
title : "Googleplex",
url : "http://www.google.com/corporate/index.html",
idleMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM,
activeMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM
}
new GSmapSearchControl(
document.getElementById("mapsearch"),
"1600 Amphitheatre Parkway, Mountain View, CA",
options
);
}
// arrange for this function to be called during body.onload
// event processing
GSearch.setOnLoadCallback(LoadMapSearchControl);
</script>
<!-- ++End Map Search Control Wizard Generated Code++ -->
有人向我建议了此代码.问题是手动输入纬度和经度
some one suggested me this code. the problem is manually latitude and longitude is to be entered
推荐答案
Plz通过此链接
https://developers.google.com/maps/documentation/javascript/places
https://developers.google.com/places/documentation/
Plz go through this link
https://developers.google.com/maps/documentation/javascript/places
https://developers.google.com/places/documentation/
这篇关于Google地图自动查找经纬度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文