[OpenLayers-Users] gml as base layer
Francesco Geri
francescogeri at yahoo.it
Sun Jun 24 09:29:25 PDT 2012
Hello everybody,
I would try to use a GML layer like base layer but I always obtain errors. I used this code to load a gml file:
mapx=new OpenLayers.Map('lmap',
{projection: new OpenLayers.Projection('EPSG:900913'),
displayProjection:new OpenLayers.Projection('EPSG:4326'),
controls: []
}
);
var layer = new OpenLayers.Layer.Vector("GML", {
strategies: [new OpenLayers.Strategy.Fixed()],
projection: new OpenLayers.Projection('EPSG:900913')
isBaseLayer:true,
protocol: new OpenLayers.Protocol.HTTP({
url: "dati/catasto_ok.gml",
format: new OpenLayers.Format.GML()
})
});
If I put the layer without the base layer option the layer is loaded perfectly (with a OSM base layer), but when I try to put the GML file like base layer this disappear.
Someone can help me?
Thanks a lot!
Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120624/f672dc7c/attachment-0001.html>
More information about the Users
mailing list