使用Google Maps API使用地址而不是經(jīng)度和緯度我聽說(shuō)可以提交一個(gè)地址而不是經(jīng)度和緯度,這對(duì)我的系統(tǒng)來(lái)說(shuō)更加可行。用戶在創(chuàng)建他們的個(gè)人資料時(shí)必須輸入他們的地址,然后他們的個(gè)人資料將顯示他們家的谷歌地圖。我目前的Google Maps API與經(jīng)度和緯度完美配合:<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><link rel="stylesheet" type="text/css" href="css.css" />
<title>Login Page</title><meta name="viewport" content="initial-scale=1.0, user-scalable=no" /><style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map-canvas { height: 100% }</style><script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=MYKEY&sensor=false"></script><script type="text/javascript">
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(52.640143,1.28685),
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP };
var map = new google.maps.Map(document.getElementById("map"),
mapOptions);var marker = new google.maps.Marker({
position: new google.maps.LatLng(52.640143,1.28685),
map: map,
title: "Mark On Map"});
}
google.maps.event.addDomListener(window, 'load', initialize);</script></head>請(qǐng)有人幫我改變我的代碼,這樣它就可以讓Google Maps API在其位置請(qǐng)求地址,因?yàn)槲蚁胫苯訌膍ySQL數(shù)據(jù)庫(kù)中讀取用戶的地址。
使用Google Maps API使用地址而不是經(jīng)度和緯度
不負(fù)相思意
2019-08-27 16:14:37