Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

First post - apologies if it's a simple question!

I am basically looking to have a JS API service which will populate a datagrid with all of the points visible in the current map extent. As a user zooms in or out, the number of records returned will change to reflect what is in the current extent.

I have been looking at the findPointsInExtent examples in the esri JavaScript examples, but am not sure how to edit the these examples to go from a user defined rectangle to the map extent as described above.

Many thanks,

share|improve this question

When you create map object, you can specify the extends as below:

 map = new esri.Map("map", {
          extent: esri.geometry.geographicToWebMercator(new esri.geometry.Extent(-125.90, 44.60, -114.65, 50.22, new esri.SpatialReference({wkid:4326}))),

Then latter you can change the map extends values as below:

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.