[OpenLayers-Users] png on spherical mercator

Arnd Wippermann arnd.wippermann at web.de
Sun Sep 6 07:21:03 EDT 2009


Hi,

Try with adding the resolutions to your options of your layer.

{numZoomLevels: 3, isBaseLayer: false,
resolutions:map.layers[0].resolutions,
maxResolution:map.layers[0].resolutions[0]}; 

Arnd

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Jonathan Wolfe
Gesendet: Sonntag, 6. September 2009 12:25
An: users at openlayers.org
Betreff: [OpenLayers-Users] png on spherical mercator

Hi,

Am I using the OpenLayers.Layer.Image correctly? All I want to do is overlay
a png onto a google projection...The layer shows up grayed out and nothing
is displayed.

var graphic = new OpenLayers.Layer.Image(
                'Nautical Chart',
                './nautical_chart4.png',
                new OpenLayers.Bounds(-135.0, 17.0, -115.0, 
62),             <-- I tried using x,y values, but neither worked.
                new OpenLayers.Size(276,212),
                {numZoomLevels: 3,
                    isBaseLayer: false};
            );
map.addLayer(graphic);

Thanks for your help!
Jonathan

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list