ThinkGeo.com    |     Documentation    |     Premium Support

How to rotate geometry from Edit Overlay?

Hi.

I’m trying to rotate a geometry from Edit Overlay in code.

Seems to be not working or missing something…

Greatly appreciate your support.

Here is the code example:


var editOverlay = Map1.getEditOverlay();
var features = editOverlay.features;
var feature = features[0];
var centroid = feature.geometry.getCentroid();
var angle = 15;
 
feature.geometry.rotate(angle, centroid);
feature.layer.drawFeature(feature);
 
//also tried approach below
//editOverlay.drawFeature(feature);


Figured out: settings.IsRotatable = False



Now I can rotate it.


.EditOverlay(Sub(overlay)
                 overlay.EditSettings(Sub(settings)
                                          settings.IsDraggable = True
                                          settings.IsReshapable = False
                                          settings.IsResizable = False
                                          settings.IsRotatable = False’True
                                      End Sub)


Sergei, 
  
 Great to hear you figure it out. 
 Any questions, please let us know. 
 Thanks, 
 Troy