Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Merkaartor fails to calculate Viewport's BBOX #2595

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 6 comments
Closed

Merkaartor fails to calculate Viewport's BBOX #2595

openstreetmap-trac opened this issue Jul 23, 2021 · 6 comments

Comments

@openstreetmap-trac
Copy link

Reporter: David Paleino
[Submitted to the original trac issue database at 4.00pm, Saturday, 2nd January 2010]

Hello,
I added a WMS [1] layer to Merkaartor, and it seems to fail setting the BBOX
when doing the requests. In console I have:

---8<---
ImageMapLayer::drawFull: getting: "/arcgis/services/OrtofotoATA_20072008_f33/
MapServer/WMSServer?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&TRANSPARENT=TRUE&
LAYERS=0&SRS=EPSG:4326&STYLES=&FORMAT=image/png&WIDTH=583&HEIGHT=652&
BBOX=nan,0.000000,nan,0.000000"
--->8---

Notice the extremely wrong values of BBOX= :)

Grepping the source a bit, revealed that the URL is built in ImageMapLayer::drawFull() (src/Maps/ImageMapLayer.cpp:353).
This url takes its BBOX values from some computation done in
Projection::getProjectedViewport() (src/Maps/Projection.cpp:105). There,
adding:

qDebug() << Viewport.topLeft().lon() << "," << Viewport.topLeft().lat();

right at the beginning of the function, reveals that the Viewport is
effectively taken as a 0x0 box.

getProjectedViewport() is called at src/Maps/ImageMapLayer.cpp:355 :

QRectF vp = p->theProjection.getProjectedViewport(p->Viewport, rect);

"p" is a MapViewPrivate, as defined at src/MapView.cpp:39 . Well, I can't go
further than this, my limited C++ knowledge makes me stop here :/

Hope this can be of some help!

Thanks!
David

(the linenumbers above are from the Debian package, version 0.14+svnfixes~20090912-2 -- I could test with a clean source)

@openstreetmap-trac
Copy link
Author

Author: David Paleino
[Added to the original trac issue at 9.29pm, Saturday, 2nd January 2010]

The WMS I'm using is:

http://88.53.214.52/arcgis/services/OrtofotoATA_20072008_f33/MapServer/WMSServer?

sorry for not including it at first (however, I believe this problem is not URL-specific).

@openstreetmap-trac
Copy link
Author

Author: David Paleino
[Added to the original trac issue at 9.54pm, Saturday, 2nd January 2010]

I just verified that this happens with all default WMS layers available in Merkaartor, only Yahoo! works -- I suspect because it has a separate adapter.

@openstreetmap-trac
Copy link
Author

Author: Koying
[Added to the original trac issue at 5.03am, Sunday, 3rd January 2010]

Please try from SVN. I cannot reproduce myself.

Just to be sure, please tell me the BBOX you were actually trying to download, i.e. the viewport coordinates in the statusbar (I assume those are not null...)

@openstreetmap-trac
Copy link
Author

Author: David Paleino
[Added to the original trac issue at 8.06am, Sunday, 3rd January 2010]

It works with the SVN version. \o/

Just one thing I'm missing is: the tiled WMS background. Merkaartor each time downloads the whole viewport from WMS, while JOSM (for example), downloads square tiles and then aligns them. This allows you not to wait for the image to be re-downloaded each time you move the viewport around. Is there any chance to have it like JOSM's? Should I open a new ticket for this? :)

Marking this bug as fixed, since it will in the next release :)

@openstreetmap-trac
Copy link
Author

Author: Koying
[Added to the original trac issue at 1.44pm, Sunday, 3rd January 2010]

If you compiled from SVN, you should have now the choice between "Yahoo (Tiled)" and "Yahoo (WMS)" (this was back recently).

Don't you?

@openstreetmap-trac
Copy link
Author

Author: David Paleino
[Added to the original trac issue at 3.55pm, Sunday, 3rd January 2010]

I don't see them.

However, what I meant was the tiling of a generic WMS, specified by user (like it's in my case), not only Yahoo!.

Thank you,
David

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant