Skip to content

Commit

Permalink
Remove all mentions to OSM Stamen in the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Jan 31, 2024
1 parent 30fdf80 commit 01ea092
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 35 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ if lv:
my_global_options = {
'mapScales': [1000, 2500, 5000, 10000, 25000, 50000, 100000, 250000], # set the map scales
'osmMapnik': True, # add the OSM mapnik baselayer
'osmStamenToner': True, # add the OSM Stamen Toner baselayer
'print': True # activate the print tool
}
my_layer_options = {
Expand Down
3 changes: 0 additions & 3 deletions lizmap/lizmap_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ def __init__(self, project, fix_json=False):
'osmMapnik': {
'wType': 'checkbox', 'type': 'boolean', 'default': False
},
'osmStamenToner': {
'wType': 'checkbox', 'type': 'boolean', 'default': False
},
'openTopoMap': {
'wType': 'checkbox', 'type': 'boolean', 'default': False,
'use_proper_boolean': False,
Expand Down
19 changes: 0 additions & 19 deletions lizmap/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ def write_log_message(message, tag, level):
self.global_options['googleTerrain']['widget'] = self.dlg.cbGoogleTerrain
self.global_options['googleStreets']['widget'] = self.dlg.cbGoogleStreets
self.global_options['osmMapnik']['widget'] = self.dlg.cbOsmMapnik
self.global_options['osmStamenToner']['widget'] = self.dlg.cbOsmStamenToner
self.global_options['openTopoMap']['widget'] = self.dlg.cb_open_topo_map
self.global_options['bingKey']['widget'] = self.dlg.inBingKey
self.global_options['bingStreets']['widget'] = self.dlg.cbBingStreets
Expand Down Expand Up @@ -493,14 +492,6 @@ def write_log_message(message, tag, level):
self.global_options['atlasShowAtStartup']['widget'] = self.dlg.atlasShowAtStartup
self.global_options['atlasAutoPlay']['widget'] = self.dlg.atlasAutoPlay

# Deprecated, it will be removed on October 31, 2023.
# https://stamen.com/faq
# https://stadiamaps.com/pricing/
self.dlg.cbOsmStamenToner.setEnabled(False)
self.dlg.cbOsmStamenToner.setToolTip(tr(
'This base-layer is now deprecated by Stamen, see https://stamen.com/faq how to migrate. The base layer '
'will be deactivated automatically when saving the Lizmap configuration file.'))

self.layer_options_list = lizmap_config.layerOptionDefinitions
# Add widget information
self.layer_options_list['title']['widget'] = self.dlg.inLayerTitle
Expand Down Expand Up @@ -641,7 +632,6 @@ def write_log_message(message, tag, level):

self.crs_3857_base_layers_list = {
'osm-mapnik': self.dlg.cbOsmMapnik,
'osm-stamen-toner': self.dlg.cbOsmStamenToner,
'opentopomap': self.dlg.cb_open_topo_map,
'google-street': self.dlg.cbGoogleStreets,
'google-satellite': self.dlg.cbGoogleSatellite,
Expand Down Expand Up @@ -4059,14 +4049,6 @@ def save_cfg_file(
)
return False

if self.dlg.cbOsmStamenToner.isChecked():
self.dlg.cbOsmStamenToner.setChecked(False)
self.dlg.log_panel.append(tr('Stamen tiles'), style=Html.H2)
self.dlg.log_panel.append(tr(
'This base-layer is now deprecated by Stamen, see https://stamen.com/faq how to migrate. The layer '
'has been automatically deactivated in the dialog.'
))

stop_process = tr("The CFG is not saved due to errors that must be fixed.")

if not self.server_manager.check_admin_login_provided() and not self.is_dev_version:
Expand Down Expand Up @@ -4129,7 +4111,6 @@ def save_cfg_file(
# Need to get these values to check for Pseudo Mercator projection
mercator_layers = [
self.dlg.cbOsmMapnik.isChecked(),
self.dlg.cbOsmStamenToner.isChecked(),
self.dlg.cb_open_topo_map.isChecked(),
self.dlg.cbGoogleStreets.isChecked(),
self.dlg.cbGoogleSatellite.isChecked(),
Expand Down
13 changes: 1 addition & 12 deletions lizmap/resources/ui/ui_lizmap.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2490,16 +2490,6 @@ This is different to the map maximum extent (defined in QGIS project properties,
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="cbOsmStamenToner">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>OSM Stamen Toner</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="cbOsmMapnik">
<property name="text">
Expand Down Expand Up @@ -2547,7 +2537,7 @@ This is different to the map maximum extent (defined in QGIS project properties,
</property>
</widget>
</item>
<item row="0" column="3">
<item row="0" column="2">
<widget class="QCheckBox" name="cb_open_topo_map">
<property name="text">
<string>OpenTopoMap</string>
Expand Down Expand Up @@ -5114,7 +5104,6 @@ This is different to the map maximum extent (defined in QGIS project properties,
<tabstop>activate_first_map_theme</tabstop>
<tabstop>scrollArea_3</tabstop>
<tabstop>cbOsmMapnik</tabstop>
<tabstop>cbOsmStamenToner</tabstop>
<tabstop>cbGoogleStreets</tabstop>
<tabstop>cbGoogleSatellite</tabstop>
<tabstop>cbGoogleHybrid</tabstop>
Expand Down

0 comments on commit 01ea092

Please sign in to comment.