2016-08-07 2 views
1

나는 Mapbox API를 함께 일하고 난 유성 따기되지 않습니다 jQuery를 가지고 :Jquery는 유성에서 어떻게 변환됩니까?

 $.get(directionsUrl, function(data) { 
     // Do something with the directions returned from the API. 
     var route = data.routes[0].geometry.coordinates; 
     route = route.map(function(point) { 
      // Turns out if we zoom out we see that the lat/lngs are flipped, 
      // which is why it didn't look like they were being added to the 
      // map. We can invert them here before drawing. 
      return [point[1], point[0]]; 
     }); 
     polyline.setLatLngs(route); 
    }) 

어떻게 것 유성이 작업 같은?

답변

0

이미 사용해 보셨습니까?

특별한 문제없이 그대로 작동해야합니다. jquery 패키지는 Meteor 프로젝트에 기본적으로 추가되어야하며 정규로 작동해야합니다.

data이 JS 개체로 올바르게 변환되었는지 확인하십시오.

여전히 문제가있는 경우 콘솔에있을 수있는 오류 메시지를 추가 할 가치가 있습니다.

관련 문제