openstreetmap / trac-tickets

Archived Trac Tickets
1 stars 1 forks source link

Merkaartor fails to calculate Viewport's BBOX #2595

Closed openstreetmap-trac closed 3 years ago

openstreetmap-trac commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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