Skip to content

Commit

Permalink
Enable visibility control of extra map types.
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmaphobic committed May 15, 2017
1 parent 5ef80c5 commit 56b3a29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/QtLocationPlugin/QMLControl/OfflineMap.qml
Original file line number Diff line number Diff line change
Expand Up @@ -276,33 +276,31 @@ QGCView {
text: qsTr("Memory cache changes require a restart to take effect.")
}

Item { width: 1; height: 1 }

QGCLabel { text: qsTr("MapBox Access Token") }

Item { width: 1; height: 1; visible: _mapboxFact ? _mapboxFact.visible : false }
QGCLabel { text: qsTr("MapBox Access Token"); visible: _mapboxFact ? _mapboxFact.visible : false }
FactTextField {
fact: _mapboxFact
visible: _mapboxFact ? _mapboxFact.visible : false
maximumLength: 256
width: ScreenTools.defaultFontPixelWidth * 30
}

QGCLabel {
text: qsTr("With an access token, you can use MapBox Maps.")
visible: _mapboxFact ? _mapboxFact.visible : false
font.pointSize: _adjustableFontPointSize
}

Item { width: 1; height: 1 }

QGCLabel { text: qsTr("Esri Access Token") }

Item { width: 1; height: 1; visible: _esriFact ? _esriFact.visible : false }
QGCLabel { text: qsTr("Esri Access Token"); visible: _esriFact ? _esriFact.visible : false }
FactTextField {
fact: _esriFact
visible: _esriFact ? _esriFact.visible : false
maximumLength: 256
width: ScreenTools.defaultFontPixelWidth * 30
}

QGCLabel {
text: qsTr("With an access token, you can use Esri Maps.")
visible: _esriFact ? _esriFact.visible : false
font.pointSize: _adjustableFontPointSize
}
} // GridLayout
Expand Down
3 changes: 3 additions & 0 deletions src/Settings/FlightMapSettings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ void FlightMapSettings::_newMapProvider(QVariant value)
_removeEnumValue(mapTypeSatellite, enumStrings, enumValues);
_removeEnumValue(mapTypeHybrid, enumStrings, enumValues);
break;
case mapProviderEsri:
_removeEnumValue(mapTypeHybrid, enumStrings, enumValues);
break;
}
metaData->setEnumInfo(enumStrings, enumValues);
emit mapTypeChanged();
Expand Down

0 comments on commit 56b3a29

Please sign in to comment.