[OpenLayers-Dev] Dynamic SLD in a GetMap-Request via HTTP-POST

Eric Lemoine eric.lemoine at camptocamp.com
Thu May 7 12:13:09 EDT 2009


On Thursday, May 7, 2009, Duarte Carreira <DCarreira at edia.pt> wrote:
> Hi.
>
> Maybe this will help: http://squio.nl/blog/2006/08/25/remotely-extracting-image-thumbnails-with-binary-ajax/

I suppose this kind of things only work within FireFox extensions?

Thanks for the link. Cheers,



>
> Duarte
>
> -----Mensagem original-----
> Date: Thu, 7 May 2009 10:32:29 +0200
> From: Ingo Weinzierl <ingo.weinzierl at intevation.de>
> Subject: Re: [OpenLayers-Dev] Dynamic SLD in a GetMap-Request via
>         HTTP-POST
> To: dev at openlayers.org
> Message-ID: <200905071032.35955.ingo.weinzierl at intevation.de>
> Content-Type: text/plain; charset="iso-8859-15"
>
> Hi people,
>
> after a little research yesterday I found out that the W3C specification of
> the XMLHttpRequest does not provide the responseStream attribute. So the
> implementation of FireFox3 does not implement it as well.
>
> Thinking about a resolution to display images in a browser requested via
> HTTP-POST, the only idea I have at moment is to decode the bytes of the image
> into base64 encoding and to put this into the 'src'-attribute of the <img>
> tag.
> Resulting problems out of this are:
>  - base64 encoding in the <img> tag is supported  in FireFox3 and IE8 only
>  - decoding the byte stream of the image with JavaScript is maybe slow
>
> Do you have any other ideas?
>
> Regards,
> Ingo
>
> On Wednesday 06 May 2009 09:25:18 Ingo Weinzierl Hi wrote:
>> Hi,
>>
>> On Thursday 30 April 2009 20:20:46 Tim Schaub wrote:
>> > Hey-
>> >
>> > Andreas Hocevar wrote:
>> > > Hi Ingo,
>> > >
>> > > Ingo Weinzierl wrote:
>> > >> I am thinking about a topic of my thesis in the next month. While
>> > >> working on a project using OpenLayers, I asked myself if it's possible
>> > >> to send a WMS GetMap-Request via HTTP-POST to include a SLD.
>> > >> I have searched for this problem via google, the mailing-lists and in
>> > >> the examples of OL, but the only way to use SLDs in a GetMap-Request I
>> > >> could find is via url to a file or in a HTTP-GET url, which has
>> > >> limited length. The idea of my tutor and me is to realize a WMS
>> > >> GetMap-Request via HTTP-POST to be able to include longer SLDs.
>> > >>
>> > >> What are you thinking about this idea? Or is it absolutely impossible?
>> > >
>> > > It is actually a good idea, and I would already have developed
>> > > OpenLayers support for it if there weren't other things of higher
>> > > priority. Sending WMS requests via POST is covered by the WMS spec, but
>> > > things become complicated when you want to display the resulting image
>> > > in a browser. Tim Schaub and I have played around a bit with
>> > > XMLHttpRequest and responseStream [1], but it did not work as described
>> > > there. Maybe we were just missing something obvious.
>> >
>> > Yeah, my (quick) assumption was that responseStream was not available in
>> > FF3 (at least).
>> >
>> >  >>> var req = new XMLHttpRequest()
>> >  >>> req.open("GET", ".", false);
>> >  >>> req.send(null)
>> >
>> > GET http://localhost/    200 OK    15ms
>> >
>> >  >>> typeof req.responseStream
>> >
>> > "undefined"
>> >
>> > So, despite being a "perfectly reasonable way" [1] to request images, I
>> > haven't seen it work.  Happy to be shown otherwise.
>>
>> After a little investigation, it seems that there are more people arround
>> having this problem with responseStream. Maybe I can find somebody of the
>> google team who can help at that point. Otherwise I will search the web for
>> this problem.
>>
>> > Tim
>> >
>> > [1]
>> > http://n2.nabble.com/Request---ProxyHost-Question-td2190618.html#a2191803
>> >
>> > > Having said that: if you want to develop this for OpenLayers, I'll be
>> > > willing to mentor.
>>
>> Thanks, that sounds nice. My thesis starts not until july, but I gonna
>> contact you when I start working on it.
>>
>> > > Regards,
>> > > Andreas.
>> > >
>> > > [1]
>> > > http://code.google.com/support/bin/answer.py?answer=79663&topic=11366#s
>> > >ce nario1
>> > >
>> > >> Regards,
>> > >> Ingo
>> > >>
>> > >>
>> > >> ----------------------------------------------------------------------
>> > >>--
>> > >>
>> > >> _______________________________________________
>> > >> Dev mailing list
>> > >> Intevation GmbH, Neuer Graben 17, 49074 Osnabr?ck; AG Osnabr?ck, HR B 18998
> Gesch?ftsf?hrer:   Frank Koormann,  Bernhard Reiter,  Dr. Jan-Oliver Wagner
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Dev mailing list