Debes estar cerca, todo pinta bastante bien :)<br><br>Como cargas el fichero curso1.html en el navegador? como file:///xxxxxxx/curso1.html o como <a href="http://localhost/curso1.html">http://localhost/curso1.html</a>?<br>
<br>Si es con el primero entonces prueba con el segundo.<br><br>Animo.<br><br><br><div class="gmail_quote">2012/1/12 Javier Jose Quispe Varillas <span dir="ltr">&lt;<a href="mailto:jjquispev@hotmail.com">jjquispev@hotmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">
Amigos<br>Gracias por todos sus comentarios.<br>He estado haciendo pruebas y pienso que he avanzado algo:<br><br>1) Tengo instalado el ms4w en c:\ms4w<br>2) Ya instale el python 2.7 en mi pc, en c:\Python27<br>3) El archivo proxy.cgi modifique la primera linea con:<br>
    Estaba: #!/usr/bin/env python<br>    ahora esta: #!C:/Python27/python.exe -u<br>4) Cuando en un browser indico: <a href="http://localhost/cgi-bin/proxy.cgi" target="_blank">http://localhost/cgi-bin/proxy.cgi</a>, sale la pagina de openalyers. al parecer ya esta bien el cgi.<br>
5) Cree una carpeta c:\ms4w\apps\cursoopenlayers<br>6) Copie en un carpeta todas las librerias de openalyers en c:\ms4w\apps\openlayers\openlayers<br>7) Tengo el siguiente archivo curso1.html :<br><br>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;<br>
&quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>
    &lt;head&gt;<br>        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;/&gt;<br>        &lt;script type=&quot;text/javascript&quot; src=&quot;openlayers/lib/OpenLayers.js&quot;&gt;&lt;/script&gt;<br>
        &lt;script type=&quot;text/javascript&quot;&gt;<br>            var map;<br>            //OpenLayers.ProxyHost = &quot;c:\ms4w\Apache\cgi-bin\proxy.cgi?url=&quot;;<br>            OpenLayers.ProxyHost = &quot;/cgi-bin/proxy.cgi?url=&quot;;<br>
            //OpenLayers.ProxyHost = &quot;\cgi-bin\proxy.cgi?url=&quot;;<br>            function init() {<br>                map = new OpenLayers.Map(&#39;map&#39;);<br>                <br>                /*var layer = new OpenLayers.Layer.WMS( &quot;OpenLayers WMS&quot;,<br>
                    &quot;<a href="http://vmap0.tiles.osgeo.org/wms/vmap0" target="_blank">http://vmap0.tiles.osgeo.org/wms/vmap0</a>&quot;, {layers: &#39;basic&#39;} );<br>                map.addLayer(layer);<br>                map.setCenter(new OpenLayers.LonLat(-8, 42.8), 8);<br>
                map.addControl(new OpenLayers.Control.LayerSwitcher());<br>                */<br>                <br>                var base = new OpenLayers.Layer.WMS(&quot;Capa base&quot;,<br>                    &quot;<a href="http://tilecache.osgeo.org/wms-c/Basic.py" target="_blank">http://tilecache.osgeo.org/wms-c/Basic.py</a>&quot;,<br>
                    {layers: &quot;basic&quot;}<br>                );<br>                map.addLayer(base);                <br>                var wfs = new OpenLayers.Layer.Vector(&quot;Capa WFS&quot;, {<br>                    strategies: [new OpenLayers.Strategy.Fixed()],<br>
                    protocol: new OpenLayers.Protocol.WFS({<br>                        url: &quot;<a href="http://demo.opengeo.org/geoserver/wfs" target="_blank">http://demo.opengeo.org/geoserver/wfs</a>&quot;,<br>                        featureType: &quot;states&quot;<br>
                        //featureNS: &quot;<a href="http://www.openplans.org/topp" target="_blank">http://www.openplans.org/topp</a>&quot;<br>                    })<br>                });<br>                map.addLayer(wfs);<br>
                map.zoomToExtent(new OpenLayers.Bounds(-140.4, 25.1, -44.4, 50.5));<br>                                <br>                // CONTROLES<br>                map.addControl(new OpenLayers.Control.Navigation());<br>
                map.addControl(new OpenLayers.Control.Attribution());<br>                map.addControl(new OpenLayers.Control.PanZoomBar());<br>                map.addControl(new OpenLayers.Control.ArgParser());<br>                map.addControl(new OpenLayers.Control.LayerSwitcher({&#39;ascending&#39;:false}));<br>
                map.addControl(new OpenLayers.Control.Permalink());<br>                map.addControl(new OpenLayers.Control.MousePosition());<br>                map.addControl(new OpenLayers.Control.OverviewMap());<br>                map.addControl(new OpenLayers.Control.KeyboardDefaults());<br>
                map.addControl(new OpenLayers.Control.ScaleLine());<br>                <br>                var vector_layer = new OpenLayers.Layer.Vector( &quot;Editable&quot; );<br>                var edit_panel = new OpenLayers.Control.EditingToolbar(vector_layer);<br>
                var modify_feature_ctrl = new OpenLayers.Control.ModifyFeature(vector_layer,<br>                {<br>                    title: &quot;Modify Feature&quot;,<br>                    displayClass: &quot;olControlModifyFeature&quot;<br>
                });<br>                edit_panel.addControls(modify_feature_ctrl);<br>                map.addControl(edit_panel);<br>                map.addLayer(vector_layer);<br>                                <br>                /*  // No selecciona parece que falta algo<br>
                getFeature_control = new OpenLayers.Control.GetFeature({<br>                    protocol: OpenLayers.Protocol.WFS.fromWMSLayer(base),<br>                    box: true,<br>                    hover: false,<br>
                    multipleKey: &quot;shiftKey&quot;,<br>                    toggleKey: &quot;ctrlKey&quot;<br>                });<br>                getFeature_control.events.register(&quot;featureselected&quot;, this, function(e) {<br>
                    select_layer.addFeatures([e.feature]);<br>                    modify_control.deactivate();<br>                });<br>                getFeature_control.events.register(&quot;featureunselected&quot;, this, function(e) {<br>
                    select_layer.removeFeatures([e.feature]);<br>                });<br>                map.addControl(getFeature_control);<br>                getFeature_control.activate();*/<br>                <br>                /*var popup;     // Sale mas o menos, no sale data, hay que ajustar algo<br>
                info = new OpenLayers.Control.WMSGetFeatureInfo({<br>                    url: &#39;<a href="http://tilecache.osgeo.org/wms-c/Basic.py" target="_blank">http://tilecache.osgeo.org/wms-c/Basic.py</a>&#39;,<br>
                    title: &#39;Identify features by clicking&#39;,<br>                    queryVisible: true,<br>                    eventListeners: {<br>                        getfeatureinfo: function(event) {<br>                        if (popup !== undefined) {<br>
                            map.removePopup(popup);<br>                        }<br>                        popup = new OpenLayers.Popup.FramedCloud(<br>                            &quot;chicken&quot;,<br>                            map.getLonLatFromPixel(event.xy),<br>
                            new OpenLayers.Size(50,50),<br>                            event.text,<br>                            null, true );<br>                        map.addPopup(popup);<br>                        }<br>
                    }<br>                });<br>                map.addControl(info);<br>                info.activate();*/<br>                <br>                /* //Create a Format object<br>                var vector_format = new OpenLayers.Format.GeoJSON({});<br>
                var vector_protocol = new OpenLayers.Protocol.HTTP({<br>                    url: &#39;ex5_data.json&#39;,<br>                    format: vector_format<br>                });<br>                var vector_strategies = [new OpenLayers.Strategy.Fixed()];<br>
                //Create a vector layer that contains a Format, Protocol, and Strategy class<br>                vector_layer = new OpenLayers.Layer.Vector(&#39;More Advanced Vector Layer&#39;,{<br>                        protocol: vector_protocol,<br>
                        strategies: vector_strategies<br>                    });<br>                map.addLayer(vector_layer);^*/<br>                <br>                /*<br>                <br>                var feature_data = {<br>
                    &quot;type&quot;: &quot;FeatureCollection&quot;,<br>                    &quot;features&quot;: [<br>                        {&quot;type&quot;:&quot;Feature&quot;,&quot;properties&quot;:{},<br>                            &quot;geometry&quot;:{&quot;type&quot;:&quot;Point&quot;, &quot;coordinates&quot;:[-81, 42]}},<br>
                        {&quot;type&quot;:&quot;Feature&quot;,&quot;properties&quot;:{},<br>                            &quot;geometry&quot;:{&quot;type&quot;:&quot;Point&quot;, &quot;coordinates&quot;:[-82, 43]}},<br>                        {&quot;type&quot;:&quot;Feature&quot;,&quot;properties&quot;:{},<br>
                            &quot;geometry&quot;:{&quot;type&quot;:&quot;Point&quot;, &quot;coordinates&quot;:[-80, 41]}},<br>                        {&quot;type&quot;:&quot;Feature&quot;,&quot;properties&quot;:{},<br>                            &quot;geometry&quot;:{&quot;type&quot;:&quot;Point&quot;, &quot;coordinates&quot;:[19, -24]}},<br>
                        {&quot;type&quot;:&quot;Feature&quot;,&quot;properties&quot;:{},<br>                            &quot;geometry&quot;:{&quot;type&quot;:&quot;Point&quot;, &quot;coordinates&quot;:[4, 42]}},<br>                        {&quot;type&quot;:&quot;Feature&quot;,&quot;properties&quot;:{},<br>
                            &quot;geometry&quot;:{&quot;type&quot;:&quot;Point&quot;, &quot;coordinates&quot;:[32, 35]}},<br>                    ]<br>                }<br>                <br>                var poligono1 = new OpenLayers.Feature.Vector(<br>
                    //We&#39;ll make a polygon from a linear ring object, which consists of points<br>                    new OpenLayers.Geometry.Polygon(new OpenLayers.Geometry.LinearRing(<br>                    [new OpenLayers.Geometry.Point(-124.2, 41.9),<br>
                    new OpenLayers.Geometry.Point(-120.1, 41.9),<br>                    new OpenLayers.Geometry.Point(-120, 39),<br>                    new OpenLayers.Geometry.Point(-114.5, 34.9),<br>                    new OpenLayers.Geometry.Point(-114.7, 32.7),<br>
                    new OpenLayers.Geometry.Point(-117.1, 32.5),<br>                    new OpenLayers.Geometry.Point(-120, 34),<br>                    new OpenLayers.Geometry.Point(-123.7, 38.4)<br>                    //We won&#39;t pass in the first point, the polygon will close automatically<br>
                    ]<br>                    )),<br>                {<br>                    &#39;location&#39;: &#39;Fanghorn Forest&#39;,<br>                    &#39;description&#39;: &#39;Land of the Ents&#39;<br>                }<br>
                );<br>                // Create a format object <br>                var format_geojson = new OpenLayers.Format.GeoJSON({});<br>                //Create an array of strategy objects<br>                var vector_strategies = [new OpenLayers.Strategy.Cluster({distance:42})];<br>
                //Create a vector layer that contains a Format, Protocol, and Strategy class<br>                var vector_layer1 = new OpenLayers.Layer.Vector(&#39;More Advanced Vector Layer&#39;,{<br>                    strategies: vector_strategies<br>
                });<br>                //Load in the data<br>                vector_layer1.addFeatures(format_geojson.read(feature_data));<br>                map.addLayer(vector_layer1);<br>                <br>                */<br>
                <br>            }<br>    <br>        &lt;/script&gt;<br>        &lt;style type=&quot;text/css&quot;&gt;<br>            #map {<br>                width: 600px;<br>                height: 400px;<br>                border: 1px solid;<br>
            }<br>        &lt;/style&gt;<br>        &lt;title&gt;Curso de OpenLayers - Ejemplo 1 - Capas WMS&lt;/title&gt;<br>    &lt;/head&gt;<br>    &lt;body onload=&quot;init()&quot;&gt;<br>        &lt;h1 id=&quot;title&quot;&gt;Curso de OpenLayers - Ejemplo 1 - Capas WMS&lt;/h1&gt;<br>
        &lt;div id=&quot;map&quot;&gt;<br>        &lt;/div&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;<br><br>ubicado en c:\ms4w\apps\cursoopenlayers\curso1.html<br><br>8) Cuando ejecuto dicho html en IE 8 me sale el error:<br>
    <br>    Mensaje: Acceso denegado.<br><br>    Línea: 105 <br>    Carácter: 13 <br>    Código: 0<br>    URI: file:///C:/ms4w/apps/cursoopenlayers/openlayers/lib/OpenLayers/Request/XMLHttpRequest.js<br><br><br>   Y cuando ejecuto en Firefox 9 con Firebug me sale en la consola:<br>
 <br>   Access to restricted URI denied<br>   oRequest._object.send(oRequest._data);                    XMLHttpRequest.js (línea 220)<br><br>   ---------------------------------------------------------------------------------------------------<br>
<br>   En el IE 8 no se ve nada, pero en Firefox 9 se ve la capa WMS, por lo que supongo que el problema es la capa WFS.<br>   <br>   Que me falta para que salga bien?<br><br>   Al parecer al lanzar el html no encuentra al proxy.cgi, me falta configurar algo mas?<br>
<br>Mis disculpas si es algo facil, pero he estado tratando toda la tarde y revisando en internet.<br><br>Espero su ayuda al respecto.<span class="HOEnZb"><font color="#888888"><br><br>Javier Quispe<br><br><br><br><br><br>
<br>   <br><br><br>  <br><br>                                               </font></span></div></div>
<br>_______________________________________________<br>
Spanish mailing list<br>
<a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a><br>
<a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
<a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><font face="&#39;courier new&#39;, monospace">|----------------------------------------------------------------</font><div><font face="&#39;courier new&#39;, monospace">| Web Page: </font><a href="http://www.acuriousanimal.com" style="font-family:&#39;courier new&#39;,monospace" target="_blank">http://www.acuriousanimal.com</a></div>
<div><span style="font-family:&#39;courier new&#39;,monospace">| Blog: <a href="http://www.acuriousanimal.com/blog" target="_blank">http://www.acuriousanimal.com/blog</a></span><br><span style="font-family:&#39;courier new&#39;,monospace">| Twitter: <a href="http://twitter.com/#%21/acanimal" target="_blank">@acanimal</a></span><br>
<font face="&#39;courier new&#39;, monospace">|----------------------------------------------------------------</font><br><font face="&#39;courier new&#39;, monospace">| A crazy mix site: </font><a href="http://www.astracanada.net" style="font-family:&#39;courier new&#39;,monospace" target="_blank">http://www.astracanada.net</a><br>
<font face="&#39;courier new&#39;, monospace">| Old Virtual Globe project:</font><a href="http://theballoonproject.blogspot.com" style="font-family:&#39;courier new&#39;,monospace" target="_blank">http://theballoonproject.blogspot.com</a><br>
<font face="&#39;courier new&#39;, monospace">|----------------------------------------------------------------</font></div><div><font face="&#39;courier new&#39;, monospace"><div>|   _      __                           </div>
<div>|  /_)    (_ ` _   _  _)_ o  _   _   _  </div><div>| / /  o .__) (_( ) ) (_  ( (_( (_( (_) </div><div>|                                 _)    </div></font></div><div><font face="&#39;courier new&#39;, monospace"></font><span style="font-family:&#39;courier new&#39;,monospace">|----------------------------------------------------------------</span></div>
<br>