aviabunin

How to mark point on the axMapControl?

Discussion created by aviabunin on Feb 15, 2011
The task is to mark some array of points on the axMapControl. Now I use the next procedure:
        private void setMarker(double x, double y){
            ESRI.ArcGIS.Geometry.IEnvelope pEnv = new ESRI.ArcGIS.Geometry.EnvelopeClass();
            ESRI.ArcGIS.Carto.IPictureElement pPictureElement;
            pPictureElement = new ESRI.ArcGIS.Carto.JpgPictureElementClass();
            pPictureElement.ImportPictureFromFile(@"D:/Data/images/Chrysanthemum.jpg");

            pEnv.PutCoords(x, y, x+dx, y+dy);

            pElement = pPictureElement as ESRI.ArcGIS.Carto.IElement;
            pElement.Geometry = pEnv;

            pGraphicContainer = axMapControl1.Map as ESRI.ArcGIS.Carto.IGraphicsContainer;
            pGraphicContainer.AddElement(pElement, 0);

            pActiveView = pGraphicContainer as ESRI.ArcGIS.Carto.IActiveView;
            pActiveView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewGraphics, pElement, pEnv);
    }

where dx,dy - define size of picture. But the problem is - when I magnify scale the image enlage too - it's not a proper way, size of picture must be constant.
How I can solve my problem? and what another way exist to mark temporary points ? may be using special layer or some how else?
Will be appretiate for any advice or reference!

Outcomes