Does the AP points given for linking portals depend on the distance between them? I just got more than 2000 points for linking two portals separated by about 10 miles, which I've never seen before...
No, there is a fixed amount of AP you get for linking two portals, which is 313 AP. But it is possible that you created two fields, each of which is worth 1250 AP, so in total you'd get 2813 AP.
This happens if there are already four links that form a quadrangle. If you then link the two portals on opposite sides (one of the diagonals) , you get two triangles, i.e. fields.
See http://ingressfieldguide.com/content/action-points-ap-leveling for details on AP.