ThinkGeo.com    |     Documentation    |     Premium Support

Convertion from PointShape to Other Shapes?

 Hi to all,


 


     How can i convert PointShape to BaseShape and AreaBaseShape?


 


the below is the scenario.


 


           PointShape pointShape = e.WorldLocation;


            BaseShape baseShp = (BaseShape)pointShape;


            AreaBaseShape areaMapShp = (AreaBaseShape)baseShp;    // Error


 


Thank you in Advance


 


 



Hello Rajesh, 
  
 Sorry I don’t think one PointShape can convert to AreaBaseShape directly, you will need at least 3 points to draw a Area. 
  
 I don’t know what do you want to do with this convert, maybe you can try like : 
  
 AreaBaseShape  areaBaseShape = new EllipseShape(pointShape , 1, 1); 
  
 Regards, 
  
 Gary