ThinkGeo.com    |     Documentation    |     Premium Support

How to retain added vertices in polygon draw mode?

Hi.


Is it possible to retain a vertex when drawing a polygon?


This is current behaviour of the draw mode:


:


This is desired behaviour of the draw mode - vertices are still retained (displayed):



 


This is the style I'm using:


 



        var OnMapCreating = function (map) {
          OpenLayers.Feature.Vector.style = {
            'default': {
              fillColor: "yellow",
              fillOpacity: 0.4,
              hoverFillColor: "white",
              hoverFillOpacity: 0.8,
              strokeColor: "blue",
              strokeOpacity: 1,
              strokeWidth: 1,
              strokeLinecap: "round",
              strokeDashstyle: "solid",
              hoverStrokeColor: "red",
              hoverStrokeOpacity: 1,
              hoverStrokeWidth: 0.2,
              pointRadius: 20,
              hoverPointRadius: 10,
              hoverPointUnit: "%",
              pointerEvents: "visiblePainted",
              cursor: "inherit"
            },
            'select': {
              fillColor: "yellow",
              fillOpacity: 0.4,
              hoverFillColor: "white",
              hoverFillOpacity: 0.8,
              strokeColor: "blue",
              strokeOpacity: 1,
              strokeWidth: 1,
              strokeLinecap: "round",
              strokeDashstyle: "solid",
              hoverStrokeColor: "red",
              hoverStrokeOpacity: 1,
              hoverStrokeWidth: 0.2,
              pointRadius: 20,
              hoverPointRadius: 10,
              hoverPointUnit: "%",
              pointerEvents: "visiblePainted",
              cursor: "pointer"
            }
          };
        }


Hi Sergei, 
  
 We have done a depth investigate on Open layers, but find it’s complex to do that. Also, if you have any time to do a research on Open layers about this and find It can work with pure Open Layers Library, please let us know, we can assist you to work with Mvc Edition. 
  
 Sorry for the inconvenience. 
  
 Best regards, 
  
 Gary