[OpenLayers-Dev] Google layer problems

Martin Saturka martin.saturka at sourcefabric.org
Sun Jan 2 17:55:38 EST 2011


Hello,
one more problem on the GoogleV3 layer is that its copyright and
powered-by texts are not removed when a different map provider is
selected via LayerSwitcher. For now, I do a check for that during
checkRedraw method (of a LayerSwitcher control). I add / remove a
'hiding' class for elements with olLayerGooglePoweredBy or
olLayerGoogleCopyright classes. Then it works, but it is a strange
hack. Is there a more reasonable way?

I do not know whether it is a reason for having attribution texts of
OSM placed some space above bottom of maps, but it looks that such a
strange position was set at the css files just to make that texts
visible even when some (Google) texts are left at the bottom.

M.

On Fri, Dec 17, 2010 at 8:12 PM, Martin Saturka
<martin.saturka at sourcefabric.org> wrote:
> Hello,
> one possibility to deal with the "map data popups" at google v 3.3 is to
> change the repositionMapElements method on OpenLayers.Layer.Google class -
> to comment out two lines there:
> //termsOfUse.style.display = "";
> //cache.termsOfUse = termsOfUse;
>
> This works well for me for both v3.2 and v3.3 of Google API.
>
> The v3.2 puts map data providers and terms of use link as a text, but it can
> be wider than the actual map div. Then you will not see the whole string.
> The v3.3 detects it, and when the data providers string is too large, it
> just puts a link to the popup with the data providers. It is better then,
> since you can see the strings appropriately.
>
> It looks that OL is confused by the change and supposes that the popup is
> something to be shown (without clicking for it).
>
> M.
>
> --
> Martin Saturka
> Software Engineer, Sourcefabric
> martin.saturka at sourcefabric.org
>
> Subscribe to our Newsletter:
> www.sourcefabric.org/newsletter/
>
> Salvátorská 10
> 110 00 Praha 1, Czech Republic
> http://www.sourcefabric.org
> http://www.twitter.com/Sourcefabric
>

-- 
Martin Saturka
Software Engineer, Sourcefabric
martin.saturka at sourcefabric.org
110 00 Praha 1, Czech Republic
www.sourcefabric.org


More information about the Dev mailing list