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.
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.
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.
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