Ticket #2328 (closed bug: fixed)
Google termsOfUse are visible on all Layers on startup
| Reported by: | mar_rud | Owned by: | elemoine |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.9 Release |
| Component: | Layer.Google | Version: | 2.8 |
| Keywords: | Cc: | ||
| State: | Complete |
Description
When adding Google layer, its termOfUse div gets somehow displayed (style.display from 'none' to ) after creating map and it is visible even when different layer is selected. You can see this i.e. here:
http://openlayers.org/dev/examples/spherical-mercator.html
When changing to OSM, Google's termsOfUse are still visible. In fact You need to cycle through all google layers to make sure all termsOfUse divs have again proper display value and are visible only on Layer they belong to.
I debuged it a little on my page:
http://mapa.ump.waw.pl/ump-www/index_en.html[[BR]]
Its style.display is correct when exiting onload initialization function, it gets displayed while rendering map. Google.display(display) is not the source, it is called only once per google layer with proper false parameter.
As a dirty solution I can add:
this.termsOfUse.style.visibility=display?"":"hidden";
to Google.display(display) function, and at least it isn't visible when not needed, but it shouldn't get displayed in first place while rendering map. Is it google API cycling throw all divs and enabling its own?

