wms untiled 'busy loading' message or image

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

wms untiled 'busy loading' message or image

Richard Duivenvoorde
Hi List,

What is the preferred way to implement some kind of 'loading or busy
message' for a slow wms server?

I've got a map with some (faster) tiled reference layers, and one (slow)
untiled wms top layer. While the reference layer loads pretty fast, the
(dynamic) top layer is sometimes loaded after a few seconds. I want to
inform users that they have to be patient for a while :-)

If there is some kind of callback mechanisme possible which is called
when the image is loaded? So I can show an image while loading, and
remove it when this callback function is called.

TIA

Richard Duivenvoorde
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Christopher Schmidt-2
On Thu, May 03, 2007 at 01:40:12PM +0200, Richard Duivenvoorde wrote:

> Hi List,
>
> What is the preferred way to implement some kind of 'loading or busy
> message' for a slow wms server?
>
> I've got a map with some (faster) tiled reference layers, and one (slow)
> untiled wms top layer. While the reference layer loads pretty fast, the
> (dynamic) top layer is sometimes loaded after a few seconds. I want to
> inform users that they have to be patient for a while :-)
>
> If there is some kind of callback mechanisme possible which is called
> when the image is loaded? So I can show an image while loading, and
> remove it when this callback function is called.

There are 'loadstart' and 'loadend' events on the layer. Those are
probably the best thing to work with.

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Bart van den Eijnden (OSGIS)-2
In reply to this post by Richard Duivenvoorde
Hi Richard,

there is for WMS.Untiled only:

var layerloadcounter = 0;
var activitydiv;

mylayer.events.register( 'loadend', this, decreasecounter);
mylayer.events.register( 'loadcancel', this, decreasecounter);
mylayer.events.register( 'loadstart', this, increasecounter);

function increasecounter()
{
  layerloadcounter++;
  if (layerloadcounter > 0 && activitydiv)
  {  
    activitydiv.style.visibility = "visible";
  }
}

function decreasecounter(){
  if (layerloadcounter > 0) layerloadcounter--;
  if (layerloadcounter == 0 && activitydiv)
  {
    activitydiv.style.visibility = "hidden";
  }
}

And then have some kind of div in the center of the map div:

function activitylayerinit()
{
  sz = new OpenLayers.Size();
  sz.h = gMapDHTMLWaitImageHeight;
  sz.w = gMapDHTMLWaitImageWidth;
  var dim = OpenLayers.Element.getDimensions(map.viewPortDiv);
  position =
    new OpenLayers.Pixel(dim.width-gMapDHTMLWaitImageWidth-25,
      gMapDHTMLWaitImageHeight);
    activitydiv = OpenLayers.Util.createDiv("ActivityLayer",
      position, sz, gMapDHTMLWaitImage);
    activitydiv.style.zIndex = 1000;
    map.viewPortDiv.appendChild(activitydiv);
}

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl


--------- Oorspronkelijk bericht --------
Van: Richard Duivenvoorde <[hidden email]>
Naar: [hidden email] <[hidden email]>
Onderwerp: [OpenLayers-Users] wms untiled 'busy loading' message or image
Datum: 03/05/07 09:40

> Hi List,
>
> What is the preferred way to implement some kind of 'loading or busy
> message' for a slow wms server?
>
> I've got a map with some (faster) tiled reference layers, and one (slow)
> untiled wms top layer. While the reference layer loads pretty fast, the
> (dynamic) top layer is sometimes loaded after a few seconds. I want to
> inform users that they have to be patient for a while :-)
>
> If there is some kind of callback mechanisme possible which is called
> when the image is loaded? So I can show an image while loading, and
> remove it when this callback function is called.
>
> TIA
>
> Richard Duivenvoorde
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>
>



_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Richard Duivenvoorde
In reply to this post by Richard Duivenvoorde
Thanks both!

Exactly what I needed.

grtz Richard Duivenvoorde
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Benoit Myard
In reply to this post by Bart van den Eijnden (OSGIS)-2
I have implemented this idea as a custom OpenLayers.Control class. If
anyone is interested, I might clean it up an post it here later.

