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

Does anyone know how to do the following.

Say I have a map and I draw a rectangle over the state of Texas. ArcMapControl.TrackRectangle returns the lat,lon of this. However, what I'd like is to actually get the X,Y coords of the screen. For instance if the map was 500 px wide and 450 tall I'd expect something like

top = 257 bottom = 242 left = 146 right = 167

Anyone know if there is an easy way to convert this?

share|improve this question
up vote 2 down vote accepted
activeView = mapControl.Map as IActiveView;
ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay;
ESRI.ArcGIS.Display.IDisplayTransformation displayTransformation = screenDisplay.DisplayTransformation;
int x, y; 
displayTransformation.FromMapPoint(yourIPoint, out x, out y);

should pop out your x,y

share|improve this answer

Take a look at IDisplayTransformation.FromMapPoint method, there is also a snippet that does this the other way around here that you can take a look at: Convert Display Pixel to Map Units Snippet

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.