相关疑难解决方法(0)

使用Google Maps API使用地址而不是经度和纬度

我听说可以提交一个地址而不是经度和纬度,这对我的系统来说更加可行.用户在创建他们的个人资料时必须输入他们的地址,然后他们的个人资料将显示他们家的谷歌地图.我目前的Google Maps API与经度和纬度完美配合:

<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: …
Run Code Online (Sandbox Code Playgroud)

javascript google-maps latitude-longitude google-maps-api-3 street-address

52
推荐指数
1
解决办法
13万
查看次数