Iphone 如何在谷歌地图上显示位置列表

Iphone 如何在谷歌地图上显示位置列表,iphone,ios,ipad,Iphone,Ios,Ipad,我正在创建一个iPhone应用程序,其中我需要从gps获取经纬度。现在我正在调用更新位置代理方法,并将新位置添加到阵列中,然后我需要在goggle地图上显示所有经纬度(位置)以及所有位置之间的路线 请帮我指示路线。 提前感谢以下是使用GoogleMaps javascript api可以实现的方法 <style> #map_canvas { height: 190px; width: 300px; margin-top: 0.6em; } </s

我正在创建一个iPhone应用程序,其中我需要从gps获取经纬度。现在我正在调用更新位置代理方法,并将新位置添加到阵列中,然后我需要在goggle地图上显示所有经纬度(位置)以及所有位置之间的路线

请帮我指示路线。
提前感谢

以下是使用GoogleMaps javascript api可以实现的方法

<style>
  #map_canvas {
    height: 190px;
    width: 300px;
    margin-top: 0.6em;
  }
</style>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
<div id="map_canvas" ></div>

<script language="javascript" type="text/javascript">  
var latitude = 44.056389;
var longitude = -121.308056;

function initialize() {
        var mapOptions = { 
          center: new google.maps.LatLng(latitude,longitude),
          zoom: 9,
          streetViewControl: false,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById('map_canvas'),
          mapOptions);

        // Create a draggable marker which will later on be binded to a
        // Circle overlay.
        var marker = new google.maps.Marker({
          map: map,
          position: new google.maps.LatLng(latitude,longitude),
          draggable: true
        });

        // Add a Circle overlay to the map.
        var circle = new google.maps.Circle({
            strokeColor: "#0000FF",
            strokeOpacity: 0.4,
            strokeWeight: 2,
            fillColor: "#0000FF",
            fillOpacity: 0.20,
            map: map,
            radius: 16000 // meters
        });

        circle.bindTo('center', marker, 'position');

        google.maps.event.addListener(marker, 'dragend', function() {
            var location = marker.getPosition();
            latitude = location.lat();
            longitude = location.lng();
        });

        google.maps.event.addListener(autocomplete, 'place_changed', function() {
          var place = autocomplete.getPlace();
          var location = place.geometry.location;
          map.setCenter(location);
          map.setZoom(9);  // Why 9? Because it looks good.
          marker.setPosition(location);
          latitude = location.lat();
          longitude = location.lng();
        });

      }
</script>

#地图画布{
高度:190px;
宽度:300px;
边缘顶部:0.6em;
}
var纬度=44.056389;
var经度=-121.308056;
函数初始化(){
var mapOptions={
中心:新google.maps.LatLng(纬度、经度),
缩放:9,
街景控制:错误,
mapTypeId:google.maps.mapTypeId.ROADMAP
};
var map=new google.maps.map(document.getElementById('map_canvas'),
地图选项);
//创建一个可拖动的标记,该标记稍后将绑定到
//圆圈覆盖。
var marker=new google.maps.marker({
地图:地图,
位置:新google.maps.LatLng(纬度、经度),
德拉格布尔:是的
});
//将圆覆盖添加到地图。
var circle=new google.maps.circle({
strokeColor:#0000FF“,
笔划不透明度:0.4,
冲程重量:2,
fillColor:#0000FF“,
不透明度:0.20,
地图:地图,
半径:16000//m
});
圆圈.bindTo('中心',标记,'位置');
google.maps.event.addListener(标记'dragend',function(){
var location=marker.getPosition();
纬度=位置。纬度();
经度=location.lng();
});
google.maps.event.addListener(自动完成,'place\u changed',函数(){
var place=autocomplete.getPlace();
变量位置=place.geometry.location;
地图设置中心(位置);
map.setZoom(9);//为什么是9?因为它看起来不错。
标记器。设置位置(位置);
纬度=位置。纬度();
经度=location.lng();
});
}

谢谢您的关注,但我需要将此应用于ios,您能告诉我iPhone Opps的情况吗,我想它只是在应用程序中使用了一个网页,比如这里的Google documents:它看起来像是显示一个源位置到目的地,我可以用Google direction api来做这件事,我想显示一个路径点,就像我需要通过某个路径点显示从一个位置到目的地……可能想用一个谷歌地图标签。可能有助于从那一方找到某人。您是否考虑过使用,这在中讨论过?