<div dir="ltr"><div><div>Hola Juanjo, <br><br></div>El OpenLayers.Layer.GML está deprecated. Otra cosa es que un KML no es un GML por lo tanto igual no te funcionaria por no son el mismo formato.<br><br></div>Debes usar esta forma para llamar al KML.<br>
<div><div><div><br></div><div>En el parametro url puedes poner directamente el link a tu recurso "<a href="http://localhost/openlayers/MisCapas/CofPol.kml" target="_blank">/openlayers/MisCapas/CofPol.kml</a>"<br>
</div><div><br>var kml = new OpenLayers.Layer.Vector("KML", {<br> strategies: [new OpenLayers.Strategy.Fixed()],<br> protocol: new OpenLayers.Protocol.HTTP({<br> url: "<a href="http://localhost/openlayers/MisCapas/CofPol.kml" target="_blank">http://localhost/openlayers/MisCapas/CofPol.kml</a>",<br>
format: new OpenLayers.Format.KML({<br> extractStyles: true,<br> extractAttributes: true<br> })<br> })<br>});<br>map.addLayer(kml);<br><br></div><div>Saludos,<br></div><div>Bolo<br></div><div><br></div>
</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">El 10 de mayo de 2013 12:26, geodesman <span dir="ltr"><<a href="mailto:juavafer@hotmail.com" target="_blank">juavafer@hotmail.com</a>></span> escribió:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">se ven bien y casan. las capas wms son el OSM y google streets que aunque vienen en 90013 soportan 4326. Y la otra es la orto de la comunidad valenciana q tambien soporta el 4326 asi q por ese lado todo bien. EL kml pues en 4326.<br>
<br>
estoy convencido en q hago defino mal o el path no lo pongo bien<br>
<br>
Date: Fri, 10 May 2013 03:00:59 -0700<br>
From: <a href="mailto:ml-node%2Bs1560n5052520h90@n6.nabble.com">ml-node+s1560n5052520h90@n6.nabble.com</a><br>
<div class="im">To: <a href="mailto:juavafer@hotmail.com">juavafer@hotmail.com</a><br>
Subject: Re: añadir kml desde localhost<br>
<br>
<br>
<br>
2013/5/10 geodesman <[hidden email]>:<br>
<br>
</div><div><div class="h5">> No me muestra ningun error, simplemente no funcioa el visor. Tengo tres capas wms añadidas y van perfectamente, pero cuando activo esta ultima simplemente el visor se queda en blanco y solo aparece el titulo y el marco.<br>
<br>
><br>
<br>
<br>
Eso tiene toda la pinta de que la capa se muestra, pero en blanco (por<br>
<br>
eso dejan de verse las otras). ¿Has comprobado que las proyecciones<br>
<br>
son las correctas? ¿Has comprobado a poner esas capas WMS con esta<br>
<br>
capa KML en otro visor (qgis, gvsig,...) y ver si se ven bien juntas?<br>
<br>
<br>
> El kml lo he hecho yo y en el GIS y en googleearth lo veo perfectamente<br>
<br>
><br>
<br>
> Gracias!<br>
<br>
_______________________________________________<br>
<br>
Spanish mailing list<br>
<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>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div></div><div class="im"> If you reply to this email, your message will be added to the discussion below:<br>
</div> <a href="http://osgeo-org.1560.x6.nabble.com/a-adir-kml-desde-localhost-tp5052506p5052520.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/a-adir-kml-desde-localhost-tp5052506p5052520.html</a><br>
<div class="im"><br>
<br>
<br>
To unsubscribe from añadir kml desde localhost, click here.<br>
<br>
NAML<br>
<br>
<br>
<br>
<br>
--<br>
</div>View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/a-adir-kml-desde-localhost-tp5052506p5052527.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/a-adir-kml-desde-localhost-tp5052506p5052527.html</a><br>
<div class="im HOEnZb">Sent from the OSGeo Spanish Local Chapter mailing list archive at Nabble.com.<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Saludos,<br><br>Bolo<br><a href="http://www.geoinquiets.cat" target="_blank">www.geoinquiets.cat</a><br>
</div>