Sha256: 2c76f9111c4c47c1e7a538c2fc695e8b43bde92dc6b4972809c8f094e56f13f2

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

module CloudKicker
  module MapBookmarking
    def add_bookmarking_functions
      add_location_to_anchor
    end
    
    private
    
    def add_location_to_anchor
      <<-JS
        function add_location_to_anchor(map){
          var center = map.getCenter();
          var anchor = '#center_lat=' + center.lat() + '&center_lng=' + center.lng() + '&zoom=' + map.getZoom();
          window.location.hash = anchor;
          return false;
        }
      JS
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cloud_kicker-0.0.0.pre1 lib/critical_juncture/map/map_bookmarking.rb