ThinkGeo.com    |     Documentation    |     Premium Support

Client Side Event or Postback for any Map Changes

Hi,


I'm building an application with Map Suite Web Edition and it working great, however I have ran across one requirement that I can't see to figure out how to implement.   My application has a layer that contains township range areas that I display on the map.  I currently label these but I also need to populate a grid with all of the areas currently being displayed on the map.  I have accomplished this by using the GetFeaturesInsideBoundingBox API but the problem is when the user does a zoom in or pan on the client side I have no event to key off of to refresh my grid with the new list of townships being displayed on the map.


Is there some server side code or client side code I can implement to always refresh my list and do the spatial query no matter when the user zooms or pans the map? 


Thanks!



Clint, 



We will add a new server side event "Map.ExtentChanged" in the next version which will be released around 20th this month. We have a client side API though, which you can use with the current release. Here is a little sample showing how to use it, the event is raised whenever the map is paned or zoomed. 




var OnExtentChanged = function(map) {
alert("Extent changed, it could trigger PostBack event now.");
}



Thanks, 



Ben



271-OnExtentChangedClientEvent.txt (156 Bytes)