ThinkGeo.com    |     Documentation    |     Premium Support

Can i merge polygons on the fly and apply labels/filling accordingly?

I have a polygon layers. Users would like to select several polygons and merge them on the fly (do not change the layer’s data in the database) so these polygons together act like one polygon: one label, one fill color/pattern based on the sum of field value selected.

Thanks,

Guangming

Hi Guangming,

Attached is a sample which shows how to merge polygons to one polygon, please check it out.
Mvc_MergePolygonsToOnePolygon.zip (104.3 KB)
Here are the main points:

  1. Actually, we are using Multipolygon to merge polygons.
  2. For select the feature by click, we are using the API GetFeaturesContaining(), please view the sample

More samples please refer to http://samples.thinkgeo.com/mvcedition/howdoisamples/
If I misunderstood anything here, please provide more information.

Hope it can help,

Thanks,
Emil