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

3046
4
Jump to solution
07-02-2015 09:46 PM
AnkurWalia
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?

0 Kudos
1 Solution

Accepted Solutions
SachinKanaujia
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

0 Kudos
4 Replies
SachinKanaujia
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?

0 Kudos
AnkurWalia
New Contributor

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

And i am using c#, Arcobjects.

0 Kudos
SachinKanaujia
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();

0 Kudos
AnkurWalia
New Contributor

Thanks, Its working fine for me.

0 Kudos