I think it would be a good thing to add to OpenLayers (it's one of the
first feature I've been asked to add to it).

PS: sorry Richard, I know I wasn't supposed to directly answer to you
but GMail is a bitch.

--
Benoit Myard
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Benoit Myard
// Here is the code:

OpenLayers.Control.LoadMonitor = OpenLayers.Class.create();
OpenLayers.Control.LoadMonitor.prototype =
  OpenLayers.Class.inherit( OpenLayers.Control, {

    div: null,
    counter: 0,

    activate: function() {
      var img = OpenLayers.Util.getImagesLocation() + "loading.gif";
      var size = new OpenLayers.Size(40, 40);
      var dim = OpenLayers.Element.getDimensions(this.map.viewPortDiv);
      var pos = new OpenLayers.Pixel((dim.width - size.w) / 2,
                                    (dim.height - size.h) / 2);

      this.div = OpenLayers.Util.createDiv("LoadMonitor", pos, size, img);
      this.div.style.zIndex = 1000;

      this.map.viewPortDiv.appendChild(this.div);
    },

    deactivate: function() {
      if (this.div) {
        this.div.style.display = "none";
        this.div = null;
      }
    },

    draw: function() {
      this.activate();
    },

    monitor: function(layer) {
      layer.events.register('loadstart', this, this.start);
      layer.events.register('loadcancel', this, this.end);
      layer.events.register('loadend', this, this.end);
    },

    start: function(layer) {
      this.counter++
      if (this.counter > 0 && this.div)
        this.div.style.display = "block";
    },

    end: function(layer) {
      if (this.counter > 0)
          this.counter--;
      if (this.counter == 0 && this.div)
        this.div.style.display = "none";
    },

    CLASS_NAME: "OpenLayers.Control.LoadMonitor"
});

// And here is an example:

var map = new OpenLayers.Map(...);

var monitor = new ExpWeb.Control.LoadMonitor();
map.addControl(monitor);

var layer = new OpenLayers.Layer.WMS(...);
monitor.monitor(layer);
map.addLayer(layer);

It's not automated because I had to have the ability to choose which
layer to monitor. Also, for some reason, events are somewhat strange.
Add breakpoints in start() and end() if you use FireBug and note
events triggered. Any idea ?

Cheers.

--
Benoit Myard
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Erik Uzureau-3
Dear Benoit et tous,

I'm actually working on getting reliable loadstart/loadend messages
going in a sandbox that I've been working on for the past couple of
weeks.

I'm hoping to write tests today and have a patch ready and hopefully
integrated by the end of the week.

Once in (cross fingers), all layers derived of Grid.js will correctly
fire "loadstart", "loadend" and "tileloaded" events. Similar to your
implementation below, there will be a new property on the grid layer
called numLoadingTiles, which can be used to implement a progress bar.

Keep an eye out for it,
Erik




On 7/10/07, Benoit Myard <[hidden email]> wrote:

> // Here is the code:
>
> OpenLayers.Control.LoadMonitor = OpenLayers.Class.create();
> OpenLayers.Control.LoadMonitor.prototype =
>   OpenLayers.Class.inherit( OpenLayers.Control, {
>
>     div: null,
>     counter: 0,
>
>     activate: function() {
>       var img = OpenLayers.Util.getImagesLocation() + "loading.gif";
>       var size = new OpenLayers.Size(40, 40);
>       var dim = OpenLayers.Element.getDimensions(this.map.viewPortDiv);
>       var pos = new OpenLayers.Pixel((dim.width - size.w) / 2,
>                                     (dim.height - size.h) / 2);
>
>       this.div = OpenLayers.Util.createDiv("LoadMonitor", pos, size, img);
>       this.div.style.zIndex = 1000;
>
>       this.map.viewPortDiv.appendChild(this.div);
>     },
>
>     deactivate: function() {
>       if (this.div) {
>         this.div.style.display = "none";
>         this.div = null;
>       }
>     },
>
>     draw: function() {
>       this.activate();
>     },
>
>     monitor: function(layer) {
>       layer.events.register('loadstart', this, this.start);
>       layer.events.register('loadcancel', this, this.end);
>       layer.events.register('loadend', this, this.end);
>     },
>
>     start: function(layer) {
>       this.counter++
>       if (this.counter > 0 && this.div)
>         this.div.style.display = "block";
>     },
>
>     end: function(layer) {
>       if (this.counter > 0)
>           this.counter--;
>       if (this.counter == 0 && this.div)
>         this.div.style.display = "none";
>     },
>
>     CLASS_NAME: "OpenLayers.Control.LoadMonitor"
> });
>
> // And here is an example:
>
> var map = new OpenLayers.Map(...);
>
> var monitor = new ExpWeb.Control.LoadMonitor();
> map.addControl(monitor);
>
> var layer = new OpenLayers.Layer.WMS(...);
> monitor.monitor(layer);
> map.addLayer(layer);
>
> It's not automated because I had to have the ability to choose which
> layer to monitor. Also, for some reason, events are somewhat strange.
> Add breakpoints in start() and end() if you use FireBug and note
> events triggered. Any idea ?
>
> Cheers.
>
> --
> Benoit Myard
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Erik Uzureau-3
btw:
http://dev.openlayers.org/sandbox/euzuro/untiled3/examples/layerLoadMonitoring.html

On 7/10/07, Erik Uzureau <[hidden email]> wrote:

> Dear Benoit et tous,
>
> I'm actually working on getting reliable loadstart/loadend messages
> going in a sandbox that I've been working on for the past couple of
> weeks.
>
> I'm hoping to write tests today and have a patch ready and hopefully
> integrated by the end of the week.
>
> Once in (cross fingers), all layers derived of Grid.js will correctly
> fire "loadstart", "loadend" and "tileloaded" events. Similar to your
> implementation below, there will be a new property on the grid layer
> called numLoadingTiles, which can be used to implement a progress bar.
>
> Keep an eye out for it,
> Erik
>
>
>
>
> On 7/10/07, Benoit Myard <[hidden email]> wrote:
> > // Here is the code:
> >
> > OpenLayers.Control.LoadMonitor = OpenLayers.Class.create();
> > OpenLayers.Control.LoadMonitor.prototype =
> >   OpenLayers.Class.inherit( OpenLayers.Control, {
> >
> >     div: null,
> >     counter: 0,
> >
> >     activate: function() {
> >       var img = OpenLayers.Util.getImagesLocation() + "loading.gif";
> >       var size = new OpenLayers.Size(40, 40);
> >       var dim = OpenLayers.Element.getDimensions(this.map.viewPortDiv);
> >       var pos = new OpenLayers.Pixel((dim.width - size.w) / 2,
> >                                     (dim.height - size.h) / 2);
> >
> >       this.div = OpenLayers.Util.createDiv("LoadMonitor", pos, size, img);
> >       this.div.style.zIndex = 1000;
> >
> >       this.map.viewPortDiv.appendChild(this.div);
> >     },
> >
> >     deactivate: function() {
> >       if (this.div) {
> >         this.div.style.display = "none";
> >         this.div = null;
> >       }
> >     },
> >
> >     draw: function() {
> >       this.activate();
> >     },
> >
> >     monitor: function(layer) {
> >       layer.events.register('loadstart', this, this.start);
> >       layer.events.register('loadcancel', this, this.end);
> >       layer.events.register('loadend', this, this.end);
> >     },
> >
> >     start: function(layer) {
> >       this.counter++
> >       if (this.counter > 0 && this.div)
> >         this.div.style.display = "block";
> >     },
> >
> >     end: function(layer) {
> >       if (this.counter > 0)
> >           this.counter--;
> >       if (this.counter == 0 && this.div)
> >         this.div.style.display = "none";
> >     },
> >
> >     CLASS_NAME: "OpenLayers.Control.LoadMonitor"
> > });
> >
> > // And here is an example:
> >
> > var map = new OpenLayers.Map(...);
> >
> > var monitor = new ExpWeb.Control.LoadMonitor();
> > map.addControl(monitor);
> >
> > var layer = new OpenLayers.Layer.WMS(...);
> > monitor.monitor(layer);
> > map.addLayer(layer);
> >
> > It's not automated because I had to have the ability to choose which
> > layer to monitor. Also, for some reason, events are somewhat strange.
> > Add breakpoints in start() and end() if you use FireBug and note
> > events triggered. Any idea ?
> >
> > Cheers.
> >
> > --
> > Benoit Myard
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://openlayers.org/mailman/listinfo/users
> >
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Benoit Myard
That's a good news. I'm affraid I never tried the code I posted
earlier with Tiled layers.

On 10/07/07, Erik Uzureau <[hidden email]> wrote:
> > Once in (cross fingers), all layers derived of Grid.js will correctly
> > fire "loadstart", "loadend" and "tileloaded" events. Similar to your
> > implementation below, there will be a new property on the grid layer
> > called numLoadingTiles, which can be used to implement a progress bar.

On the other hand, this wouldn't solve the problem for
OpenLayers.Layer.WMS.Untiled which inherits
OpenLayers.Layer.HTTPRequest but not OpenLayers.Layer.Grid. Do you
have any plans for layers that don't inherit OpenLayers.Layer.Grid ?

> > Keep an eye out for it,

I will.

PS: sorry Erik for the direct mail. GMail drives me crazy.. it used to
answer to lists but it looks like it doesn't anymore.

--
Benoit Myard
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Erik Uzureau-3
On 7/10/07, Benoit Myard <[hidden email]> wrote:

> That's a good news. I'm affraid I never tried the code I posted
> earlier with Tiled layers.
>
> On 10/07/07, Erik Uzureau <[hidden email]> wrote:
> > > Once in (cross fingers), all layers derived of Grid.js will correctly
> > > fire "loadstart", "loadend" and "tileloaded" events. Similar to your
> > > implementation below, there will be a new property on the grid layer
> > > called numLoadingTiles, which can be used to implement a progress bar.
>
> On the other hand, this wouldn't solve the problem for
> OpenLayers.Layer.WMS.Untiled which inherits
> OpenLayers.Layer.HTTPRequest but not OpenLayers.Layer.Grid. Do you
> have any plans for layers that don't inherit OpenLayers.Layer.Grid ?

:-) So the good news is that the essential part of the patch that I'm
working on is to bring the Gridded and Untiled layers back together.

