[OpenLayers-Users] OpenLayers in Rails

Christopher Schmidt crschmidt at metacarta.com
Thu Oct 11 15:02:04 EDT 2007


On Thu, Oct 11, 2007 at 08:19:12PM +0200, Arnd Wippermann wrote:
> Hello Christopher,
> 
> Setting OpenLayers.Util.ImgPath = ... has no effect.

Ah. Poor documentation.

> If you look at this, I would think there is "Util." missing:
> 
> OpenLayers.Util.getImagesLocation =
> function () {
>     return OpenLayers.ImgPath || OpenLayers._getScriptLocation() + "img/";
> } 
> 
> Setting OpenLayers.ImgPath = ... works.
> 
> Is there possibly a variable to set the path to the theme-dir as well?

You should probably be including the CSS in your HTML (see
http://trac.openlayers.org/ticket/884 ), but you can set
{'theme':'/location/of/foo.css'} as a map option as well.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list