]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/trace.rb
Add a limit on the number of points in a GPS trace
[rails.git] / app / models / trace.rb
index 2411fb9b7a3c56c2f2adc57787a6194f83058c51..3ab25ce3098735a6058d1a94d053c8143483bdaa 100644 (file)
@@ -202,7 +202,7 @@ class Trace < ApplicationRecord
     logger.info("GPX Import importing #{name} (#{id}) from #{user.email}")
 
     file.open do |file|
-      gpx = GPX::File.new(file.path)
+      gpx = GPX::File.new(file.path, :maximum_points => Settings.max_trace_size)
 
       f_lat = 0
       f_lon = 0