1

When I use this code (from the example):

        ESRI.ArcGIS.Client.Geometry.Envelope myEnvelope = new ESRI.ArcGIS.Client.Geometry.Envelope();
        myEnvelope.XMin = -130;
        myEnvelope.YMin = 5;
        myEnvelope.XMax = -70;
        myEnvelope.YMax = 65;
        mapControl.Extent = myEnvelope;

The map is centered over that ever-popular and fascinating point off the coast of Africa: 0,0.

What am I doing wrong?

1 Answer 1

3

What's the coordinate system aka spatial reference of the map? If it's 3857 / Web Mercator, these lat/lon values are probably being interpreted as xy values in meters. You may need to project the envelope or the points before creating the envelope. First, you might try assigning a geographic coordinate system to the envelope but I don't know if it will work.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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