Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?f

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
I bet that's it. Thanks. –  zetar Mar 19 '13 at 21:54
add comment

Your Answer

 
discard

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.