Ticket #2982 (closed bug: fixed)
Document that the script name MUST be OpenLayers.js, or ImgPath must be set
|Reported by:||slinkp||Owned by:|
Everything seemed to work except that my control images went 404.
It took me quite a long time to solve this. Poking around the source and searching for related bugs, I eventually figured out how it works - the default is to use _getScriptLocation() and find an img/ directory relative to that, but _getScriptLocation() assumes that the script name is exactly OpenLayers.js.
That's fine, especially because there's a feature tailor-made for this case - you can set OpenLayers.ImgPath - but I'm not sure if or where this is documented. http://docs.openlayers.org/search.html?q=OpenLayers.ImgPath&check_keywords=yes&area=default turns up nothing.
Suggestion: add text to http://docs.openlayers.org/library/deploying.html something along the lines of:
"If you name your build anything other than OpenLayers.js, note that OpenLayers will not be able to automatically find the img/ or theme/ directories. In this case, you should set OpenLayers.ImgPath to the relative base URI at which the img/ directory will be served. You should probably also include style.css in your html explicitly."
Related wontfix bug: #1932