Thanks for your answeres! :)<br>but now in the same point with gml features changing coordinates in the map.<br><br>In options for the mep object I define this projections:<br><br>var options = {numZoomLevels: 20,<br> projection: new OpenLayers.Projection("EPSG:900913"),<br>
displayProjection: new OpenLayers.Projection("EPSG:4623")};<br><br>and for my GML layer i try with:<br><br>map.addLayer(new OpenLayers.Layer.GML("GML",<br> "<a href="http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml">http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml</a>",<br>
{format: OpenLayers.Format.GML,<br> formatOptions: {<br> extractStyles: true, <br> extractAttributes: true}<br> }<br> ) <br> );<br><br>And defining the external and internal projection and alwais the same problem...my layer in the middle of Atlantic ocean, when I zoom to a village, the error its minimal, but if I pam to the map the layer chages location!!!<br>
Any sugestion to fix it?<br>Thanks<br><br><div class="gmail_quote">2008/6/25 Christopher Schmidt <<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Wed, Jun 25, 2008 at 02:52:19PM +0200, David Martinez Morata wrote:<br>
> Hello,<br>
> I try to put this layer in a map but...<br>
><br>
> map.addLayer(new OpenLayers.Layer.GML("GML",<br>
> "<br>
> <a href="http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml" target="_blank">http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml</a>",<br>
> {format: OpenLayers.Format.KML},<br>
> {formatOptions: {<br>
> extractAttributes: true,<br>
> internalProjection: new OpenLayers.Projection('EPSG:900913'),<br>
> externalProjection: new OpenLayers.Projection('EPSG:4326')}<br>
> }<br>
> )<br>
> );<br>
> I don't have a graphical image of the elements!!!<br>
> You have a sugestion?<br>
<br>
</div></div>format and formatOptions are both options to the layer. They belong in<br>
the same hash/argument, not two different ones.<br>
<br>
You don't have extractStyles in your formatOptions. You may need that to<br>
actually get the styles.<br>
<br>
You don't need to define internalProjection and externalProjection:<br>
instead, just put in a 'projection: new OpenLayers.Projection(4326)'<br>
option.<br>
<br>
Your filename is GML, but your foramt is KML. That seems weird.<br>
<br>
Regards,<br>
<font color="#888888">--<br>
Christopher Schmidt<br>
MetaCarta<br>
</font></blockquote></div><br>