[OpenLayers-Users] Vector layer rendering with maxResolution:
'auto'
Arnaud Morvan
arnaud.morvan at abscisse-geomatique.fr
Wed Sep 3 12:04:28 EDT 2008
I have to set manually the resolutions and maxExtent for each layer
I have no more problem with vector rendering
map = new OpenLayers.Map('map');
var units = "m";
var scales = [100000, 50000, 25000, 10000, 5000, 2500, 1000, 500];
var resolutions = new Array(scales.length);
for (i=0;i<scales.length;i++) {
resolutions[i] = scales[i] / (OpenLayers.INCHES_PER_UNIT[units] *
OpenLayers.DOTS_PER_INCH);
}
var maxExtent = new OpenLayers.Bounds(208734.44346970832,
2356190.841286027, 239182.1975747915, 2382407.4659272283);
baseLayer = new OpenLayers.Layer.WMS(
"Cadastre",
"/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/maps/cideral.map&",
{
layers: "parcelle,batiment",
format: "image/png",
},
{
resolutions: resolutions,
maxExtent: maxExtent,
projection:"EPSG:27572",
units: units,
singleTile: true,
transitionEffect: 'resize',
}
);
map.addLayer(baseLayer);
vectorLayer = new OpenLayers.Layer.Vector(
"Vector Layer",
{
resolutions: resolutions,
maxExtent: maxExtent,
projection:"EPSG:27572",
units: units,
}
);
map.addLayer(vectorLayer);
amorvan a écrit :
> Hello,
>
> When I set maxResolution: 'auto' in new map options :
>
> - I can't view objects added with addFeatures
> - If I use vector layer with EditingToolbar, the new objects created
> disapear on doubleclick
>
> Regards
>
> Arnaud Morvan
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.169 / Virus Database: 270.6.14/1646 - Release Date: 01/09/2008 18:03
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080903/d122056f/attachment.html
More information about the Users
mailing list