Instead of declaring your layer as OpenLayers.WMS.Untiled, you will
simply declare it OpenLayers.WMS and pass it an option { singleTile:
true }

Thus, both of those will be supported.
:-)

Erik



> > > Keep an eye out for it,
>
> I will.
>
> PS: sorry Erik for the direct mail. GMail drives me crazy.. it used to
> answer to lists but it looks like it doesn't anymore.
>
> --
> Benoit Myard
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Trond Michelsen
On Tue, Jul 10, 2007 at 11:23:29AM -0500, Erik Uzureau wrote:
> :-) So the good news is that the essential part of the patch that I'm
> working on is to bring the Gridded and Untiled layers back together.
>
> Instead of declaring your layer as OpenLayers.WMS.Untiled, you will
> simply declare it OpenLayers.WMS and pass it an option { singleTile:
> true }

Great news.

One thing, though :)

Would it be possible to make the singletile-version have a "snap to
grid"-functionality, so that even the singletiles can be cached?

--
Trond Michelsen

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

David William Bitner



Would it be possible to make the singletile-version have a "snap to
grid"-functionality, so that even the singletiles can be cached?

That kind of defeats the point of a single tile.


_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Tim Schaub-2
In reply to this post by Trond Michelsen
Trond Michelsen wrote:

> On Tue, Jul 10, 2007 at 11:23:29AM -0500, Erik Uzureau wrote:
>> :-) So the good news is that the essential part of the patch that I'm
>> working on is to bring the Gridded and Untiled layers back together.
>>
>> Instead of declaring your layer as OpenLayers.WMS.Untiled, you will
>> simply declare it OpenLayers.WMS and pass it an option { singleTile:
>> true }
>
> Great news.
>
> One thing, though :)
>
> Would it be possible to make the singletile-version have a "snap to
> grid"-functionality, so that even the singletiles can be cached?
>

