[OpenLayers-Users] Adding multiple Image Layers

Andreas Hocevar ahocevar at opengeo.org
Mon Jul 2 02:53:09 PDT 2012


Hi,

instead of configuring the resolutions and the maxResolution on your
image layers, you could just configure

    alwaysInRange: true

Maybe this fixes your issue.

Andreas.

On Mon, Jul 2, 2012 at 9:22 AM, Bennos <benjaminpreisig at gmx.at> wrote:
> Hi Andreas,
>
> As you can see in my sample code I am only using API options to configure my
> image layer, as well as the size constructor:
>
>>        var theme = new OpenLayers.Layer.Image(
>>                "Data", //name
>>        "data/prec1h/GOOGLE.RR_15min.20120612.1215.15.png", //url
>>        boundaries.transform(geographical,spherical), //extent
>>        new OpenLayers.Size(598, 378), //size
>>        { //options
>>                        isBaseLayer: false,
>>                        resolutions:map.layers[0].resolutions,
>>                        maxResolution : map.layers[0].resolutions[0],
>>                        aspectRatio: 0.9024712214132586
>>                        // visibility: false
>>                }
>>        );
>>        map.addLayer(theme);
>
>
> When turning of the "resolution" and the "maxResolution" the image is not
> shown. The "aspectRatio" is not necesarry, I added it for testing purposes.
> Do you have any other idea, what could be wrong with my code?
>
> Regards,
> Benjamin
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Adding-multiple-Image-Layers-tp4984653p4985233.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Users mailing list