The current extent of an Esri map can be retrieved as map parameters and used for subsequent filtering of map layers and reports. The extent can be in any coordinate system and must be a simple polygon.
The names of the map extent variables are:
The following steps create a map with a procedure that shows the markers within the current extent when the map is refreshed.
-DEFAULT &MINX=_FOC_NULL
-DEFAULT &MAXX=_FOC_NULL
-DEFAULT &MINY=_FOC_NULL
-DEFAULT &MAXY=_FOC_NULL
DEFINE FILE WF_RETAIL_LITE
LATITUDE = STATE_PROV_CAPITAL_LATITUDE;
LONGITUDE = STATE_PROV_CAPITAL_LONGITUDE;
END
TABLE FILE WF_RETAIL_LITE
PRINT
ID_CUSTOMER
QUANTITY_SOLD
MSRP_US
FST.LATITUDE
FST.LONGITUDE
WHERE RECORDLIMIT EQ 250
WHERE COUNTRY_NAME EQ 'United States'
WHERE LATITUDE GE &MINY
WHERE LATITUDE LE &MAXY
WHERE LONGITUDE GE &MINX
WHERE LONGITUDE LE &MAXX
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
END
This procedure uses WHERE selection tests to show the markers only for the extent that is displayed.


The New Parameters dialog box opens.



When you run the page, all of the markers are displayed on the map, as shown in the following image.

Zoom in and click the button. The map will be refreshed and only markers for that extent are displayed, as shown in the following image.

| WebFOCUS | |
|
Feedback |