Sha256: d4ef2061e77c93201c7d59b3a322fef023bcb9dad474d63016a6e0c80a8a2361

Contents?: true

Size: 316 Bytes

Versions: 22

Compression:

Stored size: 316 Bytes

Contents

class Atome
  def geolocation
    localisation = {latitude: nil, longitude: nil}
    $window.navigator.geolocate.then do |pos|
      localisation[:latitude] =  pos.coords.latitude
      localisation[:longitude] =  pos.coords.longitude
    end.rescue do |err|
      p  err
      localisation = nil
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
atome-0.5.4.1.9 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.4.1.7 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.4.1.3 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.4.1.2 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.4.1.1 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.4.1.0 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.4.0.9 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.3.8.8 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.3.8.1 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.3.8.0 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.3.7.8 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.3.7.3 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.3.7.2 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.3.4 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.3.2 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.2.8 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.2.7 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.2.5 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.1.9 lib/atome/renderers/opal/extensions/geolocation.rb
atome-0.5.1.4 lib/atome/renderers/opal/extensions/geolocation.rb