Try a layer with a very big tile size and zero buffer if you want to
cache big tiles.
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Erik Uzureau-3
Good answer Tim.

Does that make sense, Trond?


If you set the buffer to 0, then OL wont pre-load any tiles that are
outside the bounds of the viewport of the map.... therefore, if you
set a tile size that is bigger than the viewport, you will always only
be loading one tile... and since you're still in normal gridded mode,
you will be snapping to grid and benefit from cacheing.



On 7/10/07, Tim Schaub <[hidden email]> wrote:

> Trond Michelsen wrote:
> > On Tue, Jul 10, 2007 at 11:23:29AM -0500, Erik Uzureau wrote:
> >> :-) So the good news is that the essential part of the patch that I'm
> >> working on is to bring the Gridded and Untiled layers back together.
> >>
> >> Instead of declaring your layer as OpenLayers.WMS.Untiled, you will
> >> simply declare it OpenLayers.WMS and pass it an option { singleTile:
> >> true }
> >
> > Great news.
> >
> > One thing, though :)
> >
> > Would it be possible to make the singletile-version have a "snap to
> > grid"-functionality, so that even the singletiles can be cached?
> >
>
> Try a layer with a very big tile size and zero buffer if you want to
> cache big tiles.
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Josh Livni-2
It seems to me that it's still possible, with a tilesize far great than
the viewport size, you may end up loading 4 tiles.  Such as if you
happened to be looking at an area where four (very large) tiles came
together.

