When getting the OpenLayers theme directory, just pass the relative path to url(), instead of deriving it from an asset path.