I have added a large image to the openlayers map I have built. The code is below. But the map is not displaying the image. If I expand the layerswitcher it shows the layer in there checked but grayed out (disabled). It used to work just fine, but suddenly stopped working. I can’t figure out for the life of me why or at what point it stopped working. I’m hoping someone can point me in the right direction.
imgbounds = new OpenLayers.Bounds(this.ll2ol(-105.424392,'lon'),this.ll2ol(43.975458,'lat'),this.ll2ol(-105.317911,'lon'),this.ll2ol(44.087556,'lat'));
overlay = new OpenLayers.Layer.Image(
"Aerial View",
"/media/mapassets/CORDEROAPR11.jpg",
imgbounds,
new OpenLayers.Size(27994, 20832),
{'isBaseLayer': false, 'alwaysInRange': false}
);
map.addLayer(overlay);
the ll2ol is a reference to a function I have. That part works just fine. It’s acting like it can’t find the image, but the path to this image is the same as the path to a kml file I am using as well (just with different file names) and I know that the image file exists where the path leads it. This image file is immense and I am aware of the memory resources required, but like I said this was working just fine a few months ago. I thought I had just commented it out when I came back to this project from another so I didn’t think anything of it at the time.
I am running Firefox with Firebug and checking the Net tab reveals that it’s not even trying to load the jpg file. It doesn’t show up as not found or anything. Just simply not there. But the layer is.
I was able to get it working, but I’m not really sure how. I think it came down to the order of how I added the layers. However, the image is so huge it takes a long time to load, so I’ll have to investigate the tile server option.