0
我最近安装了hubot并进行了测试。response.send谅解? (hubot脚本)
现在我看到了某事。我不明白:
鉴于此代码(的hubot-maps部分 - maps.coffee file)
robot.respond /(?:(satellite|terrain|hybrid)[- ])?map(me)? (.+)/i, (msg) ->
mapType = msg.match[1] or "roadmap"
location = encodeURIComponent(msg.match[3])
mapUrl = "http://maps.google.com/maps/api/staticmap?markers=" +
location +
"&size=400x400&maptype=" +
mapType +
"&sensor=false" +
"&format=png" # So campfire knows it's an image
url = "http://maps.google.com/maps?q=" +
location +
"&hl=en&sll=37.0625,-95.677068&sspn=73.579623,100.371094&vpsrc=0&hnear=" +
location +
"&t=m&z=11"
msg.send mapUrl
msg.send url
为什么我得到这样的
在那里我得到回应第一个url
然后mapUrl
?
我期望能获得mapUrl
先url
太棒了!谢谢!!!我不是很擅长JS。我试着只是调用msg.sen(mapUrl,url),但得到错误。你能帮我吗? –