[OpenLayers-Users] Optimization of raster WMS layers
jdmorgan
jdmorgan at unca.edu
Tue Jul 10 18:04:16 PDT 2012
Hi Steve,
Thanks so much for you replies. I would like to try to set the
visibility scale threshold. Any advice how to do this would be great.
Below is my init function where I do set the maxExtent. But I am
guessing that by visibility scale threshold you mean setting predefined
scaled. I am not really show how best to determine the predefined
scales. My map is in EPSG 4326.
/function init() {
//Data stored as left, bottom, right, top floats.
bounds = new OpenLayers.Bounds();
bounds.extend(new OpenLayers.LonLat(-131.30859375,23.745610382199022));
bounds.extend(new OpenLayers.LonLat(-58.18359375,48.50874245880332));
bounds.toBBOX();
map = new OpenLayers.Map('map', {
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.Permalink(),
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.Permalink('permalink'),
new OpenLayers.Control.PanPanel(),
new OpenLayers.Control.MousePosition(),
new OpenLayers.Control.OverviewMap(),
new OpenLayers.Control.KeyboardDefaults()
],
numZoomLevels: 16,
maxExtent: bounds
});
map.addControl( new OpenLayers.Control.PanZoomBar(), new
OpenLayers.Pixel(800,0));
var streetMap = new OpenLayers.Layer.ArcGIS93Rest(
'ESRI Streets',
'http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/export?f=image',
{layers: 'show:0'},
{
buffer: 2
}
);
var stateMap = new OpenLayers.Layer.WMS(
'States',
'http://linuxserver/html/vlayers',
{layers: 'states', transparent: true},
{
isBaseLayer: false,
transitionEffect: 'resize',
buffer: 2
}
);
var //rasterlayer//= new OpenLayers.Layer.WMS(
'rasterlayer',
'http://linuxserver/html/ews',
{layers: 'layerofinterest', transparent: true},
{
isBaseLayer: false,
transitionEffect: 'resize',
buffer: 0
}
);
map.addLayers([streetMap, stateMap, fcavLayer]);
map.setCenter(new OpenLayers.LonLat(-98.0859375,
39.095962936305476), 5);
info = new OpenLayers.Control.WMSGetFeatureInfo({
url: 'http://rain.nemac.org/~derek/fswms/html/vlayers',
title: 'Identify features by clicking',
queryVisible: true,
eventListeners: {
getfeatureinfo: function(event) {
map.addPopup(new OpenLayers.Popup.FramedCloud(
"Feature Info:",
map.getLonLatFromPixel(event.xy),
null,
event.text,
null,
true
));
}
}
});
info.infoFormat = 'application/vnd.ogc.gml';
map.addControl(info);
info.activate();
}//END OPENLAYERS
INIT--------------------------------------------------------------
/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120710/4a6f5ff0/attachment-0001.html>
More information about the Users
mailing list