I changed my code in this way <br> Now I will display the marker at the
right distance but the coordinates do not correspond to reality but the
wms layer unesco not be seen. <br> I need to change the encoding in Geoserver EPSG from 4326 to 900,913 for the wms layer unesco?<br><br>function init()<br>{ <br> options={<br> projection: new OpenLayers.Projection("EPSG:<div id=":tz" class="ArwC7c ckChnd">
900913"),<br>
displayProjection: new OpenLayers.Projection("EPSG:4326"),<br> numZoomLevels:18,<div class="Ih2E3d"><br> units: "m",<br> maxResolution: 156543.0339,<br>
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,20037508.34, 20037508.34)<br>
};<br> //creo la mappa di base con i parametri <br> map = new OpenLayers.Map('map', options);<br> <br></div> var myBaseLayer = new OpenLayers.Layer.Google("Google",<br>
{'sphericalMercator': true,<br> 'maxExtent': new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34)<div class="Ih2E3d"><br> });<br> <br>
//creo i livelli con la zona unesco<br>
<br></div><div class="Ih2E3d"> unesco = new OpenLayers.Layer.WMS(<br> "TOPP unesco",<br> "<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>?",<br>
{<br> layers: 'topp:unesco',<br> styles: '',<br></div> srs: 'EPSG:900913',<div class="Ih2E3d"><br> format: 'image/png',<br>
tiled: 'true',<br>
tilesOrigin : "0,0",<br> transparent: true<br> }, <br> <br> {<br> 'opacity': 0.5, 'isBaseLayer': false, 'wrapDateLine': true<br>
}<br><br></div> );<br> <br><br> file[0] = "georss/blu.xml";<br> file[1] = "georss/rosso.xml";<br> file[2] = "georss/verde.xml";<br> file[3] = "georss/giallo.xml";<br>
file[4] = "georss/marrone.xml";<br> file[5] = "georss/arancio.xml";<br> file[6] = "georss/celeste.xml";<br> file[7] = "georss/viola.xml";<br> file[8] = "georss/bianco.xml";<br>
file[9] = "georss/nero.xml";<div class="Ih2E3d"><br><br> new1= [];<br> new1[0] = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss/blu.xml', {'icon':color[0]} );<br> new1[1] = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss/rosso.xml', {'icon':color[1]} );<br>
new1[2] = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss/verde.xml', {'icon':color[2]} );<br> new1[3] = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss/giallo.xml', {'icon':color[3]} );<br>
new1[4] = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss/marrone.xml', {'icon':color[4]} );<br> new1[5] = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss/arancio.xml', {'icon':color[5]} );<br>
new1[6] = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss/celeste.xml', {'icon':color[6]} );<br> new1[7] = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss/viola.xml', {'icon':color[7]} );<br>
<br></div> map.addLayers([myBaseLayer,unesco]);<br> //map.addLayers([unesco,aste]);<br> //map.addLayers([unesco,aste,siepi,attrezzature,aree,alberi,edifici]);<div class="Ih2E3d"><br> <br> for (n=0; n < 8; n++) <br>
{<br> map.addLayer(new1[n]);<br>
}<br><br></div><div class="Ih2E3d"> map.addControl(new OpenLayers.Control.LayerSwitcher());<br> loadsetmap();<br></div> map.addControl(new OpenLayers.Control.Permalink());<br> map.addControl(new OpenLayers.Control.MousePosition());</div>