[Merkaartor] Release?
Dirk Stöcker
openstreetmap at dstoecker.de
Wed Jul 9 14:07:25 BST 2008
On Wed, 9 Jul 2008, Chris Browet wrote:
>>> Next, are there any showstoppers in functionality/bugs? Is the
>>> infinity issue with Qt 4.4 + yahoo maps + opensuse solved?
>>
>> No. At least not for me. I will do some tests with openSUSE 11.0 on
>> weekend.
>>
>> But I would not call this a showstopper. merkaartor is useful without
>> the Yahoo stuff as well.
>
> Furthermore, I think a release is especially valuable to Windows users,
> which are very much less likely to have a setup to build Merkaartor from
> SVN.
Currently I have following patch to get Yahoo working without long system
slowdown (some display errors appear nevertheless):
The call to the first QWebView seems to load the Javascript code, which
seems to be missing and causing the long delay when not loaded by first
call. But why and how to fix correctly I have no idea.
Index: QMapControl/browserimagemanager.cpp
===================================================================
--- QMapControl/browserimagemanager.cpp (Revision 8868)
+++ QMapControl/browserimagemanager.cpp (Arbeitskopie)
@@ -39,6 +39,10 @@
QPixmapCache::setCacheLimit(20000); // in kb
}
+QWebView *view = new QWebView();
+view->load(QUrl("qrc:/Html/ymap.html?WIDTH=512&HEIGHT=512&BBOX=13.623,52.4292,13.7109,52.3756"));
+//view->show();
+
if (browser)
delete browser;
browser = new QWebView();
@@ -47,8 +51,10 @@
browser->setPage(page);
page->setViewportSize(QSize(1024, 1024));
- connect(page->mainFrame(), SIGNAL(loadDone(bool)), this, SLOT(pageLoadFinished(bool)));
- connect(page, SIGNAL(loadFinished(bool)), this, SLOT(pageLoadFinished(bool)));
+ if(QString(qVersion()) < QString("4.4"))
+ connect(page->mainFrame(), SIGNAL(loadDone(bool)), this, SLOT(pageLoadFinished(bool)));
+ else
+ connect(page, SIGNAL(loadFinished(bool)), this, SLOT(pageLoadFinished(bool)));
// browser->show();
}
@@ -64,30 +70,28 @@
// qDebug() << "BrowserImageManager::getImage";
QPixmap pm;
- QString host = anAdapter->getHost();
- QString url = anAdapter->getQuery(x, y, z);
QString strHash = QString("Yahoo_%1_%2_%3").arg(x).arg(y).arg(z);
QString hash = QString(strHash.toAscii().toBase64());
+ qDebug() << "BrowserImageManager::getImage" << strHash;
// is image in picture cache
if (QPixmapCache::find(hash, pm))
return pm;
+ QString host = anAdapter->getHost();
+ QString url = anAdapter->getQuery(x, y, z);
LoadingRequest LR(hash, host, url);
- if (loadingRequests.contains(LR))
- return pm;
+ if(!loadingRequests.contains(LR))
+ {
+ loadingRequests.enqueue(LR);
+ emit(imageRequested());
- loadingRequests.enqueue(LR);
- emit(imageRequested());
-
- if (loadingRequests.size() <= MAX_REQ)
- launchRequest();
- else {
- //qDebug() << "queue full";
- return emptyPixmap;
+ if (loadingRequests.size() <= MAX_REQ)
+ launchRequest();
+ // else queue is full, skip request
}
- return pm;
+ return emptyPixmap;
}
void BrowserImageManager::launchRequest()
Ciao
--
http://www.dstoecker.eu/ (PGP key available)
More information about the Merkaartor
mailing list