Create a custom marker placement for placing markers around a point


Purpose
This sample shows how a custom marker placement can be created. The marker placement puts markers around a point. The placement of markers can be controlled using number of markers and the radius, which are exposed as graphic attributes.
The sample lists implementation of IGraphicAttributes, IMarkerPlacement, and IPersistVariant interfaces and also shows how the custom class should be registered by ESRI Representation Marker Placement Component Category.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample.

Data has been provided for your use with this sample. It can be found at <Your ArcGIS Developer Kit Install directory>/Samples/data/Representations/representations.gdb.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Open the Visual Studio solution file.
  2. Build the solution.
  3. Open ArcMap, then a map document.
  4. Click the Add Data button to add a point feature class with representations to the map document.
  5. In the Layer Properties dialog box, click the Symbology tab to change the feature renderer to a representation renderer.
  6. Select the representation rule within the representation renderer that you want to add this custom marker placement to.
  7. Select a basic marker symbol in this representation rule or add a new basic marker symbol.
  8. Click the arrow button next to your selected marker symbol layer to open the Marker Placement dialog box, which lists all marker placements. The custom class will be listed under the point input options. Select the Around_Point option.
  9. Select the new custom marker placement to put new marker symbols around the point geometry. Change the values for radius and number or accept the default values.


  10. The Layer Properties dialog box highlighting buttons used in this sample.

AroundPoint.vb Code that lists the custom marker placement implementation
AssemblyInfo.vb Assembly Information
Download the VB.NET files
AroundPointCls.cs ArcObjects code
AssemblyInfo.cs Assembly information
Download the C# files

Download the files for all languages




Additional Requirements
  • A point feature class with representations. One has been provided for you if you want to use it. It is in the provided geodatabase and the point feature class with representations is US_Major_Cities.

Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced