Click here to Skip to main content
15,882,114 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
While we were installing the map point 2011, I figured out that it do gives option to draw zones on map where ever we want as shown in picture (one), but if I want to draw more than 1 zone it doesn’t let me as we can draw zones differently but cannot connect 1 zone to another…actually the purpose is to remove gap among plots. In picture (Two) you can see the plots are drawn without gaps. Can someone help me out giving me idea how to draw zone like picture (Two). here is the code line to draw zone in map point 2011. i am drawing full zone, how to connect lines one zone to another

c# - Connect two zones in mappoint 2011 - Stack Overflow[^]

What I have tried:

C#
object shapeItem = 1;    
Shape objShape = axMappointControl1.ActiveMap.Shapes.get_Item(ref shapeItem); 
   if (objShape != null)  
  {     
   if (objShape.Type == GeoShapeType.geoTextBox || objShape.Type == GeoShapeType.geoFreeform)  
      {       List<gen_zone_polyvertice> list = new List<gen_zone_polyvertice>();   
         int? lineWeight = null;    
        int? lineForeColor = null;     
       System.Drawing.Color myColor = System.Drawing.Color.Red;     
       int iRed = System.Drawing.ColorTranslator.ToOle(myColor);      
      string shapeType = "";           
 foreach (Shape shp in axMappointControl1.ActiveMap.Shapes) 
           {         
       if (shp.Line.ForeColor == iRed || shp.Name.ToString() == "text")     
           {   
                 continue;    
            }   
             if (lineWeight == null)       
         {       
             lineWeight = shp.Line.Weight;    
            }          
      if (lineForeColor == null)      
          {             
       lineForeColor = shp.Line.ForeColor;  
              }           
     try         
       {              
      shapeType = "";     
                             
   List<MapPoint.Location> locArr = ((object[])shp.Vertices).Select(c => (MapPoint.Location)c).ToList<MapPoint.Location>();    
    list.AddRange((from a in locArr   
select new Gen_Zone_PolyVertice     
     {      
            PostCode = "",     
    Latitude = a.Latitude,                            
     Longitude = a.Longitude                               
  }).ToList());         
       }     
           catch (Exception ex)       
         {}</gen_zone_polyvertice></gen_zone_polyvertice>
Posted
Updated 5-May-16 21:25pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900