Skip to content

Commit

Permalink
Merge pull request #598 from OpenGeoscience/replace-mapquest-tiles
Browse files Browse the repository at this point in the history
Replace mapquest tiles in examples
  • Loading branch information
jbeezley authored Jul 14, 2016
2 parents d8f9bdc + db58201 commit eb4c2b1
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 49 deletions.
Binary file modified examples/choropleth/thumb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions examples/dynamicData/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ $(function () {
.end(omega)
.state('play');

// Add an OSM layer with MapQuest satellite image tiles
map.createLayer('osm', {
baseUrl: 'http://otile1.mqcdn.com/tiles/1.0.0/sat'
});
// Add an OSM layer
map.createLayer('osm');

// Add a feature layer with a D3 renderer. We could, instead, ask for any
// renderer that supports point features, like so:
Expand Down
7 changes: 6 additions & 1 deletion examples/geoJSON/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ $(function () {
map.createLayer(
'osm',
{
baseUrl: 'http://otile1.mqcdn.com/tiles/1.0.0/map/'
url: 'http://tile.stamen.com/toner-lite/{z}/{x}/{y}.png',
attribution: ['Map tiles by <a href="http://stamen.com">Stamen Design</a>,',
'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>.',
'Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under',
'<a href="http://www.openstreetmap.org/copyright">ODbL</a>.'
].join(' ')
}
);

Expand Down
Binary file modified examples/geoJSON/thumb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 2 additions & 7 deletions examples/hurricanes/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,8 @@ $(function () {
zoom: 3
});

// Add the osm layer with a custom tile url
map.createLayer(
'osm',
{
baseUrl: 'http://otile1.mqcdn.com/tiles/1.0.0/map/'
}
);
// Add the default osm layer
map.createLayer('osm');

// Create a feature layer to draw on.
layer = map.createLayer('feature', {features: [geo.lineFeature.capabilities.multicolor]});
Expand Down
Binary file modified examples/hurricanes/thumb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 2 additions & 7 deletions examples/legend/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ $(function () {
zoom: 3
});

// Add the osm layer with a custom tile url
map.createLayer(
'osm',
{
baseUrl: 'http://otile1.mqcdn.com/tiles/1.0.0/map/'
}
);
// Add the default osm layer
map.createLayer('osm');

// Create a ui layer
var ui = map.createLayer('ui');
Expand Down
Binary file modified examples/legend/thumb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion examples/osm/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ $(function () {
map.createLayer(
'osm',
{
baseUrl: 'http://otile1.mqcdn.com/tiles/1.0.0/map/'
url: 'http://tile.stamen.com/toner-lite/{z}/{x}/{y}.png',
attribution: ['Map tiles by <a href="http://stamen.com">Stamen Design</a>,',
'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>.',
'Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under',
'<a href="http://www.openstreetmap.org/copyright">ODbL</a>.'
].join(' ')
}
);
});
4 changes: 1 addition & 3 deletions examples/reprojection/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ block append mainContent
div#controls
.form-group(title="The url used to fetch tiles. Use {x}, {y}, {z}, and {s} for templating.")
label(for="layer-url") Tile URL
select#layer-url.layerparam(param-name="url", list="url-list", placeholder="http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png")
option(value="http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png", credit='Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>') MapQuest
select#layer-url.layerparam(param-name="url", list="url-list", placeholder="http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png")
option(value="http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", credit="© OpenStreetMap contributors") OpenStreetMap
option(value="../../data/tilefancy.png", credit="") Fancy Test Tile
option(value="http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png", credit='Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>') MapQuest Satellite
option(value="http://tile.stamen.com/toner-lite/{z}/{x}/{y}.png", credit='Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.') Toner Lite
.form-group(title="Web maps are most often rendered using a Mercator geographic coordinate system, but other projections can be used. See spatialreference.org for more information on projections.")
label(for="map-gcs") Map GCS
Expand Down
2 changes: 1 addition & 1 deletion examples/reprojection/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ $(function () {
if (query.url) {
layerParams.url = query.url;
} else {
layerParams.baseUrl = 'http://otile1.mqcdn.com/tiles/1.0.0/map/';
layerParams.url = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
}
// Create a map object
var map = geo.map(mapParams);
Expand Down
4 changes: 1 addition & 3 deletions examples/tiles/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,10 @@ block append mainContent

.form-group(title="The url used to fetch tiles. Use {x}, {y}, {z}, and {s} for templating.")
label(for="layer-url") Tile URL
input#layer-url.layerparam(param-name="url", list="url-list", placeholder="http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png")
input#layer-url.layerparam(param-name="url", list="url-list", placeholder="http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png")
datalist#url-list
option(value="http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png", credit='Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>') MapQuest
option(value="http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", credit="© OpenStreetMap contributors") OSM
option(value="../../data/tilefancy.png", credit="") Fancy Test Tile
option(value="http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png", credit='Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>') MapQuest Satellite
option(value="http://tile.stamen.com/toner-lite/{z}/{x}/{y}.png", credit='Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.') Toner Lite
.form-group(title="The subdomains used to fetch tiles. This can be a comma-separated list or a string of single-letter subdomains.")
label(for="layer-subdomains") URL Subdomains
Expand Down
12 changes: 3 additions & 9 deletions examples/tiles/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
* is used by itself (e.g., 'abc' is the same as 'a,b,c').
* unitsPerPixel: set the units per pixel at zoom level 0.
* url: url to use for the map files. Placeholders are allowed. Default is
* http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png . Other useful
* http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png . Other useful
* urls are are: /data/tilefancy.png
* http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
* http://tile.stamen.com/toner-lite/{z}/{x}/{y}.png
* w: width of a tiled image (at max zoom). If w and h are specified, a
* variety of other changes are made to make this served in image
* coordinates.
Expand Down Expand Up @@ -123,7 +123,7 @@ $(function () {
if (query.url) {
layerParams.url = query.url;
} else {
layerParams.baseUrl = 'http://otile1.mqcdn.com/tiles/1.0.0/map/';
layerParams.url = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
}
if (query.subdomains) {
if (query.subdomains.indexOf(',') >= 0) {
Expand Down Expand Up @@ -357,9 +357,6 @@ $(function () {
break;
case 'url':
var url = processedValue;
if (layerParams.baseUrl) {
delete layerParams.baseUrl;
}
layerParams[param] = processedValue;
osmLayer.url(url);
osmLayer.attribution($('#url-list [value="' + value + '"]').attr(
Expand All @@ -377,9 +374,6 @@ $(function () {
default:
if (ctl.is('.layerparam')) {
layerParams[param] = processedValue;
if (param === 'url' && layerParams.baseUrl) {
delete layerParams.baseUrl;
}
if (osmLayer[param]) {
osmLayer[param](processedValue);
}
Expand Down
Binary file modified examples/tiles/thumb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion examples/transitions/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ $(function () {

// Add an OSM layer
map.createLayer('osm', {
baseUrl: 'http://otile1.mqcdn.com/tiles/1.0.0/map',
renderer: query.renderer ? (query.renderer === 'html' ? null : query.renderer) : undefined
});

Expand Down
Binary file modified examples/transitions/thumb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 2 additions & 7 deletions examples/widgets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,8 @@ $(function () {
zoom: 4
});

// Add the osm layer with a custom tile url
map.createLayer(
'osm',
{
baseUrl: 'http://otile1.mqcdn.com/tiles/1.0.0/map/'
}
);
// Add the default osm layer
map.createLayer('osm');

// Plot points for the 3 cities
var layer = map.createLayer('feature', {'renderer' : 'd3'});
Expand Down
Binary file modified examples/widgets/thumb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions examples/wms/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ $(function () {
center: {x: -98.0, y: 39.5}
});

// Add an OSM layer
map.createLayer('osm', {
baseUrl: 'http://otile1.mqcdn.com/tiles/1.0.0/sat'
});

// Add an OSM layer with a WMS server as the source of its titles
var wms = map.createLayer('osm', {keepLower: false, attribution: null});

Expand Down
Binary file modified examples/wms/thumb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit eb4c2b1

Please sign in to comment.