[OpenLayers-Trac] Re: [OpenLayers] #3499: OpenLayers Custom Build
_getScriptLocation not working properly
OpenLayers
trac-20090302 at openlayers.org
Tue Sep 13 10:53:32 EDT 2011
#3499: OpenLayers Custom Build _getScriptLocation not working properly
----------------------------------------------------------------------+-----
Reporter: ckreuzbe | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.12 Release
Component: general | Version: 2.10
Keywords: images getScriptLocation custom build filename different | State: Review
----------------------------------------------------------------------+-----
Comment(by jorix):
I think this is not a bug (is a feature), this is normal behavior. The
name should only be {{{OpenLayers.js}}}.
In my case I have the same problem, since I have several compilations:
lite and custom.
To change the behavior just add after:
{{{
<script src="/Your-location-for-OpenLayers/OpenLayers-mainMap.js"
type="text/javascript"></script>
}}}
this line:
{{{
<script>
OpenLayers._getScriptLocation = function(){return "/Your-location-for-
OpenLayers/"};
</script>
}}}
But this is not a "medicine" supported by the APIs. It would be nice to be
so!
> ...
> c) give the user a way to specify the actual javascript filename in the
source code (e.g. !OpenLayers.ScriptFileName='!OpenLayers-mainMap.js'; ),
and, if possible, include this in the python build script so it sets the
default value according to the output-file-name option of build.py.
instead of {{{OpenLayers.ScriptFileName='OpenLayers-mainMap.js';}}} I
like:
{{{
OpenLayers.setScriptLocation="/Your-location-for-OpenLayers/";
}}}
----
NOTE: I'm not a member of the team OpenLayers.
--
Ticket URL: <http://trac.openlayers.org/ticket/3499#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list