Changed all ocurrences of posX to lat(latitude) and posY to lon(longitude).