我的程序有问题。这是一个关于地理信息系统的程序,使用了LeatlefJs库,我还使用了letlef路由机功能。问题是系统无法显示它应该能够显示的路线,我不太明白。这是脚本。
function getDirectRoute(index, callbackFunction){
var dari = marker_awal.getLatLng().lat + "," + marker_awal.getLatLng().lng;
var tujuan = markerCabang[index].getLatLng().lat + "," + markerCabang[index].getLatLng().lng;
$.ajax({
type: "GET",
url: "http://localhost:8989/route?point=" + dari + "&point=" + tujuan + "&points_encoded=false&instructions=false&vehicle=motorcycle&ch.disable=true&weighting=shortest&algorithm=alternative_route",
dataType: 'json',
contentType: "application/json",
success: function (data) {
successReveived++;
var coordinates = data.paths[0].points.coordinates;
tempDistance = 0;
for(var j=0; j
错误是这样的
无法加载资源:net::ERR_CONNECTION_REFUSED http://localhost:8989/route?point=3.611967691620835,98.67254734039308&point=3.611126,98.67548&points_encoded=false&instructions=false&vehicle=motorcycle&ch.disable=true&加权=最短&算法=alternative_route
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
(我还不能发表评论,所以试图帮助你回答)