2016-08-07 5 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オブジェクトに変換されていることを確認してください。

問題が解決しない場合は、コンソールにエラーメッセージを追加する価値があります。

関連する問題