Skip to content

Commit

Permalink
Merge pull request #1154 from OpenGeoscience/named-osm-layer
Browse files Browse the repository at this point in the history
fix: Don't name osm layers based on source names.
  • Loading branch information
manthey authored Jan 20, 2022
2 parents 5faca09 + f79be46 commit 21a1a48
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# GeoJS Change Log

## Version 1.6.2

### Bug Fixes

- Do not name osm layers based on the tile source ([#1154](../../pull/1154))

## Version 1.6.1

### Changes

- Build for older browsers ([#1145](../../issues/1145))

## Version 1.6.0

### Changes
Expand Down
2 changes: 2 additions & 0 deletions src/osmLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ var osmLayer = function (arg) {
this.constructor.defaults,
osmLayer.tileSources[this.constructor.defaults.source] || {},
osmLayer.tileSources[arg.source] || {},
// don't name the layer based on the source
{name: ''},
arg);
tileLayer.call(this, arg);

Expand Down
1 change: 1 addition & 0 deletions tests/cases/osmLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ describe('geo.core.osmLayer', function () {
expect(layer.source('osm')).toBe(layer);
expect(layer._options.maxLevel).toBe(19);
expect(layer.source()).toBe('osm');
expect(layer.name()).toBe('');
layer = map.createLayer('osm', {renderer: null, url: '/data/tilefancy.png'});
expect(layer.source()).toBe(undefined);
expect(layer.source('stamen-toner-lite')).toBe(layer);
Expand Down

0 comments on commit 21a1a48

Please sign in to comment.