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

I'm trying to zoom to a graphic retuned from the query;

        query.OutSpatialReference = MyMap.SpatialReference;
        query.ReturnGeometry = true;

After this query I used myMap.zoomTo(graphic.Geometry) and tried to zoom to a specific extent but nothing happens.

Does anyone know why this does not work?

share|improve this question

I'm not sure what all you're passing into the query, and what the geometry of the layer you're querying might be. First, you should make sure that it does have some sort of geometry. Second, check that the geometry extent makes sense (same spatial reference, and within the map's extent).

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.