On Wed, Oct 10, 2007 at 11:55:04PM -0600, staff-gmail wrote: > angus scown wrote: > > staff-gmail wrote: > >> The control icons are not showing up in Rails - I have OpenLayers.js > >> from the build directory in the Rails javascripts folder and put the > >> /img and /theme also within the javascripts folder but they are not > >> being accessed correctly. The control buttons seem to work okay - > >> but the images don't show. Anyone work around this ? > >> _______________________________________________ > >> Users mailing list > >> [email protected] > >> http://openlayers.org/mailman/listinfo/users > >> > >> > > if you don't want to modify the openlayers javascript then you need to > > place the /img folder in a folder with the controller name under the > > public directory. > > > > i.e. /public/some-controller-name/img > > e.g /public/jobs/img > > > > Michael Quentel wrote: > > > > Try modifying the image path in Utils.js to what the Rails application > > would use for the img and theme directories. > > > > thks - yeah, I saw that about the controller location. Problem is if > you use the map in more than 1 view, then you have the same image > folders in multiple locations, not good though a hackable solution. So > it would be better to modify the Utils.js
Util.js provides the functionality to override the base image path, via the OpenLayers.Util.ImgPath constant (http://dev.openlayers.org/docs/files/OpenLayers/Util-js.html#Util.ImgPath , not well enough documented). Regards, -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
