Very good. Thanks.
BTW, the example says the size value has no effect. Perfect for me.

Regards.

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Thursday, August 25, 2011 12:38 PM
To: JK Chen
Cc: [email protected]
Subject: AW: [OpenLayers-Users] how to change the size of OpenLayers.Layer.Image

Hi,

You have to know the width and height in map units and the insert point for 
your image.

Say x0,y0 und w,h im map units, then

imgLayer.extent=new OpenLayers.Bounds(x0,y0,x0+w,y0+h);

Here you can see, how it works:
http://gis.ibbeck.de/OLClient/examples/ArcGIS93Rest.html
 
Regards,
Arnd


-----Ursprüngliche Nachricht-----
Von: JK Chen [mailto:[email protected]]
Gesendet: Donnerstag, 25. August 2011 16:23
An: [email protected]
Cc: [email protected]
Betreff: RE: [OpenLayers-Users] how to change the size of OpenLayers.Layer.Image

Suppose my image is w and h, how I code? Into extent? Why?

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, August 24, 2011 6:20 PM
To: JK Chen
Cc: [email protected]
Subject: AW: [OpenLayers-Users] how to change the size of OpenLayers.Layer.Image

Hi,

Try to set a new extent for the layer:

imgLayer.extent=new OpenLayers.Bounds(-70,-10,70,10);

This is perhaps needed to refresh the layer imgLayer.setVisibility(false); 
imgLayer.setVisibility(true);
 
Arnd

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von jk
Gesendet: Mittwoch, 24. August 2011 21:27
An: [email protected]
Betreff: [OpenLayers-Users] how to change the size of OpenLayers.Layer.Image

Hi,

I am trying to use OL to view military images, jpeg, of various dimensions.
I need to maintain the orginal aspect. Now, how to specify the size values when 
creating a new Layer.Image?

Is it possible to change those values after image loads?

How?

Thanks.

JK

--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/how-to-change-the-size-of-OpenLayers-
Layer-Image-tp6721664p6721664.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to