[OpenLayers-Users] OpenLayers.Protocol.HTTP and Asynchronous request
Diego Guidi
diegoguidi at gmail.com
Fri Jul 19 03:54:56 PDT 2013
> i have to introduce all the rest of code inside the callback request
I don't understand, you can simply put the code inside a function and
then call this function in the callback.
syncronous ajax requests (where A is for Asynchoronous) are "evil", if
you need to use this stuff, you're made a mistake.
Diego Guidi
On Fri, Jul 19, 2013 at 12:50 PM, <islanis at infomed.sld.cu> wrote:
> "Diego Guidi" <diegoguidi at gmail.com> escribió:
>
>
>> why simply not start request 2 after request 1, i.e inside the
>> callback response from request 1?
>
> In the last instance, i am gonna to do that, but if i do that i have to
> introduce all the rest of code inside the callback request, and i dont want
> to do that, i know that openlayers use XMLHttpResquest object to do do all
> the requests, in some where must be a place or a tweak where i can activate
> or deactivate to turn off the asynchronous's transactions mode, that will be
> a clean job, in other way will not, but thanks.
>
>>
>> Diego Guidi
>>
>>
>> On Fri, Jul 19, 2013 at 1:36 AM, J.Alejandro Martinez Linares
>> <islanis at infomed.sld.cu> wrote:
>>>
>>> Hi people i need hel from you, i need to do some synchronized tasks by
>>> order
>>> and using
>>>
>>> OpenLayers.Protocol.HTTP i can't do it because the request are not made
>>> by
>>> order, please help how coud i fix this
>>> i execute this:
>>>
>>> //--------------------------------------------------------------------------------------------
>>> var grenseProtocol = new OpenLayers.Protocol.HTTP({
>>> format: new OpenLayers.Format.GML(),
>>> async: false,
>>> url: "http://" + host + "/geoserver/wfs",
>>> params: {
>>> service: "WFS",
>>> request: "GetFeature",
>>> version: "1.0.0",
>>> typename: featureTypes,
>>> filter: filterStr
>>> }
>>> });
>>>
>>> //llamamos al WFS
>>> grenseProtocol.read({
>>> readWithPOST: true,
>>>
>>> callback: function(resp) {
>>> console.log('1');
>>> }
>>> });
>>> console.log('2');
>>> //---------------------------------------------------
>>> and the result is this
>>> 2
>>> 1
>>> int firebug and it would be like this:
>>> 1
>>> 2
>>>
>>>
>>>
>>>
>>> thanks to all
>>>
>>>
>>>
>>> --
>>>
>>> Este mensaje le ha llegado mediante el servicio de correo electronico que
>>> ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema
>>> Nacional de Salud. La persona que envia este correo asume el compromiso
>>> de
>>> usar el servicio a tales fines y cumplir con las regulaciones
>>> establecidas
>>>
>>> Infomed: http://www.sld.cu/
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> --
>
> Este mensaje le ha llegado mediante el servicio de correo electronico que
> ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema
> Nacional de Salud. La persona que envia este correo asume el compromiso de
> usar el servicio a tales fines y cumplir con las regulaciones establecidas
>
> Infomed: http://www.sld.cu/
>
More information about the Users
mailing list