Thanks @mikael, I figured out the problem. I was debugging on an iPad without GPS, so while it returns lat/lon based on wifi, it doesn't return speed. When I tried the same code on an iPhone with GPS it also returns speed. I guess it wouldn't make much sense to derive speed from the wifi based location.