Problem with writing the srsName into gml output in OpenLayers

المشرف العام

Administrator
طاقم الإدارة
I am trying to write out my geometry in gml format after it is drawn in OpenLayers. Actually it is working fine, I get the gml like this:

8.62975388121127,46.34818691143132 8.761589818711352,46.590322794368646 9.124138646836665,46.43911409951752 8.805535131211348,46.24951148519901 8.62975388121127,46.34818691143132But unfortunately I need it to have the coordinate system (srsName) defined in it, like this:

8.62975388121127,46.34818691143132 8.761589818711352,46.590322794368646 9.124138646836665,46.43911409951752 8.805535131211348,46.24951148519901 8.62975388121127,46.34818691143132Here is my code:

draw.events.register('featureadded', this, function(evt) { var feat1 = vectors.features; var gml = new OpenLayers.Format.GML({ format: OpenLayers.Format.GML.v3, formatOptions: { srsName: "urn:x-ogc:def:crs:EPSG:4326", } }); for (var i=0; i
 
أعلى