<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Antonio<br>Siguiendo la logica lo movi justo antes de que llegue tu email.<br>Y por fin luego de tanto nadar, se ve la capa WFS.<br>Mil disculpas a todos.<br>Pero en este tema de internet, soy poco conocedor de ello.<br>Muchas gracias a todos por su ayuda.<br>Ya sale en IE8 y en Firefox 9 , y supongo que en los demas browser.<br>Un abrazo a la distancia y nuevamente gracias Antonio por la paciencia.<br>Saludos<br>Javier Quispe<br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Thu, 12 Jan 2012 23:46:50 +0100<br>Subject: Re: [Spanish] Problema de Openlayers con Firefox 9 - Tema ProxyHost<br>From: asantiagop@gmail.com<br>To: spanish@lists.osgeo.org<br><br>Pues debe ser eso.<br>Los ficheros HTML deben estar en el directorio donde el servidor HTTP sirve las paginas.<br>Mueve el curso1.html a tu htdocs y prueba otra vez.<br><br><div class="ecxgmail_quote">2012/1/12 Javier Jose Quispe Varillas <span dir="ltr"><<a href="mailto:jjquispev@hotmail.com">jjquispev@hotmail.com</a>></span><br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">
Antonio<br><br>Acabo de ver como lo llamo, indico lo siguiente:<br><br>1) Lo llamo en el navegador IE 8 asi:<br><br>    C:\ms4w\apps\cursoopenlayers\curso1.html<br><br>2) Lo llamo en el Firefox 9 asi:<br><br>   file:///C:/ms4w/apps/cursoopenlayers/curso1.html<br>
<br>En ambos he puesto : <a href="http://localhost/curso1.html" target="_blank">http://localhost/curso1.html</a>, pero me sale 404 Pagina no encontrada:<br><br>Que me falta?<br><br>Cuando lanzo en browser: <a href="http://localhost" target="_blank">http://localhost</a> sale la pagina de ms4w, pero dicha pagina esta ubicada en: c:\ms4w\Apache\htdocs\index.phtml<br>
<br>La carpeta cursoopenlayers esta fuera de c:\ms4w\Apache\htdocs que seria su equivalente.<br><br>Espero su apoyo.<br><br>Javier Quispe<br>   <br><br><div><div></div><hr>Date: Thu, 12 Jan 2012 23:22:29 +0100<br>Subject: Re: [Spanish] Problema de Openlayers con Firefox 9 - Tema ProxyHost<br>
From: <a href="mailto:asantiagop@gmail.com">asantiagop@gmail.com</a><br>To: <a href="mailto:spanish@lists.osgeo.org">spanish@lists.osgeo.org</a><br><br>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" target="_blank">http://localhost/curso1.html</a>?<br>
<br>Si es con el primero entonces prueba con el segundo.<br><br>Animo.<br><br><br><div>2012/1/12 Javier Jose Quispe Varillas <span dir="ltr"><<a href="mailto:jjquispev@hotmail.com">jjquispev@hotmail.com</a>></span><br>
<blockquote style="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><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br>
"<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>"><br><html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>"><br>
    <head><br>        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><br>        <script type="text/javascript" src="openlayers/lib/OpenLayers.js"></script><br>
        <script type="text/javascript"><br>            var map;<br>            //OpenLayers.ProxyHost = "c:\ms4w\Apache\cgi-bin\proxy.cgi?url=";<br>            OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";<br>
            //OpenLayers.ProxyHost = "\cgi-bin\proxy.cgi?url=";<br>            function init() {<br>                map = new OpenLayers.Map('map');<br>                <br>                /*var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",<br>
                    "<a href="http://vmap0.tiles.osgeo.org/wms/vmap0" target="_blank">http://vmap0.tiles.osgeo.org/wms/vmap0</a>", {layers: 'basic'} );<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("Capa base",<br>                    "<a href="http://tilecache.osgeo.org/wms-c/Basic.py" target="_blank">http://tilecache.osgeo.org/wms-c/Basic.py</a>",<br>
                    {layers: "basic"}<br>                );<br>                map.addLayer(base);                <br>                var wfs = new OpenLayers.Layer.Vector("Capa WFS", {<br>                    strategies: [new OpenLayers.Strategy.Fixed()],<br>
                    protocol: new OpenLayers.Protocol.WFS({<br>                        url: "<a href="http://demo.opengeo.org/geoserver/wfs" target="_blank">http://demo.opengeo.org/geoserver/wfs</a>",<br>                        featureType: "states"<br>
                        //featureNS: "<a href="http://www.openplans.org/topp" target="_blank">http://www.openplans.org/topp</a>"<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({'ascending':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( "Editable" );<br>                var edit_panel = new OpenLayers.Control.EditingToolbar(vector_layer);<br>
                var modify_feature_ctrl = new OpenLayers.Control.ModifyFeature(vector_layer,<br>                {<br>                    title: "Modify Feature",<br>                    displayClass: "olControlModifyFeature"<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: "shiftKey",<br>                    toggleKey: "ctrlKey"<br>                });<br>                getFeature_control.events.register("featureselected", this, function(e) {<br>
                    select_layer.addFeatures([e.feature]);<br>                    modify_control.deactivate();<br>                });<br>                getFeature_control.events.register("featureunselected", 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: '<a href="http://tilecache.osgeo.org/wms-c/Basic.py" target="_blank">http://tilecache.osgeo.org/wms-c/Basic.py</a>',<br>
                    title: 'Identify features by clicking',<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>                            "chicken",<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: 'ex5_data.json',<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('More Advanced Vector Layer',{<br>                        protocol: vector_protocol,<br>
                        strategies: vector_strategies<br>                    });<br>                map.addLayer(vector_layer);^*/<br>                <br>                /*<br>                <br>                var feature_data = {<br>
                    "type": "FeatureCollection",<br>                    "features": [<br>                        {"type":"Feature","properties":{},<br>                            "geometry":{"type":"Point", "coordinates":[-81, 42]}},<br>
                        {"type":"Feature","properties":{},<br>                            "geometry":{"type":"Point", "coordinates":[-82, 43]}},<br>                        {"type":"Feature","properties":{},<br>
                            "geometry":{"type":"Point", "coordinates":[-80, 41]}},<br>                        {"type":"Feature","properties":{},<br>                            "geometry":{"type":"Point", "coordinates":[19, -24]}},<br>
                        {"type":"Feature","properties":{},<br>                            "geometry":{"type":"Point", "coordinates":[4, 42]}},<br>                        {"type":"Feature","properties":{},<br>
                            "geometry":{"type":"Point", "coordinates":[32, 35]}},<br>                    ]<br>                }<br>                <br>                var poligono1 = new OpenLayers.Feature.Vector(<br>
                    //We'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't pass in the first point, the polygon will close automatically<br>
                    ]<br>                    )),<br>                {<br>                    'location': 'Fanghorn Forest',<br>                    'description': 'Land of the Ents'<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('More Advanced Vector Layer',{<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>        </script><br>        <style type="text/css"><br>            #map {<br>                width: 600px;<br>                height: 400px;<br>                border: 1px solid;<br>
            }<br>        </style><br>        <title>Curso de OpenLayers - Ejemplo 1 - Capas WMS</title><br>    </head><br>    <body onload="init()"><br>        <h1 id="title">Curso de OpenLayers - Ejemplo 1 - Capas WMS</h1><br>
        <div id="map"><br>        </div><br>    </body><br></html><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><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="'courier new', monospace">|----------------------------------------------------------------</font><div><font face="'courier new', monospace">| Web Page: </font><a href="http://www.acuriousanimal.com" style="font-family:'courier new',monospace" target="_blank">http://www.acuriousanimal.com</a></div>
<div><span style="font-family:'courier new',monospace">| Blog: <a href="http://www.acuriousanimal.com/blog" target="_blank">http://www.acuriousanimal.com/blog</a></span><br><span style="font-family:'courier new',monospace">| Twitter: <a href="http://twitter.com/#%21/acanimal" target="_blank">@acanimal</a></span><br>
<font face="'courier new', monospace">|----------------------------------------------------------------</font><br><font face="'courier new', monospace">| A crazy mix site: </font><a href="http://www.astracanada.net" style="font-family:'courier new',monospace" target="_blank">http://www.astracanada.net</a><br>
<font face="'courier new', monospace">| Old Virtual Globe project:</font><a href="http://theballoonproject.blogspot.com" style="font-family:'courier new',monospace" target="_blank">http://theballoonproject.blogspot.com</a><br>
<font face="'courier new', monospace">|----------------------------------------------------------------</font></div><div><font face="'courier new', monospace"><div>|   _      __                           </div>
<div>|  /_)    (_ ` _   _  _)_ o  _   _   _  </div><div>| / /  o .__) (_( ) ) (_  ( (_( (_( (_) </div><div>|                                 _)    </div></font></div><div><font face="'courier new', monospace"></font><span style="font-family:'courier new',monospace">|----------------------------------------------------------------</span></div>
<br>
<br>_______________________________________________
Spanish mailing list
<a href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a>
<a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a>
<a href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a></div>                                               </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="'courier new', monospace">|----------------------------------------------------------------</font><div><font face="'courier new', monospace">| Web Page: </font><a href="http://www.acuriousanimal.com" style="font-family:'courier new',monospace" target="_blank">http://www.acuriousanimal.com</a></div>
<div><span style="font-family:'courier new',monospace">| Blog: <a href="http://www.acuriousanimal.com/blog" target="_blank">http://www.acuriousanimal.com/blog</a></span><br><span style="font-family:'courier new',monospace">| Twitter: <a href="http://twitter.com/#%21/acanimal" target="_blank">@acanimal</a></span><br>
<font face="'courier new', monospace">|----------------------------------------------------------------</font><br><font face="'courier new', monospace">| A crazy mix site: </font><a href="http://www.astracanada.net" style="font-family:'courier new',monospace" target="_blank">http://www.astracanada.net</a><br>
<font face="'courier new', monospace">| Old Virtual Globe project:</font><a href="http://theballoonproject.blogspot.com" style="font-family:'courier new',monospace" target="_blank">http://theballoonproject.blogspot.com</a><br>
<font face="'courier new', monospace">|----------------------------------------------------------------</font></div><div><font face="'courier new', monospace"><div>|   _      __                           </div>
<div>|  /_)    (_ ` _   _  _)_ o  _   _   _  </div><div>| / /  o .__) (_( ) ) (_  ( (_( (_( (_) </div><div>|                                 _)    </div></font></div><div><font face="'courier new', monospace"></font><span style="font-family:'courier new',monospace">|----------------------------------------------------------------</span></div>
<br>
<br>_______________________________________________
Spanish mailing list
http://lists.osgeo.org/mailman/listinfo/spanish
http://es.osgeo.org
http://twitter.com/osgeoes</div>                                               </div></body>
</html>