<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
I have to set manually the resolutions and maxExtent for each layer<br>
I have no more problem with vector rendering<br>
<br>
map = new OpenLayers.Map('map');<br>
<br>
var units = "m";<br>
var scales = [100000, 50000, 25000, 10000, 5000, 2500, 1000, 500];<br>
var resolutions = new Array(scales.length);<br>
for (i=0;i<scales.length;i++) {<br>
resolutions[i] = scales[i] / (OpenLayers.INCHES_PER_UNIT[units] *
OpenLayers.DOTS_PER_INCH);<br>
}<br>
var maxExtent = new OpenLayers.Bounds(208734.44346970832,
2356190.841286027, 239182.1975747915, 2382407.4659272283); <br>
<br>
baseLayer = new OpenLayers.Layer.WMS(<br>
"Cadastre",<br>
"/cgi-bin/mapserv.exe?map=c:/ms4w/apache/htdocs/maps/cideral.map&",<br>
{<br>
layers: "parcelle,batiment",<br>
format: "image/png",<br>
},<br>
{<br>
resolutions: resolutions,<br>
maxExtent: maxExtent, <br>
projection:"EPSG:27572",<br>
units: units,<br>
singleTile: true,<br>
transitionEffect: 'resize',<br>
}<br>
);<br>
map.addLayer(baseLayer);<br>
<br>
vectorLayer = new OpenLayers.Layer.Vector(<br>
"Vector Layer",<br>
{<br>
resolutions: resolutions,<br>
maxExtent: maxExtent, <br>
projection:"EPSG:27572",<br>
units: units,<br>
}<br>
);<br>
map.addLayer(vectorLayer);<br>
<br>
<br>
amorvan a écrit :
<blockquote cite="mid:1220360608018-833877.post@n2.nabble.com"
type="cite">
<pre wrap="">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
</pre>
<pre wrap="">
<hr size="4" width="90%">
No virus found in this incoming message.
Checked by AVG - <a class="moz-txt-link-freetext" href="http://www.avg.com">http://www.avg.com</a>
Version: 8.0.169 / Virus Database: 270.6.14/1646 - Release Date: 01/09/2008 18:03
</pre>
</blockquote>
</body>
</html>