Subversion Repositories public

Compare Revisions

Ignore whitespace Rev 284 → Rev 285

/sportwatcher/trunk/src/wmsselectorwidget.cpp
206,12 → 206,26
 
void wmsSelectorWidget::slotDetails()
{
int i;
 
wmsCapabilitiesWidget *dlg = new wmsCapabilitiesWidget(this);
dlg->setName(Service.Name);
dlg->setTitle(Service.Title);
dlg->setAbstract(Service.Abstract);
dlg->setOnline(Service.OnlineResource);
 
dlg->setPerson(Service.ContactPerson);
dlg->setOrg(Service.ContactOrganisation);
dlg->setPhone(Service.ContactVoiceTelephone);
dlg->setFax(Service.ContactFacsimileTelephone);
dlg->setMail(Service.ContactElectronicMailAddress);
 
dlg->setAddress(Service.Address);
dlg->setCity(Service.City);
dlg->setState(Service.StateOrProvince);
dlg->setPostCode(Service.PostCode);
dlg->setCountry(Service.Country);
 
dlg->setCapabilitiesGet(Request.GetCapabilities.Get);
dlg->setCapabilitiesPost(Request.GetCapabilities.Post);
 
221,9 → 235,31
dlg->setMapGet(Request.GetMap.Get);
dlg->setMapPost(Request.GetMap.Post);
 
for (int i = 0; i < Request.GetMap.Format.size(); ++i)
for (i = 0; i < Request.GetMap.Format.size(); ++i)
dlg->addFormats(Request.GetMap.Format.at(i));
 
for (i = 0; i < Request.GetFeatureInfo.Format.size(); ++i)
dlg->addFeatures(Request.GetFeatureInfo.Format.at(i));
 
if (firstLayer)
{
LAYER *akt = firstLayer;
QStringList sl;
 
while (akt)
{
for (i = 0; i < akt->SRS.size(); ++i)
sl << akt->SRS.at(i);
 
akt = akt->next;
}
 
sl.removeDuplicates();
 
for (i = 0; i < sl.size(); ++i)
dlg->addDate(sl.at(i));
}
 
dlg->exec();
delete dlg;
}
646,7 → 682,7
{
if (element == el_Service)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Service.OnlineResource = att.value(index);
 
if ((index = att.index(QString("type"))) != -1)
654,32 → 690,32
}
else if (element == el_GetCapabilities && el2 == el_Get)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetCapabilities.Get = att.value(index);
}
else if (element == el_GetCapabilities && el2 == el_Post)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetCapabilities.Post = att.value(index);
}
else if (element == el_GetMap && el2 == el_Get)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetMap.Get = att.value(index);
}
else if (element == el_GetMap && el2 == el_Post)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetMap.Post = att.value(index);
}
else if (element == el_GetFeatureInfo && el2 == el_Get)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetFeatureInfo.Get = att.value(index);
}
else if (element == el_GetFeatureInfo && el2 == el_Post)
{
if ((index = att.index(QString("href"))) != -1)
if ((index = att.index(QString("href"))) != -1 || (index = att.index(QString("xlink:href"))) != -1)
Request.GetFeatureInfo.Post = att.value(index);
}
}
689,7 → 725,7
element = el_ContactPersonPrimary;
else if (qName.toLower() == QString("contactperson"))
attribute = at_ContactPerson;
else if (qName.toLower() == QString("contactorganisation"))
else if (qName.toLower() == QString("contactorganization"))
attribute = at_ContactOrganisation;
else if (qName.toLower() == QString("contactposition"))
attribute = at_ContactPosition;
1432,6 → 1468,7
QString xml, s, srs, crs, styles, bSize, ext;
QDir dir = QDir::home();
QString path = dir.absolutePath();
QStringList sl;
//int item;
double _llat, _llon, _rlat, _rlon;
 
1458,8 → 1495,25
_rlon = rlon;
_rlat = rlat;
 
if (firstLayer && firstLayer->SRS.size())
srs = firstLayer->SRS.at(0);
if (firstLayer)
{
LAYER *akt = firstLayer;
 
while (akt)
{
for (int i = 0; i < akt->SRS.size(); ++i)
sl << akt->SRS.at(i);
 
akt = akt->next;
}
 
sl.removeDuplicates();
 
if (sl.contains("EPSG:4326") || sl.contains("WGS:84"))
srs = QString("EPSG:4326");
else
srs = sl.at(0);
}
else
srs = QString("EPSG:4326");
 
1466,7 → 1520,26
xml += " <SRS>" + srs + "</SRS>\n";
 
if (firstLayer && firstLayer->CRS.size())
crs = firstLayer->CRS.at(0);
{
LAYER *akt = firstLayer;
 
sl.clear();
 
while (akt)
{
for (int i = 0; i < akt->CRS.size(); ++i)
sl << akt->CRS.at(i);
 
akt = akt->next;
}
 
sl.removeDuplicates();
 
if (sl.contains("EPSG:4326") || sl.contains("CRS:84"))
crs = QString("EPSG:4326");
else
crs = sl.at(0);
}
else
crs = QString("EPSG:4326");