Hi,
i trying to put a EditingTool Control in my map. My problem is that the
editing toolbar doesn't work correctly.
I need to use a projection EPSG:23030 on the layers that i show,
because of that, i need to put on the vector layer the projection, a
maxExtent and a resolution, in other cases
it doesn't paint anything.
In the cases that paint something, the behaviour is:
1) It paints the features but only when i press double click (at the time i
am drawing it doesn't paint anything), in big scales.
2) In small scale the behaviour is different, it shows me the features at
the same time i am drawing but when i do a double click
it doesn't paint anything.

what i am doing wrong?

thanks very much.
The code is:
------------------------------------------------------------------------------------------------------------------
<html xmlns="http://www.w3.org/1999/xhtml";>
 <head>
   <style type="text/css">
       #map {
           width: 800px;
           height: 475px;
           border: 1px solid black;
       }
   </style>
   <script src="../lib/OpenLayers.js"></script>
   <script src="../lib/Firebug/debug.js"></script>
<script type="text/javascript">
       <!--
       var lon = 5;
       var lat = 40;
       var zoom = 5;
       var map, layer;

       function init(){

           map = new OpenLayers.Map( 'map', { controls: [] } );

       layer = new OpenLayers.Layer.WMS( "PARCELA","
http://192.168.212.20:84/cgi-bin/mapserv.exe?",{layers: 'PARCELASDE'},
           {projection:"EPSG:23030",maxExtent:new OpenLayers.Bounds(
182295.49,4135348.22,225743.19,4171432.55),maxResolution:'100'} );
 vlayer = new OpenLayers.Layer.Vector(
"Editable",{projection:"EPSG:23030",maxExtent:new OpenLayers.Bounds(
182295.49,4135348.22,225743.19,4171432.55),maxResolution:'100'} );
   map.addLayer(vlayer);
   map.addLayer(layer);


           map.addControl(new OpenLayers.Control.PanZoomBar());
           map.addControl(new OpenLayers.Control.EditingToolbar(vlayer));

//if (!map.getCenter())
                     map.zoomToMaxExtent();
       }
       // -->
   </script>
 </head>
 <body onload="init()">
   <div id="panel"></div>
   <div id="map"></div>
 </body>
---------------------------------------------------------------------------------------------------------------------------------------------------
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to