小编Yaw*_*awn的帖子

Google Maps API v3中的路线距离

我正在尝试研究如何使用Google地图方向演示来获取成功路线的距离.

这是我到目前为止的代码:

var googleMaps = {
  // HTML Nodes
  fromInput: google_maps_from,
  toInput: google_maps_to,

  // API Objects
  dirService: new google.maps.DirectionsService(),
  dirRenderer: new google.maps.DirectionsRenderer(),
  map: null,

  showDirections: function(dirResult, dirStatus) {
    if (dirStatus != google.maps.DirectionsStatus.OK) 
    {
     //Here we'll handle the errors a bit better :P
      alert('Directions failed: ' + dirStatus);
      return;
    }
    else
    {
     //Get the distance here
     //onGDirectionsLoad();
    }

    // Show directions
    googleMaps.dirRenderer.setMap(googleMaps.map);
    googleMaps.dirRenderer.setPanel(document.getElementById("directions"));
    googleMaps.dirRenderer.setDirections(dirResult);
  },

  getSelectedTravelMode: function() {
    return google.maps.DirectionsTravelMode.DRIVING;
  },

  getSelectedUnitSystem: function() {
    return google.maps.DirectionsUnitSystem.METRIC;
  },

  getDirections: function() …
Run Code Online (Sandbox Code Playgroud)

javascript google-maps

14
推荐指数
1
解决办法
4万
查看次数

在jPanel上显示动画gif

在我的重写函数中JFrame:

@Override
protected void paintComponent(Graphics g) {

    BufferedImage imagePerson;
    try {
        imagePerson = ImageIO.read(new File("errol.gif"));
    } catch (IOException e) {
        imagePerson = null;
    }

    g.drawImage(imagePerson, i * increment, j * increment - 1, null);
}
Run Code Online (Sandbox Code Playgroud)

如何更改此设置以显示gif上的动画(不使用线程).我花了很多时间试图让它工作,但无济于事.

java

8
推荐指数
1
解决办法
2万
查看次数

允许运行php脚本的多个实例

我正在尝试使用ajax同时向php脚本发出多个请求,但是,它似乎一次只做1个实例,我无法连接到下一个调用,直到上一个完成.我需要做什么才能让它同时完成所有这些操作?我在Windows上使用apache(xampp).我也在我的unix服务器上测试了这个,同样的事情也发生在那里.

php ajax simultaneous-calls

5
推荐指数
1
解决办法
2803
查看次数

jqGrid获取所有ID

我注意到jqgrid的一个小错误,如果你将虚拟滚动设置为1并尝试选择所有行,它实际上并没有选择它们都意味着你打电话

$("#file-grid").jqGrid('getGridParam','selarrrow'); 
Run Code Online (Sandbox Code Playgroud)

要获取所有选定的行数据,它实际上并不会获得所有数据.我想知道是否有一种方法来获取所有行id,选择或不使用jqgrid.

jqgrid

5
推荐指数
2
解决办法
3万
查看次数

通过ssh静默地搜索大文件夹

我试图通过ssh来查找一个包含数千个文件的文件夹,但它每30秒左右一直冻结,直到我向ssh窗口发送一个随机按键然后它再次恢复,我怎样才能运行tar命令它没有像这样冷冻运行吗?

tar

2
推荐指数
1
解决办法
7693
查看次数

在应用程序中键入错误

我试图让这段haskell代码工作,但我不断收到此错误消息:

> ERROR file:.\4.hs:9 - Type error in application
> Expression     : fact n div (fact m * fact (n - m))
> Term           : fact
> Type           : Int -> Int
> Does not match : a -> b -> c -> d
Run Code Online (Sandbox Code Playgroud)

这是代码:

fact :: Int -> Int
fact q 
 | q == 1 = 1
 | otherwise = q * fact(q-1)

comb :: Int -> Int -> Int
comb n m
 | n < m = error …
Run Code Online (Sandbox Code Playgroud)

haskell

0
推荐指数
1
解决办法
361
查看次数

标签 统计

ajax ×1

google-maps ×1

haskell ×1

java ×1

javascript ×1

jqgrid ×1

php ×1

simultaneous-calls ×1

tar ×1