Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Version 2.13
Browse files Browse the repository at this point in the history
Remove support for MapQuest tile server
  • Loading branch information
Schlumpf committed Jul 14, 2016
1 parent a078aa6 commit f6a9b9d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
OSModul Changelog
-----------------

v2.13
- Remove MapQuest tile server, since they blocked free access to their tile servers

v2.12
- Fix root dir for asserts

Expand Down
8 changes: 3 additions & 5 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ private static function imagery($bl, $style){
$return = "";
if($bl == 'mapnikde') $return = '<a href="http://www.openstreetmap.de/">Openstreetmap.de</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)';
else if($bl == 'stamenwater') $return = '<a href="http://stamen.com">Stamen Design</a>, <a href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>';
else if($bl == 'mapquest') $return = '<a href="https://www.mapquest.com/">MapQuest</a>';
else if($bl == 'opentopomap') $return = '<a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>), <a href="http://viewfinderpanoramas.org">SRTM</a>';
else if($bl == 'openmapsurfer') $return = '<a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a>';
else if($bl == 'humanitarian') $return = '<a href="https://hotosm.org/">Humanitarian OpenStreetMap Team</a>';
Expand Down Expand Up @@ -155,14 +154,13 @@ private static function mpPins($parPins, $id){
public static function javascript($params, $id){
// load baselayerURL
$baselayerSettings = '';
if ($params->get('baselayer', 'mapnik') == 'mapnik') { $baselayerURL = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; $baselayerSettings = "maxZoom: 19, "; }
else if($params->get('baselayer', 'mapnik') == 'mapquest') { $baselayerURL = 'http://otile{s}.mqcdn.com/tiles/1.0.0/{type}/{z}/{x}/{y}.{ext}'; $baselayerSettings = "type: 'map', ext: 'jpg', subdomains: '1234', "; }
else if($params->get('baselayer', 'mapnik') == 'mapnikde') { $baselayerURL = 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png'; $baselayerSettings = "maxZoom: 18, "; }
if ($params->get('baselayer', 'mapnik') == 'mapnikde') { $baselayerURL = 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png'; $baselayerSettings = "maxZoom: 18, "; }
else if($params->get('baselayer', 'mapnik') == 'stamenwater') { $baselayerURL = 'https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png'; $baselayerSettings = "subdomains: 'abcd', minZoom: 1, maxZoom: 16, "; }
else if($params->get('baselayer', 'mapnik') == 'opentopomap') { $baselayerURL = 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png'; $baselayerSettings = "maxZoom: 16, "; }
else if($params->get('baselayer', 'mapnik') == 'openmapsurfer') { $baselayerURL = 'http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}'; $baselayerSettings = "maxZoom: 20, "; }
else if($params->get('baselayer', 'mapnik') == 'humanitarian') { $baselayerURL = 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'; $baselayerSettings = "maxZoom: 20, "; }
else if($params->get('baselayer', 'mapnik') == 'custom') { $baselayerURL = $params->get('customBaselayerURL', ''); }
else /* unknown layer and mapnik */ { $baselayerURL = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; $baselayerSettings = "maxZoom: 19, "; }

// load start coordinates
$lat = $params->get('lat', 50.560715);
Expand Down Expand Up @@ -218,7 +216,7 @@ public static function javascript($params, $id){
if ($params->get('attrLeaflet', 1) == 1) {
$js .= "map".$id.".attributionControl.addAttribution('Powered by Leaflet');\n";
}
if ($params->get('attrImagery', 1) == 1 && $params->get('baselayer', 'mapnik') != 'mapnik') {
if ($params->get('attrImagery', 1) == 1 && self::imagery($params->get('baselayer', 'mapnik'), $params->get('customBaselayer', "")) != '') {
$js .= "map".$id.".attributionControl.addAttribution('".JText::_('MOD_OSMOD_IMAGERY')." ".self::imagery($params->get('baselayer', 'mapnik'), $params->get('customBaselayer', ""))."');\n";
}
if ($params->get('attrModule', 1) == 1) {
Expand Down
1 change: 1 addition & 0 deletions mod_osmod.script.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function uninstall($parent) {
function update($parent) {
// $parent is the class calling this method
echo '<p>' . JText::sprintf('MOD_OSMOD_UPDATE', $parent->get('manifest')->version) . '</p>';
echo '<p><b>Please note, the support for MapQuest has been dropped.</b></p>';
}

// Before install/update/uninstall
Expand Down
5 changes: 2 additions & 3 deletions mod_osmod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<!-- Metadata -->
<name>OSModul</name>
<author>Martin Kröll</author>
<creationDate>13.06.2016</creationDate>
<creationDate>14.07.2016</creationDate>
<copyright>(c) 2012-2016 Martin Kröll</copyright>
<license>https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://extensions.joomla.org/extensions/owner/schlumpf</authorUrl>
<version>2.12</version>
<version>2.13</version>
<description>MOD_OSMOD_DESCRIPTION</description>

<!-- Update servers -->
Expand Down Expand Up @@ -70,7 +70,6 @@
<option value="mapnik">OpenStreetMap</option>
<option value="mapnikde">OpenStreetMap DE</option>
<option value="stamenwater">Stamen Watercolor</option>
<option value="mapquest">MapQuest</option>
<option value="opentopomap">OpenTopoMap</option>
<option value="openmapsurfer">OpenMapSurfer</option>
<option value="humanitarian">Humanitarian (HOT)</option>
Expand Down

0 comments on commit f6a9b9d

Please sign in to comment.