To do that you need to change a stored procedure. In the procedure prcGetRouteForMap, you need to add TOP 1 and ORDER BY gpsTime DESC. The new stored procedure will look like this:
SELECT TOP 1 latitude '@latitude', longitude '@longitude',
speed '@speed', direction '@direction', distance '@distance',
locationMethod '@locationMethod', CONVERT(VARCHAR(25), gpsTime, 100) '@gpsTime',
phoneNumber '@phoneNumber', sessionID '@sessionID', accuracy '@accuracy',
isLocationValid '@isLocationValid', extraInfo '@extraInfo'
FROM gpslocations
WHERE sessionID = @sessionID
AND phoneNumber = @phoneNumber
ORDER BY gpsTime DESC
FOR XML PATH('locations'), ROOT('gps')
Nick