OpenLayers wrapper ImageLayer problem


I am having some issues trying to display a raster layer with openlayers wrapper.

What I have is a KMZ file containing a raster png file and the KML. This KML has a GroundOverlay feature, which its icon is the png file. Since this kind of feature is not supported I am processing the KMZ with JAK and dealing with the features by myself, just like the vkml example. I get the GroundOverlay Icon and Bounds to display the image.

The problem is that it seems that ImageLayer doesn’t render local URIS like file:/Users/Mine/raster.png but it does with others like
First I thought it had to be with the KMZ format, so I tried to use as icon some image stored in my home folder. But it doesn’t work:

public void showFeature(GroundOverlay go) {
		String uri = go.getIcon().getHref();		

		LatLonBox box = go.getLatLonBox();

		Double[] points = { box.getWest(), box.getSouth(), box.getEast(),
				box.getNorth() };	

		File img = new File("/Users/Freyta/" + uri);
		try {
			if (img.exists()) {
				String url = img.toURI().toURL().toString();
                                //This Works
                                //url = "";

				ImageLayer iml = new ImageLayer(url, 20, 10);

				System.out.println("Showed groundoverlay!");
		} catch (Exception e) {

Thanks for your time!



It seems is because browser’s security policy about accessing local URLs.
But it is a pain in the ass at developing stage :mad:

I assume that I should receive the KML file (with the upload) and store at least temporally in the server and reference it using a remote URL.
If anybody has any hints about this issue it would be really appreciated.