[OpenLayers-Users] Problem with gml layer.
Christopher Schmidt
crschmidt at metacarta.com
Wed Jun 25 09:13:46 EDT 2008
On Wed, Jun 25, 2008 at 02:52:19PM +0200, David Martinez Morata wrote:
> Hello,
> I try to put this layer in a map but...
>
> map.addLayer(new OpenLayers.Layer.GML("GML",
> "
> http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml",
> {format: OpenLayers.Format.KML},
> {formatOptions: {
> extractAttributes: true,
> internalProjection: new OpenLayers.Projection('EPSG:900913'),
> externalProjection: new OpenLayers.Projection('EPSG:4326')}
> }
> )
> );
> I don't have a graphical image of the elements!!!
> You have a sugestion?
format and formatOptions are both options to the layer. They belong in
the same hash/argument, not two different ones.
You don't have extractStyles in your formatOptions. You may need that to
actually get the styles.
You don't need to define internalProjection and externalProjection:
instead, just put in a 'projection: new OpenLayers.Projection(4326)'
option.
Your filename is GML, but your foramt is KML. That seems weird.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list