[OpenLayers-Users] Just another trasformation problem ;)

Arnd Wippermann arnd.wippermann at web.de
Thu Apr 8 11:06:25 EDT 2010


Hi beppe,
 
the projection parameter is at the wrong place. That is the correct place:
 
    var isoline = new OpenLayers.Layer.Vector("isoline", {
            strategies: [new OpenLayers.Strategy.Fixed()],
            projection: epsg2498,
            protocol: new OpenLayers.Protocol.HTTP({
                url: "isoipse_2498.gml",
                format: new OpenLayers.Format.GML()
            })
        });
 
and delete the line
isoline = OpenLayers.Projection.transform(isoline, epsg2498,
map.projection);
that have no effect.
 
you have write correctly a gml layer, but overseen as I, that the projection
belongs not to the protocol.

I have created a little example to show the projection on the fly with
proj4js
http://gis.ibbeck.de/OLClient/examples/armenia_900913.html
 
The gml is in projection EPSG:2498 and map.projection is EPSG:900913.
 
2.
if you want to edit vectors with OpenLayers and then save them, you have to
use WFS-T (with GeoServer, FeatureServer). Or as a simple solution you can
use a serverside script to save your vectors as gml (kml, ...) to your local
drive. Only with strategy save it works not.
 
Arnd
 
 

  _____  

Von: Giuseppe Naponiello [mailto:beppenapo at gmail.com] 
Gesendet: Donnerstag, 8. April 2010 13:43
An: Arnd Wippermann
Cc: users at openlayers.org
Betreff: Re: [OpenLayers-Users] Just another trasformation problem ;)


Thanks for suggestion but doesn't works yet!!!
I found a solution using qgis plugin "ogr2layer", maybe the problem was in
the parameters used in transformation code:

# isoline = OpenLayers.Projection.transform(isoline, epsg2498,
map.projection);

new code is:

# map.addLayer(new OpenLayers.Layer.GML("isoipse_2498
GML","../aramus_data/vector/reproj/isoipse_2498.gml"));

# var extent = new
OpenLayers.Bounds(4970294.552162,4901870.266154,4971024.689123,4902439.54224
4).transform(new #OpenLayers.Projection("EPSG:2498"), new
OpenLayers.Projection("EPSG:900913"));

and now works!!!

Anyway, I would like understand how to write correctly a gml layer!

Another question for you:
the second step is to be able to modify the gml, is it possible with
strategy save?

-beppe-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100408/3d63ecb2/attachment.html


More information about the Users mailing list