Permalink
Browse files

Change overview map control usage for API 2.149+

The behavior of the overview map control changed in API v2.149, causing
the auto-hide action to stop working. By moving the overview map
variable to global scope, the auto-hide action works again with API
versions v2.149 and later (at least through v2.153 which is the latest
version at this time). It also continues to work with some older, v2.148
and earlier, versions of the API, though not all older versions have
been checked. (NB, at this time v2 = v2.150; v2.x = v2.153)
  • Loading branch information...
1 parent 24b65cc commit 5d5e2b7a55ef32612b4da25d1952bb713a7427bf @davec davec committed with Apr 16, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/gm_plugin/map.rb
@@ -89,7 +89,7 @@ def control_init(controls = {})
size = controls[:overview_map][:size]
end
overview_control = GOverviewMapControl.new(size)
- @init_end << overview_control.declare("#{@variable}_ovm") if hide
+ @global_init << overview_control.declare("#{@variable}_ovm") if hide
@init_end << add_control(overview_control)
@init_end << "#{overview_control.variable}.hide(true);" if hide
end

0 comments on commit 5d5e2b7

Please sign in to comment.