[OpenLayers-Users] openlayers image layer stretch with no blur effect
Matteo Galletti
m.galletti at eldes.it
Thu Sep 19 08:12:00 PDT 2013
I use an Image Layer to draw some data at specific locations on my web
application using gwt-openlayers. Assume the original image is 400x400
pixels. Whem I zoom in the map, the image is stretched. The problem is that
the stretch effect is 'blurry'. How can I avoid this blurry effect and
instruct openlayers to apply a normal 'raw' stretch on the image? Is there
some options somewhere? When I say blurry, I mean this:
(see fig1.pngf in attachments)
The image above demonstrate the concept. I have a 400x400 pixels image. The
image is formed by 4 sub squares 200x200 pixels each. Top left square is
blue, top right is green, bottom left is yellow and bottom right is red.
When I draw this image as an image layer in openlayers and I zoom the map,
the center of the image gets blurry and the four colors are blended. Is
there a way to avoid this blur effect and have a 'raw' stretch? Thanks.
Here's the code (in gwt-openlayers) I use to create the image layer:
org.gwtopenmaps.openlayers.client.layer.ImageOptions imgOptions = new
org.gwtopenmaps.openlayers.client.layer.ImageOptions();
imgOptions.setIsBaseLayer(false);
imgOptions.setTransitionEffect(TransitionEffect.RESIZE);
imgOptions.setAlwaysInRange(true);
imgOptions.setLayerOpacity(0.7);
imgOptions.setProjection("EPSG:900913");
imgLayer = new org.gwtopenmaps.openlayers.client.layer.Image("my_name",
null, bounds, new Size(1, 1), imgOptions);
map.addLayer(imgLayer);
Matteo Galletti
ELDES s.r.l.
via di Porto 2/B, 50018
Scandicci (FI) ITALY
<mailto:m.galletti at eldes.it> m.galletti at eldes.it
The information contained in this e-mail and any attachments is confidential
and may well also be legally privileged. If you are not among the named
recipients, please notify the sender immediately by reply e-mail and then
delete this message from your system, do not use the contents for any
purpose whatsoever nor disclose them to anyone else.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130919/79f433c3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fig1.png
Type: image/png
Size: 1900 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130919/79f433c3/attachment-0001.png>
More information about the Users
mailing list