Skip to content

Commit

Permalink
gdal2tiles: remove/fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jan 2, 2022
1 parent e3870e3 commit 2e3f612
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions doc/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
rm gdal-docs/gdal.pdf
cp doc/build/latex/gdal.pdf gdal-docs
cp data/gdalicon.png gdal-docs # For GDAL autotest...
cp -r resources gdal-docs # Do not change this without changing swig/python/gdal-utils/osgeo_utils/gdal2tiles.py
cd gdal-docs
wget http://download.osgeo.org/gdal/for_doc/javadoc.zip -O /tmp/javadoc.zip
wget http://download.osgeo.org/gdal/for_doc/python-doc.tar.gz -O /tmp/python-doc.tar.gz
Expand Down
Binary file added resources/gdal2tiles/none.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/gdal2tiles/opacity-slider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 8 additions & 11 deletions swig/python/gdal-utils/osgeo_utils/gdal2tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# - support of global tiles (Spherical Mercator) for compatibility
# with interactive web maps a la Google Maps
# Author: Klokan Petr Pridal, klokan at klokan dot cz
# Web: http://www.klokan.cz/projects/gdal2tiles/
# GUI: http://www.maptiler.org/
#
###############################################################################
# Copyright (c) 2008, Klokan Petr Pridal
Expand Down Expand Up @@ -2357,7 +2355,6 @@ def generate_googlemaps(self) -> str:
/*
* Create a Custom Opacity GControl
* http://www.maptiler.org/google-maps-overlay-opacity-control/
*/
var CTransparencyLENGTH = 58;
Expand Down Expand Up @@ -2404,16 +2401,16 @@ def generate_googlemaps(self) -> str:
// Handle transparent PNG files in MSIE
if (this.ie) {
var loader = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://www.maptiler.org/img/opacity-slider.png', sizingMethod='crop');";
var loader = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://gdal.org/resources/gdal2tiles/opacity-slider.png', sizingMethod='crop');";
container.innerHTML = '<div style="height:21px; width:70px; ' +loader+ '" ></div>';
} else {
container.innerHTML = '<div style="height:21px; width:70px; background-image: url(http://www.maptiler.org/img/opacity-slider.png)" ></div>';
container.innerHTML = '<div style="height:21px; width:70px; background-image: url(https://gdal.org/resources/gdal2tiles/opacity-slider.png)" ></div>';
}
// create the knob as a GDraggableObject
// Handle transparent PNG files in MSIE
if (this.ie) {
var loader = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://www.maptiler.org/img/opacity-slider.png', sizingMethod='crop');";
var loader = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://gdal.org/resources/gdal2tiles/opacity-slider.png', sizingMethod='crop');";
this.knob = document.createElement("div");
this.knob.style.height="21px";
this.knob.style.width="13px";
Expand All @@ -2429,7 +2426,7 @@ def generate_googlemaps(self) -> str:
this.knob = document.createElement("div");
this.knob.style.height="21px";
this.knob.style.width="13px";
this.knob.style.backgroundImage="url(http://www.maptiler.org/img/opacity-slider.png)";
this.knob.style.backgroundImage="url(https://gdal.org/resources/gdal2tiles/opacity-slider.png)";
this.knob.style.backgroundPosition="-70px 0px";
}
container.appendChild(this.knob);
Expand Down Expand Up @@ -2522,7 +2519,7 @@ def generate_googlemaps(self) -> str:
var mercator = new GMercatorProjection(mapMaxZoom+1);
tilelayer.getTileUrl = function(tile,zoom) {
if ((zoom < mapMinZoom) || (zoom > mapMaxZoom)) {
return "http://www.maptiler.org/img/none.png";
return "https://gdal.org/resources/gdal2tiles/none.png";
}
var ymax = 1 << zoom;
var y = ymax - tile.y -1;
Expand All @@ -2533,7 +2530,7 @@ def generate_googlemaps(self) -> str:
if (mapBounds.intersects(tileBounds)) {
return zoom+"/"+tile.x+"/"+y+".png";
} else {
return "http://www.maptiler.org/img/none.png";
return "https://gdal.org/resources/gdal2tiles/none.png";
}
}
// IE 7-: support for PNG alpha channel
Expand Down Expand Up @@ -2593,7 +2590,7 @@ def generate_googlemaps(self) -> str:
</head>
<body onload="load()">
<div id="header"><h1>%(xml_escaped_title)s</h1></div>
<div id="subheader">Generated by <a href="http://www.klokan.cz/projects/gdal2tiles/">GDAL2Tiles</a>, Copyright &copy; 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="http://www.gdal.org/">GDAL</a> &amp; <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a>
<div id="subheader">Generated by <a href="https://gdal.org/programs/gdal2tiles.html">GDAL2Tiles</a>, Copyright &copy; 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="https://gdal.org">GDAL</a> &amp; <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a>
<!-- PLEASE, LET THIS NOTE ABOUT AUTHOR AND PROJECT SOMEWHERE ON YOUR WEBSITE, OR AT LEAST IN THE COMMENT IN HTML. THANK YOU -->
</div>
<div id="map"></div>
Expand Down Expand Up @@ -2711,7 +2708,7 @@ def generate_leaflet(self) -> str:
title.addTo(map);
// Note
var src = 'Generated by <a href="http://www.klokan.cz/projects/gdal2tiles/">GDAL2Tiles</a>, Copyright &copy; 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="http://www.gdal.org/">GDAL</a> &amp; <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a>';
var src = 'Generated by <a href="https://gdal.org/programs/gdal2tiles.html">GDAL2Tiles</a>, Copyright &copy; 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="https://gdal.org">GDAL</a> &amp; <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a>';
var title = L.control({position: 'bottomleft'});
title.onAdd = function(map) {
this._div = L.DomUtil.create('div', 'ctl src');
Expand Down

0 comments on commit 2e3f612

Please sign in to comment.