0
我怎樣才能更正所連接的圖像中的標記(Alphabates),因爲這標誌給出不正確的指針Alphabates名請參閱圖像,我怎樣才能糾正谷歌地圖上的標記
我有這個HTML:
<!DOCTYPE html><html><head><meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps Directions Waypoints</title> <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> </script> <script type="text/javascript"> var directionDisplay; var directionsService = new google.maps.DirectionsService(); var map; function initialize() { directionsDisplay = new google.maps.DirectionsRenderer({ }); var myOptions = { zoom: 10, mapTypeId: google.maps.MapTypeId.ROADMAP, } ; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); directionsDisplay.setMap(map); calcRoute(); } function calcRoute() { var waypts = [];
stop = new google.maps.LatLng(51.126232,0.265945) ;
waypts.push({location:stop, stopover:true});
stop = new google.maps.LatLng(51.593165,-0.028696) ;
waypts.push({location:stop, stopover:true});
stop = new google.maps.LatLng(51.488874,-0.287175) ;
waypts.push({location:stop, stopover:true});
stop = new google.maps.LatLng(51.440487,-0.155701) ;
waypts.push({location:stop, stopover:true});
start = new google.maps.LatLng(51.126232,0.265945);
end = new google.maps.LatLng(51.593165,-0.028696);
var request = { origin: start, destination: end,
waypoints: waypts, optimizeWaypoints: true,
travelMode: google.maps.DirectionsTravelMode.WALKING };
directionsService.route(request, function(response, status)
{ if (status == google.maps.DirectionsStatus.OK)
{ directionsDisplay.setDirections(response);
var route = response.routes[0]; } }); }
</script>
</head>
<body onLoad="initialize()"> <div id="map_canvas" style="width:70%;height:80%;"></div> </body></html>
你期望標記是哪裏?在起始位置有三個(起點,終點和第一個航點是相同的)。 – geocodezip