Class: Widgets::GoogleMap::Base
- Inherits:
-
ErpApp::Widgets::Base
- Object
- ErpApp::Widgets::Base
- Widgets::GoogleMap::Base
- Defined in:
- app/widgets/google_map/base.rb
Class Method Summary collapse
Instance Method Summary collapse
- #index ⇒ Object
-
#locate ⇒ Object
should not be modified modify at your own risk.
Class Method Details
.base_layout ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'app/widgets/google_map/base.rb', line 31 def base_layout begin file = File.join(File.dirname(__FILE__),"/views/layouts/base.html.erb") IO.read(file) rescue return nil end end |
.title ⇒ Object
23 24 25 |
# File 'app/widgets/google_map/base.rb', line 23 def title "Google Map" end |
.widget_name ⇒ Object
27 28 29 |
# File 'app/widgets/google_map/base.rb', line 27 def File.basename(File.dirname(__FILE__)) end |
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/widgets/google_map/base.rb', line 5 def index @uuid = Digest::SHA1.hexdigest(Time.now.to_s + rand(100).to_s) @drop_pins = params[:drop_pins] @map_width = params[:map_width] || 500 @map_height = params[:map_height] || 500 @zoom = params[:zoom] || 18 @map_type = params[:map_type] || 'SATELLITE' render end |
#locate ⇒ Object
should not be modified modify at your own risk
18 19 20 |
# File 'app/widgets/google_map/base.rb', line 18 def locate File.dirname(__FILE__) end |