I may well be missing something obvious though (including, at the very
least, why it's important to only load exactly one tile).

  -Josh


Erik Uzureau wrote:

> Good answer Tim.
>
> Does that make sense, Trond?
>
>
> If you set the buffer to 0, then OL wont pre-load any tiles that are
> outside the bounds of the viewport of the map.... therefore, if you
> set a tile size that is bigger than the viewport, you will always only
> be loading one tile... and since you're still in normal gridded mode,
> you will be snapping to grid and benefit from cacheing.
>
>
>
> On 7/10/07, Tim Schaub <[hidden email]> wrote:
>  
>> Trond Michelsen wrote:
>>    
>>> On Tue, Jul 10, 2007 at 11:23:29AM -0500, Erik Uzureau wrote:
>>>      
>>>> :-) So the good news is that the essential part of the patch that I'm
>>>> working on is to bring the Gridded and Untiled layers back together.
>>>>
>>>> Instead of declaring your layer as OpenLayers.WMS.Untiled, you will
>>>> simply declare it OpenLayers.WMS and pass it an option { singleTile:
>>>> true }
>>>>        
>>> Great news.
>>>
>>> One thing, though :)
>>>
>>> Would it be possible to make the singletile-version have a "snap to
>>> grid"-functionality, so that even the singletiles can be cached?
>>>
>>>      
>> Try a layer with a very big tile size and zero buffer if you want to
>> cache big tiles.
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/users
>>
>>    
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>  

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: wms untiled 'busy loading' message or image

Erik Uzureau-3
Arf. Yes, Josh is right. you will have border cases, in which case
this isnt very useful.

If you want cached tiles, however... you will always have this gridded case.

Erik

On 7/10/07, Josh Livni <[hidden email]> wrote:

