[Geoserver-users] change tile mode dynamically via OpenLayers

Hi,

I'm trying to change tile mode of a layer dynamically via OpenLayers using
this script:
if (this.zoomMapOk<4) {this.namesLayer.tiled = true;
this.namesLayer.tilesorigin = [this.map.maxExtent.left,
this.map.maxExtent.bottom]; this.namesLayer.opacity = 0.6;}
else {this.namesLayer.singleTile = true; this.namesLayer.opacity = 1;}

The change/opacity is OK because when zoom level is >=4 or <4 the opacity of
the layer change accordingly, so the problem not come from the OpenLayer
script.
But there is a problem with the tilesorigin and singleTile property :
everything is OK when the zoom is <4 but when the zoom level is >=4, the
layer disappears.

What's wrong?

Note: I want to change the tile mode f(zoom level) because if I use the
singleTile property, the labels disappear when I'm between Russia and EU
(I'm using the wrappDateLine property) but if I use the tilesorigin
property, the labels repeat themselves (less that If I don't use it!) and
it's quite ugly with a hight zoom level.

Pascal.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/change-tile-mode-dynamically-via-OpenLayers-tp5092326.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On my opinion the best way (and maybe the unique too) to do this is to remove the layer and create it again with the new options when switching from tiled to untiled.

···

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Tue, Dec 3, 2013 at 10:31 AM, pascal <pascal2833@anonymised.com> wrote:

Hi,

I’m trying to change tile mode of a layer dynamically via OpenLayers using
this script:
if (this.zoomMapOk<4) {this.namesLayer.tiled = true;
this.namesLayer.tilesorigin = [this.map.maxExtent.left,
this.map.maxExtent.bottom]; this.namesLayer.opacity = 0.6;}
else {this.namesLayer.singleTile = true; this.namesLayer.opacity = 1;}

The change/opacity is OK because when zoom level is >=4 or <4 the opacity of
the layer change accordingly, so the problem not come from the OpenLayer
script.
But there is a problem with the tilesorigin and singleTile property :
everything is OK when the zoom is <4 but when the zoom level is >=4, the
layer disappears.

What’s wrong?

Note: I want to change the tile mode f(zoom level) because if I use the
singleTile property, the labels disappear when I’m between Russia and EU
(I’m using the wrappDateLine property) but if I use the tilesorigin
property, the labels repeat themselves (less that If I don’t use it!) and
it’s quite ugly with a hight zoom level.

Pascal.


View this message in context: http://osgeo-org.1560.x6.nabble.com/change-tile-mode-dynamically-via-OpenLayers-tp5092326.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Rapidly troubleshoot problems before they affect your business. Most IT
organizations don’t have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Thanks Alessio,

I've done it and it works!

Pascal.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/change-tile-mode-dynamically-via-OpenLayers-tp5092326p5093779.html
Sent from the GeoServer - User mailing list archive at Nabble.com.