Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I add a marker symbol to an ArcGIS Engine MapControl at a specific coordinate?

share|improve this question
    /// <summary>
    /// Places a marker on a map at an X and Y position.
    /// </summary>
    /// <param name="map">The map to place the dot on.</param>
    /// <param name="mapX">The X coordinate for the dot.</param>
    /// <param name="mapY">The Y coordinate for the dot.</param>
    /// <param name="markerSymbol">An IMarkerSymbol object describing the highlight symbol.</param>
    public static void DropMarkerOnMap(IMap map, double mapX, double mapY,
        IMarkerSymbol markerSymbol)
        IActiveView av = (IActiveView) map;
        IGraphicsContainer gc = av.GraphicsContainer;
        IPoint pt = new PointClass();
        pt.X = mapX;
        pt.Y = mapY;
        IMarkerElement ptElem = new MarkerElementClass();
        ptElem.Symbol = markerSymbol;
        IElement elem = (IElement) ptElem;
        elem.Geometry = pt;
        gc.AddElement(elem, 0);
        av.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, av.Extent);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.