Skip to content

Commit 3380b39

Browse files
committed
googlemap->bingmap and todo: support search combobox
1 parent ed1378c commit 3380b39

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

ground/gcs/src/libs/opmapcontrol/src/core/urlfactory.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,13 +477,23 @@ void UrlFactory::GetSecGoogleWords(const Point &pos, QString &sec1, QString &sec
477477
sec1 = "&s=";
478478
}
479479
}
480+
/*
481+
// TODO: Currently only support google geocoder
482+
// which is not accessable in China
480483
QString UrlFactory::MakeGeocoderUrl(QString keywords)
481484
{
482485
QString key = keywords.replace(' ', '+');
483486
484487
// CSV output has been depreciated. API key is no longer needed.
485488
return QString("http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=%1").arg(key);
486489
}
490+
*/
491+
// refer:
492+
QString UrlFactory::MakeGeocoderUrl(QString keywords) {
493+
QString add = keywords.replace(' ', '+');
494+
return QString("https//atlas.microsoft.com/search/adress/xml?api-version=1.0&query={%1}&lanuage=zh-HanS-CN").arg(add);
495+
}
496+
// TODO: FIX!!
487497
QString UrlFactory::MakeReverseGeocoderUrl(internals::PointLatLng &pt, const QString &language)
488498
{
489499
#ifdef DEBUG_URLFACTORY

ground/gcs/src/share/configurations/default.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@
15621562
<defaultLatitude>0</defaultLatitude>
15631563
<defaultLongitude>0</defaultLongitude>
15641564
<defaultZoom>2</defaultZoom>
1565-
<mapProvider>GoogleMap</mapProvider>
1565+
<mapProvider>BingMap</mapProvider>
15661566
<maxUpdateRate>2000</maxUpdateRate>
15671567
<overlayOpacity>1</overlayOpacity>
15681568
<showTileGridLines>false</showTileGridLines>
@@ -1582,7 +1582,7 @@
15821582
<defaultLatitude>0</defaultLatitude>
15831583
<defaultLongitude>0</defaultLongitude>
15841584
<defaultZoom>2</defaultZoom>
1585-
<mapProvider>GoogleMap</mapProvider>
1585+
<mapProvider>BingMap</mapProvider>
15861586
<maxUpdateRate>2000</maxUpdateRate>
15871587
<overlayOpacity>1</overlayOpacity>
15881588
<showTileGridLines>false</showTileGridLines>

0 commit comments

Comments
 (0)