[Cartoweb-users] Full extent via Ajax - again

Dirk Jesko ml.dje at geocontent.de
Fri Apr 27 10:00:27 EDT 2007


Hello,

I finally managed to work on implementing the full extent function via 
Ajax. What I did is adding 'full_extent=full_extent&' to the Post 
request in Location.ajax.js:

AjaxPlugins.Location.Actions.FullExtent = {
    buildPostRequest: function(argObject) {
        return 'full_extent=full_extent&'+AjaxHandler.buildPostRequest();
    }
};

and calling handleFullExtent in ClientLocation::handleHttpPostRequest, 
if full_extent is set in the request.

if (!empty($request['full_extent'])) {
    $this->locationRequest = $this->handleFullExtent();
    if (!is_null($this->locationRequest)) {
        return;
    }
}

The action is triggered in dhtmlInit.js. This works, but I would like to 
know if this is the/a correct way.

What I am wondering about is the handleApplicationTool function. If the 
complete form is submitted, this function is called and handles the full 
extent by calling the handleFullExtent function. But, if the request is 
posted via Ajax, handleApplicationTool is not executed.

Regards,
Dirk



More information about the Cartoweb-users mailing list