[OpenLayers-Users] Implementing a layer for a proprietary WMS-like service

Franz Buchinger fbuchinger at gmail.com
Tue Aug 3 08:01:33 EDT 2010


 Hi Bart,

I'm almost done with my layer implementation. The only problem: my
getURLasync() Method gets triggered far too often (about 3x per pan/zoom
action).

How can I make sure that getURLasync is only triggered once per map action?

Franz

2010/8/3 Bart van den Eijnden (OSGIS) <bartvde at osgis.nl>

> Hi Franz,
>
> check out OpenLayers.Tile.Image.
>
> Best regards,
> Bart
>
> > Hi Bart,
> >
> > thanks for the fast and helpful response!
> >
> > One question though: which class actually invokes the methods
> > OpenLayers.Layer.ArcIMS.getUrl and OpenLayers.Layer.getUrlAsync?
> >
> > They seem to be overriden methods, but i couldn't find them in
> > OpenLayers.Layer.Grid or OpenLayers.Layer.HTTPRequest.
> >
> > kind regards,
> >
> > Franz
> >
> > 2010/8/3 Bart van den Eijnden (OSGIS) <bartvde at osgis.nl>
> >
> >> Hi,
> >>
> >> I would advise you to look at OpenLayers.Layer.ArcIMS which uses a
> >> similar
> >> approach.
> >>
> >> Best regards,
> >> Bart
> >>
> >> > Hi,
> >> >
> >> > I'm a frontend developer and was programming a web viewer for a
> >> > proprietary,
> >> > WMS-like map service.
> >> > I discovered Openlayers one month ago and I'm really fascinated by its
> >> > awesome capabilities, so I decided to integrate our map service in
> >> > OpenLayers.
> >> >
> >> > Here is a short description how the map service works:
> >> >
> >> > The client sends an AJAX request containing the current map bounds,
> >> the
> >> > map
> >> > id and the pixel size of the map.
> >> >
> >>
> map=22&px=1720&py=833&left=2504400&right=2544000&top=5699500&bottom=5669500&type=0
> >> >
> >> > The server responds with the generated map image (url) and the
> >> corrected
> >> > bounds:
> >> > <MapProperties>
> >> >   <mapLeft>2493227.6110444176</mapLeft>
> >> >   <mapTop>5699500</mapTop>
> >> >   <mapRight>2555172.3889555824</mapRight>
> >> >   <mapBottom>5669500</mapBottom>
> >> >   <mapType>0</mapType>
> >> >   <overviewMap>22</overviewMap>
> >> >   <url>
> >> http://localhost/cgmCache/41600065-c3d2-4934-9feb-78a32f6668c8.png
> >> > </url>
> >> > </MapProperties>
> >> >
> >> > The maps are always single-tiled.
> >> >
> >> > My first approach was to write a ProprietaryMapLayer, that executes
> >> the
> >> > map
> >> > request and creates an ImageLayer with the result url and its bounds.
> >> > When the ImageLayer is moved, a new request is performed, the current
> >> > ImageLayer is destroyed and a new one generated. The disadvantage:
> >> there
> >> > are
> >> > now 2 layers representing one map, which leads to confusion in the
> >> layer
> >> > switcher control.
> >> >
> >> > I read over the code of Layer.WMS, which inherits from Layer.Grid and
> >> also
> >> > makes use of Tile.Image, but it's difficult to derive a solution from
> >> it,
> >> > since all the request/response handling is already integrated into the
> >> > layer. Furthermore, WMS simply responds with tile images, whereas I
> >> have
> >> > to
> >> > deal with an xml response.
> >> >
> >> > Any ideas how I could implement my layer?
> >> >
> >> > kind regards,
> >> >
> >> > Franz
> >> > _______________________________________________
> >> > Users mailing list
> >> > Users at openlayers.org
> >> > http://openlayers.org/mailman/listinfo/users
> >> >
> >>
> >>
> >> --
> >> Looking for flexible support on OpenLayers or GeoExt? Please check out
> >> http://www.osgis.nl/support.html
> >>
> >> Bart van den Eijnden
> >> OSGIS
> >> bartvde at osgis.nl
> >>
> >>
> >
>
>
> --
> Looking for flexible support on OpenLayers or GeoExt? Please check out
> http://www.osgis.nl/support.html
>
> Bart van den Eijnden
> OSGIS
> bartvde at osgis.nl
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100803/f811d5ee/attachment.html


More information about the Users mailing list