How to use
See How to use ArcGIS samples for help on running the sample. 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.
- Navigate to this sample's lib folder (firstcustomrenderer/lib) and copy FirstCustomRendererExt.jar into the <ArcGIS Engine Install Dir>/java/lib/ext folder to deploy the custom renderer extension. The extension functionality will become available to you when you start the ArcGIS Engine application.
- Navigate to this sample's bin folder (firstcustomrenderer/bin) and execute the FirstCustomRenderer.jar to start the application. The JFrame is loaded with the states layer loaded into the MapBean, an Open File … button to open additional shapefiles, and a Set Custom Renderer button that is used to apply the custom renderer to the layer.
- Click 'Set Custom Renderer'. Notice that the renderer is applied to the states layer.
- Open wind.shp (point shapefile) or ushigh.shp (polyline shapefile) to see how the custom renderer is applied to these vector types. To achieve this, click the 'Open File …' button.
- Click 'Set .Custom Renderer' to apply the renderer accordingly.
Download the files for Java
cartography/FirstCustomRendererMain.java | Main Java class that is used to consume the custom renderer in an ArcGIS Engine application. |
cartography/FirstCustomRenderer.java | The Java class represents the custom renderer, which implements IFeatureRenderer and contains the draw method inside it. |
See Also:
How to implement custom feature renderersConsuming custom feature renderers
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine Runtime |