> It seems to me that it's still possible, with a tilesize far great than
> the viewport size, you may end up loading 4 tiles.  Such as if you
> happened to be looking at an area where four (very large) tiles came
> together.
>
> I may well be missing something obvious though (including, at the very
> least, why it's important to only load exactly one tile).
>
>   -Josh
>
>
> Erik Uzureau wrote:
> > Good answer Tim.
> >
> > Does that make sense, Trond?
> >
> >
> > If you set the buffer to 0, then OL wont pre-load any tiles that are
> > outside the bounds of the viewport of the map.... therefore, if you
> > set a tile size that is bigger than the viewport, you will always only
> > be loading one tile... and since you're still in normal gridded mode,
> > you will be snapping to grid and benefit from cacheing.
> >
> >
> >
> > On 7/10/07, Tim Schaub <[hidden email]> wrote:
> >
> >> Trond Michelsen wrote:
> >>
> >>> On Tue, Jul 10, 2007 at 11:23:29AM -0500, Erik Uzureau wrote:
> >>>
> >>>> :-) So the good news is that the essential part of the patch that I'm
> >>>> working on is to bring the Gridded and Untiled layers back together.
> >>>>
> >>>> Instead of declaring your layer as OpenLayers.WMS.Untiled, you will
> >>>> simply declare it OpenLayers.WMS and pass it an option { singleTile:
> >>>> true }
> >>>>
> >>> Great news.
> >>>
> >>> One thing, though :)
> >>>
> >>> Would it be possible to make the singletile-version have a "snap to
> >>> grid"-functionality, so that even the singletiles can be cached?
> >>>
> >>>
> >> Try a layer with a very big tile size and zero buffer if you want to
> >> cache big tiles.
> >> _______________________________________________
> >> Users mailing list
> >> [hidden email]
> >> http://openlayers.org/mailman/listinfo/users
> >>
> >>
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://openlayers.org/mailman/listinfo/users
> >
>
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Bug? Zoom box offset when using large scales

kobben
In reply to this post by Bart van den Eijnden (OSGIS)-2
Hi ,

