[OpenLayers-Users] custom bitmap as main background layer
Stephane Poirier
stephane.poirier at usherbrooke.ca
Sun May 9 14:00:15 EDT 2010
Hi All,
I am using a custom bitmap (878 x 823 pixel) as openlayer main background layer and I get the openlayers map display that I want (http://www.oifii.org/imt/dai/src/2010may31/index_CRCM_POLSTE-BITMAP.html).
I would like to be able to do coordinate (projection) transforms. Provided my bitmap is a stereo polar projection rotated in order to get north america vertical and center to canada, how could I modify my code here below (that works in pixel projection) to work with this specific projection? I need to do this because I want to overlay objects from a layer that I must query in lat lon (EPSG:4326).
My code used to create the default layer is:
minimumdefaultBounds=new OpenLayers.Bounds(0, 0, 1, 1);
defaultBounds=new OpenLayers.Bounds(0, 0, 878, 823);
var options=
{
minResolution: "auto",
minExtent: minimumdefaultBounds,
maxResolution: "auto",
maxExtent: defaultBounds, //i.e. max bitmap size
restrictedExtent: defaultBounds, //null to allow panning
projection: myproj,
controls: [new OpenLayers.Control.MouseDefaults(),new OpenLayers.Control.ArgParser(),new OpenLayers.Control.PanZoom()]
};
map=new OpenLayers.Map('map',options);
Regards,
Stephane
--------------------------------------------------------------------
Stephane Poirier, M.Sc. Optical Physics
Remote Sensing Application Software Developer
3532 rue Sainte-Famille, Apt. 4
Montreal, QC, H2X 2L1, Canada
http://www.oifii.org
stephane.poirier at oifii.org
Tel.: (514) 509-8833
Fax: (514) 509-8833
--------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100509/07021b76/attachment.html
More information about the Users
mailing list