One application give me the coordinates and I have set the extent view as per those coordinates in ArcGis. Do you have idea?

2656
4
Jump to solution
07-02-2015 09:46 PM
Highlighted
New Contributor

One application give me the coordinates and I have set the extent view as per those coordinates in ArcGis. Do you have idea?

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Occasional Contributor III

You can try the following

pMxDoc.ActiveView.Extent = <your envelope from the coordinates that you get>;
pMxDoc
.ActiveView.Refresh(); // you can also use partial refresh

Other way if that you can get the current Scale and use center at of your envelope center or if you have a single point

axMapControl.CenterAt(<Point>);
axMapControl
.MapScale = <current MapScale>;
axMapControl
.Refresh();

View solution in original post

Reply
0 Kudos
4 Replies
Highlighted
Occasional Contributor III

Can you please elaborate what exactly are you doing?

One application give me the coordinates

Do you know what is the Spatialreference of those coordinates? Can you give me what those coordinates look like?

and I have set the extent view as per those coordinates in ArcGis. Do you have idea?

I think you are asking that you have to set the extents in ArcGIS Desktop? Which product are you working on and what is the programming language/API you are using?

Reply
0 Kudos
Highlighted
New Contributor

yes i have to set the extent view in Arcgis Desktop, The coordinates are in WGS84.

And i am using c#, Arcobjects.

Reply
0 Kudos
Highlighted
Occasional Contributor III

You can try the following

pMxDoc.ActiveView.Extent = <your envelope from the coordinates that you get>;
pMxDoc
.ActiveView.Refresh(); // you can also use partial refresh

Other way if that you can get the current Scale and use center at of your envelope center or if you have a single point

axMapControl.CenterAt(<Point>);
axMapControl
.MapScale = <current MapScale>;
axMapControl
.Refresh();

View solution in original post

Reply
0 Kudos
Highlighted
New Contributor

Thanks, Its working fine for me.

Reply
0 Kudos