I have data of a really large scale, it's almost 1:1 drawings of
archeological finds. They have been measured very precisely and nicely
georef'd to a UTM projection and consist of maps of typically some 15x15 to
20x20 meters in size.
All works quite fine, but the large scale obviously gives some problems,
that I consider a bug: The zoom box (SHIFT-Drag) does not appear were the
actual mouse is moving. The effect varies according to the size of the
screen and the browser (eg. on my 1024x768 Mac running Firefox it's not as
bad as on a 1680x1050 PC using IE7, where it's really way off). I have
experimented with all kinds of resolution and scale settings, but to no
avail...

An experimental version can be seen at
http://geoserver.itc.nl/melkakunture/expert/site.asp?site=Garba+IVD
 [might not always be up!]
Any thoughts?

BTW, my map is defined as follows:

var currBBOX = "455749.125,962199.4375,455765.15625,962210.5".split(",");
var bounds = new
OpenLayers.Bounds(currBBOX[0],currBBOX[1],currBBOX[2],currBBOX[3]);
var maxRes = (currBBOX[2] - currBBOX[0])/500; //alert(maxRes);
       
        function init(){
               
            map = new OpenLayers.Map( "mapDiv", {maxExtent: bounds,
projection:"EPSG:20137",  minResolution: 0.001,  maxResolution: maxRes,
units: "m" } );
           
           
 ..etc...


Yours,
__
Barend Köbben
International Institute for Geo-information
Sciences and Earth Observation (ITC)
PO Box 6, 7500AA Enschede (The Netherlands)
ph: +31 (0)53 4874253; fax: +31 (0)53 4874335


_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Bug? Zoom box offset when using large scales

Christopher Schmidt-2
On Fri, Aug 03, 2007 at 12:26:57PM +0200, Barend K?bben wrote:

> Hi ,
>
> I have data of a really large scale, it's almost 1:1 drawings of
> archeological finds. They have been measured very precisely and nicely
> georef'd to a UTM projection and consist of maps of typically some 15x15 to
> 20x20 meters in size.
> All works quite fine, but the large scale obviously gives some problems,
> that I consider a bug: The zoom box (SHIFT-Drag) does not appear were the
> actual mouse is moving. The effect varies according to the size of the
> screen and the browser (eg. on my 1024x768 Mac running Firefox it's not as
> bad as on a 1680x1050 PC using IE7, where it's really way off). I have
> experimented with all kinds of resolution and scale settings, but to no
> avail...

This is almost definitely a bug in OpenLayers ... holy crap, you weren't
kidding. Something's totally broken there.

Erik, can you file this as a blocker for 2.5?

Thanks for the report, Barend. We'll look into this.

-- Chris

> Sciences and Earth Observation (ITC)
> PO Box 6, 7500AA Enschede (The Netherlands)
> ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>

--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Bug? Zoom box offset when using large scales

kobben
Thanks for the wfit reply. Sorry to hold up 2.5...


On 03-08-2007 14:50, "Christopher Schmidt" <[hidden email]> wrote:

> On Fri, Aug 03, 2007 at 12:26:57PM +0200, Barend K?bben wrote:
>> Hi ,
>>
>> I have data of a really large scale, it's almost 1:1 drawings of
>> archeological finds. They have been measured very precisely and nicely
>> georef'd to a UTM projection and consist of maps of typically some 15x15 to
>> 20x20 meters in size.
>> All works quite fine, but the large scale obviously gives some problems,
>> that I consider a bug: The zoom box (SHIFT-Drag) does not appear were the
>> actual mouse is moving. The effect varies according to the size of the
>> screen and the browser (eg. on my 1024x768 Mac running Firefox it's not as
>> bad as on a 1680x1050 PC using IE7, where it's really way off). I have
>> experimented with all kinds of resolution and scale settings, but to no
>> avail...
>
> This is almost definitely a bug in OpenLayers ... holy crap, you weren't
> kidding. Something's totally broken there.
>
> Erik, can you file this as a blocker for 2.5?
>
> Thanks for the report, Barend. We'll look into this.
>
> -- Chris
>
>> Sciences and Earth Observation (ITC)
>> PO Box 6, 7500AA Enschede (The Netherlands)
>> ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/users
>>

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Bug? Zoom box offset when using large scales

Charles Holmes
In reply to this post by Christopher Schmidt-2
I've run into some similar behavior that hopefully will be useful in
debugging the problem.  I'm not sure if it's the same problem, but it's
certainly related.

Using SHIFT+drag will occasionally draw the box in the wrong position
like you're seeing with Barend's problem.  Once it tries to draw it in
the wrong position, any future SHIFT+drag will also be in the wrong
position.  

However, by reloading the page, the problem will usually go away.  Once
it draws it in the correct position, I haven't noticied it changing
over into the incorrect one.  When we use the PanZoomBar, it will
always zoom in correctly.  

--
Charles Holmes

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Christopher Schmidt
Sent: Friday, August 03, 2007 8:51 AM
To: Barend K?bben
Cc: [hidden email]; [hidden email]
Subject: Re: [OpenLayers-Users] Bug? Zoom box offset when using large
scales

On Fri, Aug 03, 2007 at 12:26:57PM +0200, Barend K?bben wrote:
> Hi ,
>
> I have data of a really large scale, it's almost 1:1 drawings of
> archeological finds. They have been measured very precisely and
nicely
> georef'd to a UTM projection and consist of maps of typically some
15x15 to
> 20x20 meters in size.
> All works quite fine, but the large scale obviously gives some
problems,
> that I consider a bug: The zoom box (SHIFT-Drag) does not appear were
the
> actual mouse is moving. The effect varies according to the size of
the
> screen and the browser (eg. on my 1024x768 Mac running Firefox it's
not as
> bad as on a 1680x1050 PC using IE7, where it's really way off). I
have
> experimented with all kinds of resolution and scale settings, but to
no
> avail...

This is almost definitely a bug in OpenLayers ... holy crap, you
weren't
kidding. Something's totally broken there.

Erik, can you file this as a blocker for 2.5?

Thanks for the report, Barend. We'll look into this.

-- Chris

> Sciences and Earth Observation (ITC)
> PO Box 6, 7500AA Enschede (The Netherlands)
> ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>

--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
12